@htmlplus/element 0.4.7 → 0.4.8
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/{bundler → bundlers}/index.d.ts +0 -0
- package/{bundler → bundlers}/index.js +0 -0
- package/{bundler → bundlers}/rollup.d.ts +0 -0
- package/{bundler → bundlers}/rollup.js +0 -0
- package/{bundler → bundlers}/vite.d.ts +0 -0
- package/{bundler → bundlers}/vite.js +0 -0
- package/client/decorators/attributes.js +4 -4
- package/client/decorators/element.js +14 -22
- package/client/decorators/property.js +4 -4
- package/client/decorators/state.js +4 -4
- package/client/utils/getMemberType.js +2 -2
- package/client/utils/index.d.ts +1 -1
- package/client/utils/index.js +1 -1
- package/client/utils/request.js +1 -1
- package/client/utils/syncAttributes.d.ts +1 -0
- package/client/utils/{sync.js → syncAttributes.js} +1 -1
- package/client/{vendor → vendors}/uhtml.d.ts +7 -0
- package/client/{vendor → vendors}/uhtml.js +1 -0
- package/compiler/plugins/copy.d.ts +13 -0
- package/compiler/plugins/copy.js +26 -0
- package/compiler/plugins/customElement.js +31 -38
- package/compiler/plugins/document.js +37 -35
- package/compiler/plugins/index.d.ts +1 -2
- package/compiler/plugins/index.js +1 -2
- package/compiler/plugins/style.d.ts +1 -1
- package/compiler/plugins/style.js +6 -2
- package/compiler/plugins/webTypes.d.ts +1 -1
- package/compiler/plugins/webTypes.js +75 -51
- package/compiler/utils/addDependency.d.ts +9 -4
- package/compiler/utils/addDependency.js +13 -4
- package/compiler/utils/getInitializer.d.ts +1 -1
- package/compiler/utils/getInitializer.js +2 -8
- package/constants/index.d.ts +9 -2
- package/constants/index.js +10 -2
- package/package.json +1 -1
- package/client/utils/sync.d.ts +0 -1
- package/compiler/plugins/finish.d.ts +0 -4
- package/compiler/plugins/finish.js +0 -7
- package/compiler/plugins/start.d.ts +0 -4
- package/compiler/plugins/start.js +0 -7
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as CONSTANTS from '../../constants/index.js';
|
|
2
|
-
import { appendToMethod, host,
|
|
2
|
+
import { appendToMethod, host, syncAttributes } from '../utils/index.js';
|
|
3
3
|
export function Attributes() {
|
|
4
4
|
return function (target, propertyKey) {
|
|
5
|
-
const
|
|
5
|
+
const symbol = Symbol();
|
|
6
6
|
appendToMethod(target, CONSTANTS.LIFECYCLE_CONNECTED, function () {
|
|
7
|
-
|
|
7
|
+
this[symbol] = syncAttributes(host(this));
|
|
8
8
|
});
|
|
9
9
|
appendToMethod(target, CONSTANTS.LIFECYCLE_UPDATED, function () {
|
|
10
|
-
|
|
10
|
+
this[symbol](this[propertyKey]);
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
}
|
|
@@ -1,58 +1,50 @@
|
|
|
1
1
|
import { camelCase, paramCase } from 'change-case';
|
|
2
2
|
import * as CONSTANTS from '../../constants/index.js';
|
|
3
3
|
import { call, getMembersKey, getMemberType, isServer, parseValue, request } from '../utils/index.js';
|
|
4
|
-
import * as uhtml from '../vendor/uhtml.js';
|
|
5
4
|
export function Element(tag) {
|
|
6
5
|
return function (constructor) {
|
|
7
6
|
if (isServer())
|
|
8
7
|
return;
|
|
9
8
|
if (customElements.get(tag))
|
|
10
9
|
return;
|
|
11
|
-
const instances = new Map();
|
|
12
10
|
class Plus extends HTMLElement {
|
|
13
11
|
constructor() {
|
|
14
12
|
super();
|
|
15
13
|
this.attachShadow({ mode: 'open' });
|
|
16
14
|
// TODO
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
instance['uhtml'] = uhtml;
|
|
21
|
-
instance[CONSTANTS.API_STATUS] = 'initialize';
|
|
15
|
+
this[CONSTANTS.API_INSTANCE] = new constructor();
|
|
16
|
+
this[CONSTANTS.API_INSTANCE][CONSTANTS.API_HOST] = () => this;
|
|
17
|
+
this[CONSTANTS.API_INSTANCE][CONSTANTS.API_STATUS] = 'initialize';
|
|
22
18
|
}
|
|
19
|
+
// TODO: ignore functions
|
|
23
20
|
static get observedAttributes() {
|
|
24
|
-
// TODO: ignore functions
|
|
25
21
|
return getMembersKey(constructor).map((key) => paramCase(key));
|
|
26
22
|
}
|
|
27
23
|
adoptedCallback() {
|
|
28
|
-
|
|
29
|
-
call(instance, CONSTANTS.LIFECYCLE_ADOPTED);
|
|
24
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_ADOPTED);
|
|
30
25
|
}
|
|
31
26
|
// TODO
|
|
32
27
|
attributeChangedCallback(name, prev, next) {
|
|
33
|
-
const instance = instances.get(this);
|
|
34
28
|
const key = camelCase(name);
|
|
35
|
-
const type = getMemberType(
|
|
29
|
+
const type = getMemberType(this[CONSTANTS.API_INSTANCE], key);
|
|
36
30
|
const parsed = parseValue(next, type);
|
|
37
|
-
|
|
31
|
+
this[CONSTANTS.API_INSTANCE][key] = parsed;
|
|
38
32
|
}
|
|
39
33
|
connectedCallback() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
request(instance)
|
|
34
|
+
this[CONSTANTS.API_INSTANCE][CONSTANTS.API_STATUS] = 'connected';
|
|
35
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_CONNECTED);
|
|
36
|
+
request(this[CONSTANTS.API_INSTANCE])
|
|
44
37
|
.then(() => {
|
|
45
|
-
|
|
46
|
-
call(
|
|
38
|
+
this[CONSTANTS.API_INSTANCE][CONSTANTS.API_STATUS] = 'loaded';
|
|
39
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_LOADED);
|
|
47
40
|
})
|
|
48
41
|
.catch((error) => {
|
|
49
42
|
throw error;
|
|
50
43
|
});
|
|
51
44
|
}
|
|
52
45
|
disconnectedCallback() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
call(instance, CONSTANTS.LIFECYCLE_DISCONNECTED);
|
|
46
|
+
this[CONSTANTS.API_INSTANCE][CONSTANTS.API_STATUS] = 'disconnected';
|
|
47
|
+
call(this[CONSTANTS.API_INSTANCE], CONSTANTS.LIFECYCLE_DISCONNECTED);
|
|
56
48
|
}
|
|
57
49
|
}
|
|
58
50
|
customElements.define(tag, Plus);
|
|
@@ -5,16 +5,16 @@ export function Property(options) {
|
|
|
5
5
|
return function (target, propertyKey) {
|
|
6
6
|
const name = String(propertyKey);
|
|
7
7
|
const attribute = paramCase(name);
|
|
8
|
+
const symbol = Symbol();
|
|
8
9
|
const type = getMemberType(target, name);
|
|
9
|
-
const values = new Map();
|
|
10
10
|
function get() {
|
|
11
|
-
return
|
|
11
|
+
return this[symbol];
|
|
12
12
|
}
|
|
13
13
|
function set(input) {
|
|
14
|
-
const value =
|
|
14
|
+
const value = this[symbol];
|
|
15
15
|
if (input === value)
|
|
16
16
|
return;
|
|
17
|
-
|
|
17
|
+
this[symbol] = input;
|
|
18
18
|
const isReady = this[CONSTANTS.API_STATUS] == 'initialize';
|
|
19
19
|
request(this, { [name]: [input, value] }).then(() => {
|
|
20
20
|
const element = host(this);
|
|
@@ -2,15 +2,15 @@ import { defineProperty, request } from '../utils/index.js';
|
|
|
2
2
|
export function State() {
|
|
3
3
|
return function (target, propertyKey) {
|
|
4
4
|
const name = String(propertyKey);
|
|
5
|
-
const
|
|
5
|
+
const symbol = Symbol();
|
|
6
6
|
function get() {
|
|
7
|
-
return
|
|
7
|
+
return this[symbol];
|
|
8
8
|
}
|
|
9
9
|
function set(input) {
|
|
10
|
-
const value =
|
|
10
|
+
const value = this[symbol];
|
|
11
11
|
if (input === value)
|
|
12
12
|
return;
|
|
13
|
-
|
|
13
|
+
this[symbol] = input;
|
|
14
14
|
request(this, { [name]: [input, value] })
|
|
15
15
|
.then(() => undefined)
|
|
16
16
|
.catch((error) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as CONSTANTS from '../../constants/index.js';
|
|
2
2
|
export const getMemberType = (target, key) => {
|
|
3
|
-
var _a;
|
|
4
|
-
return (_a = (target.constructor[CONSTANTS.STATIC_MEMBERS] || target[CONSTANTS.STATIC_MEMBERS] ||
|
|
3
|
+
var _a, _b;
|
|
4
|
+
return (_b = (_a = (target.constructor[CONSTANTS.STATIC_MEMBERS] || target[CONSTANTS.STATIC_MEMBERS])) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b[CONSTANTS.STATIC_MEMBERS_TYPE];
|
|
5
5
|
};
|
package/client/utils/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export * from './off.js';
|
|
|
13
13
|
export * from './on.js';
|
|
14
14
|
export * from './parseValue.js';
|
|
15
15
|
export * from './request.js';
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './syncAttributes.js';
|
|
17
17
|
export * from './task.js';
|
|
18
18
|
export * from './toBoolean.js';
|
|
19
19
|
export * from './toEvent.js';
|
package/client/utils/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export * from './off.js';
|
|
|
13
13
|
export * from './on.js';
|
|
14
14
|
export * from './parseValue.js';
|
|
15
15
|
export * from './request.js';
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './syncAttributes.js';
|
|
17
17
|
export * from './task.js';
|
|
18
18
|
export * from './toBoolean.js';
|
|
19
19
|
export * from './toEvent.js';
|
package/client/utils/request.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as CONSTANTS from '../../constants/index.js';
|
|
2
2
|
import { call } from '../utils/call.js';
|
|
3
3
|
import { task } from '../utils/task.js';
|
|
4
|
-
import { html, render } from '../
|
|
4
|
+
import { html, render } from '../vendors/uhtml.js';
|
|
5
5
|
import { getStyles } from './getStyles.js';
|
|
6
6
|
import { host } from './host.js';
|
|
7
7
|
const targets = new Map();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const syncAttributes: (node: HTMLElement) => (next?: any) => void;
|
|
@@ -3,7 +3,7 @@ import { off } from './off.js';
|
|
|
3
3
|
import { on } from './on.js';
|
|
4
4
|
import { toEvent } from './toEvent.js';
|
|
5
5
|
import { updateAttribute } from './updateAttribute.js';
|
|
6
|
-
export const
|
|
6
|
+
export const syncAttributes = (node) => {
|
|
7
7
|
let prev = {};
|
|
8
8
|
return (next = {}) => {
|
|
9
9
|
const prevClass = (prev.class || '').split(' ');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface CopyOptions {
|
|
2
|
+
at?: 'finish' | 'start';
|
|
3
|
+
destination: string;
|
|
4
|
+
source: string;
|
|
5
|
+
transformer?: (parameters: {
|
|
6
|
+
content: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare const copy: (options: CopyOptions) => {
|
|
10
|
+
name: string;
|
|
11
|
+
start: () => void;
|
|
12
|
+
finish: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
const defaults = {
|
|
4
|
+
at: 'finish',
|
|
5
|
+
};
|
|
6
|
+
export const copy = (options) => {
|
|
7
|
+
const name = 'copy';
|
|
8
|
+
options = Object.assign({}, defaults, options);
|
|
9
|
+
const copy = (caller) => {
|
|
10
|
+
if (options.at != caller)
|
|
11
|
+
return;
|
|
12
|
+
let content;
|
|
13
|
+
content = fs.readFileSync(options.source, 'utf8');
|
|
14
|
+
if (options.transformer)
|
|
15
|
+
content = options.transformer({ content });
|
|
16
|
+
fs.ensureDirSync(path.dirname(options.destination));
|
|
17
|
+
fs.writeFileSync(options.destination, content, 'utf8');
|
|
18
|
+
};
|
|
19
|
+
const start = () => {
|
|
20
|
+
copy('start');
|
|
21
|
+
};
|
|
22
|
+
const finish = () => {
|
|
23
|
+
copy('finish');
|
|
24
|
+
};
|
|
25
|
+
return { name, start, finish };
|
|
26
|
+
};
|
|
@@ -21,20 +21,15 @@ export const customElement = (options) => {
|
|
|
21
21
|
return;
|
|
22
22
|
if (value.type != 'JSXExpressionContainer')
|
|
23
23
|
return;
|
|
24
|
-
const local = addDependency(path, CONSTANTS.PACKAGE_NAME, CONSTANTS.UTILS_STYLE_MAP, CONSTANTS.UTILS_STYLE_MAP);
|
|
24
|
+
const { local } = addDependency(path, CONSTANTS.PACKAGE_NAME, CONSTANTS.UTILS_STYLE_MAP, CONSTANTS.UTILS_STYLE_MAP);
|
|
25
|
+
// TODO: remove 'local!'
|
|
25
26
|
path.replaceWith(t.jsxAttribute(t.jsxIdentifier('style'), t.jsxExpressionContainer(t.callExpression(t.identifier(local), [value.expression]))));
|
|
26
27
|
path.skip();
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
// TODO
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const { body, id } = path.node;
|
|
33
|
-
if (id.name != context.className)
|
|
34
|
-
return;
|
|
35
|
-
body.body.unshift(t.classProperty(t.identifier('uhtml')));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
31
|
+
const { node } = addDependency(ast, CONSTANTS.VENDOR_UHTML, 'uhtml');
|
|
32
|
+
t.addComment(node, 'leading', CONSTANTS.COMMENT_AUTO_ADDED_DEPENDENCY, true);
|
|
38
33
|
// replace 'className' attribute to 'class'
|
|
39
34
|
visitor(ast, {
|
|
40
35
|
JSXAttribute(path) {
|
|
@@ -67,17 +62,15 @@ export const customElement = (options) => {
|
|
|
67
62
|
exit(path) {
|
|
68
63
|
if (path.parent.type == 'JSXElement' || path.parent.type == 'JSXFragment') {
|
|
69
64
|
path.replaceWith(t.identifier(print(path.node)));
|
|
70
|
-
return;
|
|
71
65
|
}
|
|
72
66
|
else {
|
|
73
|
-
path.replaceWith(t.memberExpression(t.
|
|
74
|
-
return;
|
|
67
|
+
path.replaceWith(t.memberExpression(t.identifier('uhtml'), t.identifier(`html\`${print(path.node)}\``)));
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
70
|
},
|
|
78
71
|
JSXFragment: {
|
|
79
72
|
exit(path) {
|
|
80
|
-
path.replaceWith(t.memberExpression(t.
|
|
73
|
+
path.replaceWith(t.memberExpression(t.identifier('uhtml'), t.identifier(['html`', ...path.node.children.map((child) => print(child)), '`'].join(''))));
|
|
81
74
|
}
|
|
82
75
|
},
|
|
83
76
|
JSXExpressionContainer: {
|
|
@@ -101,34 +94,34 @@ export const customElement = (options) => {
|
|
|
101
94
|
const { body, id } = path.node;
|
|
102
95
|
if (id.name != context.className)
|
|
103
96
|
return;
|
|
104
|
-
|
|
97
|
+
const node = t.classProperty(t.identifier(CONSTANTS.STATIC_MEMBERS), t.objectExpression([
|
|
105
98
|
...context.classProperties.map((property) => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
99
|
+
const properties = [];
|
|
100
|
+
if (property.value) {
|
|
101
|
+
properties.push(t.objectProperty(t.identifier(CONSTANTS.STATIC_MEMBERS_INITIALIZER), property.value));
|
|
102
|
+
}
|
|
103
|
+
const type = (() => {
|
|
104
|
+
var _a, _b;
|
|
105
|
+
switch ((_b = (_a = property.typeAnnotation) === null || _a === void 0 ? void 0 : _a.typeAnnotation) === null || _b === void 0 ? void 0 : _b.type) {
|
|
106
|
+
case 'TSBooleanKeyword':
|
|
107
|
+
return t.stringLiteral(CONSTANTS.TYPE_BOOLEAN);
|
|
108
|
+
case 'TSStringKeyword':
|
|
109
|
+
return t.stringLiteral(CONSTANTS.TYPE_STRING);
|
|
110
|
+
case 'TSNumberKeyword':
|
|
111
|
+
return t.stringLiteral(CONSTANTS.TYPE_NUMBER);
|
|
112
|
+
}
|
|
113
|
+
})();
|
|
114
|
+
if (type) {
|
|
115
|
+
properties.push(t.objectProperty(t.identifier(CONSTANTS.STATIC_MEMBERS_TYPE), type));
|
|
122
116
|
}
|
|
123
|
-
|
|
124
|
-
elements.push(property.value);
|
|
125
|
-
return t.objectProperty(t.identifier(property.key['name']), t.arrayExpression(elements));
|
|
117
|
+
return t.objectProperty(t.identifier(property.key['name']), t.objectExpression(properties));
|
|
126
118
|
}),
|
|
127
|
-
...context.classMethods.map((method) =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
...context.classMethods.map((method) => t.objectProperty(t.identifier(method.key['name']), t.objectExpression([
|
|
120
|
+
t.objectProperty(t.identifier(CONSTANTS.STATIC_MEMBERS_TYPE), t.stringLiteral(CONSTANTS.TYPE_FUNCTION))
|
|
121
|
+
])))
|
|
122
|
+
]), undefined, undefined, undefined, true);
|
|
123
|
+
t.addComment(node, 'leading', CONSTANTS.COMMENT_AUTO_ADDED_PROPERTY, true);
|
|
124
|
+
body.body.unshift(node);
|
|
132
125
|
}
|
|
133
126
|
});
|
|
134
127
|
// attach typings
|
|
@@ -13,9 +13,10 @@ export const document = (options) => {
|
|
|
13
13
|
components: []
|
|
14
14
|
};
|
|
15
15
|
for (const context of global.contexts) {
|
|
16
|
+
const deprecated = hasTag(context.class, 'deprecated');
|
|
16
17
|
const events = context.classEvents.map((event) => {
|
|
17
18
|
var _a, _b, _c;
|
|
18
|
-
const
|
|
19
|
+
const cancelable = (() => {
|
|
19
20
|
if (!event.decorators)
|
|
20
21
|
return false;
|
|
21
22
|
try {
|
|
@@ -36,27 +37,28 @@ export const document = (options) => {
|
|
|
36
37
|
catch (_a) { }
|
|
37
38
|
return false;
|
|
38
39
|
})();
|
|
40
|
+
const deprecated = hasTag(event, 'deprecated');
|
|
39
41
|
const description = (_a = getTags(event).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value;
|
|
40
42
|
const detail = print((_b = event.typeAnnotation) === null || _b === void 0 ? void 0 : _b['typeAnnotation']);
|
|
41
43
|
const detailReference = getTypeReference(context.fileAST, (_c = event.typeAnnotation) === null || _c === void 0 ? void 0 : _c['typeAnnotation'].typeParameters.params[0]);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
+
const experimental = hasTag(event, 'experimental');
|
|
45
|
+
const model = hasTag(event, 'model');
|
|
44
46
|
const name = event.key['name'];
|
|
45
47
|
const tags = getTags(event);
|
|
46
48
|
return {
|
|
49
|
+
cancelable,
|
|
50
|
+
deprecated,
|
|
47
51
|
description,
|
|
48
52
|
detail,
|
|
49
53
|
detailReference,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
isModel,
|
|
54
|
+
experimental,
|
|
55
|
+
model,
|
|
53
56
|
name,
|
|
54
57
|
tags
|
|
55
58
|
};
|
|
56
59
|
});
|
|
60
|
+
const experimental = hasTag(context.class, 'experimental');
|
|
57
61
|
const group = (_a = getTag(context.class, 'group')) === null || _a === void 0 ? void 0 : _a.value;
|
|
58
|
-
const isDeprecated = hasTag(context.class, 'deprecated');
|
|
59
|
-
const isExperimental = hasTag(context.class, 'experimental');
|
|
60
62
|
const lastModified = glob
|
|
61
63
|
.sync(path.join(context.directoryPath, '**/*.*'))
|
|
62
64
|
.map((file) => fs.statSync(file).mtime)
|
|
@@ -64,14 +66,11 @@ export const document = (options) => {
|
|
|
64
66
|
.pop();
|
|
65
67
|
const methods = context.classMethods.map((method) => {
|
|
66
68
|
var _a, _b, _c;
|
|
69
|
+
const async = method.async;
|
|
67
70
|
const description = (_a = getTags(method).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value;
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const isExperimental = hasTag(method, 'experimental');
|
|
71
|
+
const deprecated = hasTag(method, 'deprecated');
|
|
72
|
+
const experimental = hasTag(method, 'experimental');
|
|
71
73
|
const name = method.key['name'];
|
|
72
|
-
const returns = print((_b = method.returnType) === null || _b === void 0 ? void 0 : _b['typeAnnotation']) || 'void';
|
|
73
|
-
const returnsReference = getTypeReference(context.fileAST, (_c = method.returnType) === null || _c === void 0 ? void 0 : _c['typeAnnotation']);
|
|
74
|
-
const tags = getTags(method);
|
|
75
74
|
// TODO
|
|
76
75
|
const parameters = method.params.map((param) => {
|
|
77
76
|
var _a, _b, _c;
|
|
@@ -79,12 +78,15 @@ export const document = (options) => {
|
|
|
79
78
|
description: (_a = getTags(method, 'param')
|
|
80
79
|
.map((tag) => parseTag(tag, ' '))
|
|
81
80
|
.find((tag) => tag.name == param['name'])) === null || _a === void 0 ? void 0 : _a.description,
|
|
82
|
-
|
|
81
|
+
required: !param['optional'],
|
|
83
82
|
name: param['name'],
|
|
84
83
|
type: print((_b = param === null || param === void 0 ? void 0 : param['typeAnnotation']) === null || _b === void 0 ? void 0 : _b.typeAnnotation) || undefined,
|
|
85
84
|
typeReference: getTypeReference(context.fileAST, (_c = param === null || param === void 0 ? void 0 : param['typeAnnotation']) === null || _c === void 0 ? void 0 : _c.typeAnnotation)
|
|
86
85
|
});
|
|
87
86
|
});
|
|
87
|
+
const returns = print((_b = method.returnType) === null || _b === void 0 ? void 0 : _b['typeAnnotation']) || 'void';
|
|
88
|
+
const returnsReference = getTypeReference(context.fileAST, (_c = method.returnType) === null || _c === void 0 ? void 0 : _c['typeAnnotation']);
|
|
89
|
+
const tags = getTags(method);
|
|
88
90
|
const signature = [
|
|
89
91
|
method.key['name'],
|
|
90
92
|
'(',
|
|
@@ -93,7 +95,7 @@ export const document = (options) => {
|
|
|
93
95
|
var _a;
|
|
94
96
|
let string = '';
|
|
95
97
|
string += parameter.name;
|
|
96
|
-
string += parameter.
|
|
98
|
+
string += parameter.required ? '' : '?';
|
|
97
99
|
string += parameter.type ? ': ' : '';
|
|
98
100
|
string += (_a = parameter.type) !== null && _a !== void 0 ? _a : '';
|
|
99
101
|
return string;
|
|
@@ -104,15 +106,15 @@ export const document = (options) => {
|
|
|
104
106
|
returns
|
|
105
107
|
].join('');
|
|
106
108
|
return {
|
|
109
|
+
async,
|
|
107
110
|
description,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
isExperimental,
|
|
111
|
+
deprecated,
|
|
112
|
+
experimental,
|
|
111
113
|
name,
|
|
114
|
+
parameters,
|
|
112
115
|
returns,
|
|
113
116
|
returnsReference,
|
|
114
117
|
tags,
|
|
115
|
-
parameters,
|
|
116
118
|
signature
|
|
117
119
|
};
|
|
118
120
|
});
|
|
@@ -120,9 +122,15 @@ export const document = (options) => {
|
|
|
120
122
|
const properties = context.classProperties.map((property) => {
|
|
121
123
|
var _a, _b, _c;
|
|
122
124
|
const attribute = paramCase(property.key['name']);
|
|
125
|
+
const deprecated = hasTag(property, 'deprecated');
|
|
123
126
|
const description = (_a = getTags(property).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value;
|
|
127
|
+
const experimental = hasTag(property, 'experimental');
|
|
128
|
+
// TODO
|
|
129
|
+
const initializer = getInitializer(property.value);
|
|
130
|
+
const model = hasTag(property, 'model');
|
|
131
|
+
const name = property.key['name'];
|
|
124
132
|
// TODO
|
|
125
|
-
const
|
|
133
|
+
const reflects = (() => {
|
|
126
134
|
if (!property.decorators)
|
|
127
135
|
return false;
|
|
128
136
|
try {
|
|
@@ -143,26 +151,20 @@ export const document = (options) => {
|
|
|
143
151
|
catch (_a) { }
|
|
144
152
|
return false;
|
|
145
153
|
})();
|
|
146
|
-
|
|
147
|
-
const initializer = getInitializer(property.value);
|
|
148
|
-
const isDeprecated = hasTag(property, 'deprecated');
|
|
149
|
-
const isExperimental = hasTag(property, 'experimental');
|
|
150
|
-
const isModel = hasTag(property, 'model');
|
|
151
|
-
const isRequired = !property.optional;
|
|
152
|
-
const name = property.key['name'];
|
|
154
|
+
const required = !property.optional;
|
|
153
155
|
const tags = getTags(property);
|
|
154
156
|
const type = print((_b = property.typeAnnotation) === null || _b === void 0 ? void 0 : _b['typeAnnotation']);
|
|
155
157
|
const typeReference = getTypeReference(context.fileAST, (_c = property.typeAnnotation) === null || _c === void 0 ? void 0 : _c['typeAnnotation']);
|
|
156
158
|
return {
|
|
157
159
|
attribute,
|
|
160
|
+
deprecated,
|
|
158
161
|
description,
|
|
159
|
-
|
|
162
|
+
experimental,
|
|
160
163
|
initializer,
|
|
161
|
-
|
|
162
|
-
isExperimental,
|
|
163
|
-
isModel,
|
|
164
|
-
isRequired,
|
|
164
|
+
model,
|
|
165
165
|
name,
|
|
166
|
+
reflects,
|
|
167
|
+
required,
|
|
166
168
|
tags,
|
|
167
169
|
type,
|
|
168
170
|
typeReference
|
|
@@ -222,8 +224,8 @@ export const document = (options) => {
|
|
|
222
224
|
// source
|
|
223
225
|
events,
|
|
224
226
|
group,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
+
deprecated,
|
|
228
|
+
experimental,
|
|
227
229
|
key: context.componentKey,
|
|
228
230
|
lastModified,
|
|
229
231
|
methods,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export * from './assets.js';
|
|
2
|
+
export * from './copy.js';
|
|
2
3
|
export * from './customElementReact/index.js';
|
|
3
4
|
export * from './customElement.js';
|
|
4
5
|
export * from './document.js';
|
|
5
6
|
export * from './extract.js';
|
|
6
|
-
export * from './finish.js';
|
|
7
7
|
export * from './parse.js';
|
|
8
8
|
export * from './read.js';
|
|
9
|
-
export * from './start.js';
|
|
10
9
|
export * from './style.js';
|
|
11
10
|
export * from './validate.js';
|
|
12
11
|
export * from './webTypes.js';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export * from './assets.js';
|
|
2
|
+
export * from './copy.js';
|
|
2
3
|
export * from './customElementReact/index.js';
|
|
3
4
|
export * from './customElement.js';
|
|
4
5
|
export * from './document.js';
|
|
5
6
|
export * from './extract.js';
|
|
6
|
-
export * from './finish.js';
|
|
7
7
|
export * from './parse.js';
|
|
8
8
|
export * from './read.js';
|
|
9
|
-
export * from './start.js';
|
|
10
9
|
export * from './style.js';
|
|
11
10
|
export * from './validate.js';
|
|
12
11
|
export * from './webTypes.js';
|
|
@@ -18,16 +18,20 @@ export const style = (options) => {
|
|
|
18
18
|
const name = 'style';
|
|
19
19
|
options = Object.assign({}, defaults, options);
|
|
20
20
|
const next = (context) => {
|
|
21
|
-
const references = options.references(context);
|
|
21
|
+
const references = [options.references(context)].flat();
|
|
22
22
|
for (const reference of references) {
|
|
23
23
|
if (!fs.existsSync(reference))
|
|
24
24
|
continue;
|
|
25
25
|
context.stylePath = reference;
|
|
26
|
+
break;
|
|
26
27
|
}
|
|
27
28
|
if (!context.stylePath)
|
|
28
29
|
return;
|
|
29
|
-
const local = addDependency(context.fileAST, context.stylePath,
|
|
30
|
+
const { local, node } = addDependency(context.fileAST, context.stylePath, CONSTANTS.AUTO_IMPORT_STYLE);
|
|
31
|
+
t.addComment(node, 'leading', CONSTANTS.COMMENT_AUTO_ADDED_DEPENDENCY, true);
|
|
32
|
+
// TODO: remove 'local!'
|
|
30
33
|
const property = t.classProperty(t.identifier(CONSTANTS.STATIC_STYLES), t.identifier(local), undefined, null, undefined, true);
|
|
34
|
+
t.addComment(property, 'leading', CONSTANTS.COMMENT_AUTO_ADDED_PROPERTY, true);
|
|
31
35
|
context.class.body.body.unshift(property);
|
|
32
36
|
};
|
|
33
37
|
return { name, next };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { paramCase } from 'change-case';
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
3
|
import path from 'path';
|
|
4
|
-
import { getTags, print } from '../utils/index.js';
|
|
4
|
+
import { getInitializer, getTags, hasTag, parseTag, print } from '../utils/index.js';
|
|
5
5
|
const defaults = {};
|
|
6
6
|
export const webTypes = (options) => {
|
|
7
7
|
const name = 'webTypes';
|
|
8
8
|
options = Object.assign({}, defaults, options);
|
|
9
9
|
const finish = (global) => {
|
|
10
|
+
var _a, _b, _c, _d, _e;
|
|
10
11
|
const json = {
|
|
11
12
|
'$schema': 'http://json.schemastore.org/web-types',
|
|
12
13
|
'name': options.packageName,
|
|
@@ -19,58 +20,81 @@ export const webTypes = (options) => {
|
|
|
19
20
|
},
|
|
20
21
|
'contributions': {
|
|
21
22
|
html: {
|
|
22
|
-
elements:
|
|
23
|
-
.sort((a, b) => ((a.componentTag || '') > (b.componentTag || '') ? 1 : -1))
|
|
24
|
-
.map((context) => {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
return ({
|
|
27
|
-
'name': context.componentTag,
|
|
28
|
-
'description': '',
|
|
29
|
-
'doc-url': options.docUrl(),
|
|
30
|
-
'js': {
|
|
31
|
-
properties: [
|
|
32
|
-
...(context.classProperties || []).map((property) => {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
return ({
|
|
35
|
-
name: camelCase(property.key['name']),
|
|
36
|
-
description: (_a = getTags(property).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value,
|
|
37
|
-
value: {
|
|
38
|
-
type: print((_b = property.typeAnnotation) === null || _b === void 0 ? void 0 : _b['typeAnnotation'])
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}),
|
|
42
|
-
...(context.classMethods || []).map((method) => {
|
|
43
|
-
var _a;
|
|
44
|
-
return ({
|
|
45
|
-
name: camelCase(method.key['name']),
|
|
46
|
-
description: (_a = getTags(method).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value,
|
|
47
|
-
value: {}
|
|
48
|
-
});
|
|
49
|
-
})
|
|
50
|
-
],
|
|
51
|
-
events: (_a = context.classEvents) === null || _a === void 0 ? void 0 : _a.map((event) => {
|
|
52
|
-
var _a;
|
|
53
|
-
return ({
|
|
54
|
-
name: paramCase(event.key['name']),
|
|
55
|
-
description: (_a = getTags(event).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value
|
|
56
|
-
});
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
'attributes': (_b = context.classProperties) === null || _b === void 0 ? void 0 : _b.map((property) => {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
return ({
|
|
62
|
-
name: paramCase(property.key['name']),
|
|
63
|
-
description: (_a = getTags(property).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value,
|
|
64
|
-
value: {
|
|
65
|
-
type: print((_b = property.typeAnnotation) === null || _b === void 0 ? void 0 : _b['typeAnnotation'])
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
})
|
|
69
|
-
});
|
|
70
|
-
})
|
|
23
|
+
elements: []
|
|
71
24
|
}
|
|
72
25
|
}
|
|
73
26
|
};
|
|
27
|
+
const extract = (member) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return ({
|
|
30
|
+
name: member.key['name'],
|
|
31
|
+
description: (_a = getTags(member).find((tag) => !tag.key)) === null || _a === void 0 ? void 0 : _a.value,
|
|
32
|
+
deprecated: hasTag(member, 'deprecated'),
|
|
33
|
+
experimental: hasTag(member, 'experimental')
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
for (const context of global.contexts) {
|
|
37
|
+
const attributes = (_a = context.classProperties) === null || _a === void 0 ? void 0 : _a.map((property) => {
|
|
38
|
+
var _a;
|
|
39
|
+
return Object.assign({}, extract(property), {
|
|
40
|
+
name: paramCase(property.key['name']),
|
|
41
|
+
value: {
|
|
42
|
+
// kind: TODO
|
|
43
|
+
/**
|
|
44
|
+
* For Example
|
|
45
|
+
* 01) type: "''"
|
|
46
|
+
* 02) type: "null"
|
|
47
|
+
* 03) type: "undefined"
|
|
48
|
+
* 04) type: "boolean"
|
|
49
|
+
* 05) type: "string"
|
|
50
|
+
* 06) type: "number"
|
|
51
|
+
* 07) type: "boolean | string | number"
|
|
52
|
+
* 08) type: "string[]"
|
|
53
|
+
* 09) type: "1 | 2 | 3"
|
|
54
|
+
* 10) type: "'Value-1' | 'Value-2'"
|
|
55
|
+
*/
|
|
56
|
+
type: print((_a = property.typeAnnotation) === null || _a === void 0 ? void 0 : _a['typeAnnotation'])
|
|
57
|
+
// required: TODO
|
|
58
|
+
// default: TODO
|
|
59
|
+
},
|
|
60
|
+
default: getInitializer(property.value)
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
const events = (_b = context.classEvents) === null || _b === void 0 ? void 0 : _b.map((event) => Object.assign({}, extract(event), {
|
|
64
|
+
name: paramCase(event.key['name']) // TODO
|
|
65
|
+
// 'value': TODO
|
|
66
|
+
}));
|
|
67
|
+
const methods = (_c = context.classMethods) === null || _c === void 0 ? void 0 : _c.map((method) => Object.assign({}, extract(method), {
|
|
68
|
+
// 'value': TODO
|
|
69
|
+
}));
|
|
70
|
+
const properties = (_d = context.classProperties) === null || _d === void 0 ? void 0 : _d.map((property) => Object.assign({}, extract(property), {
|
|
71
|
+
// 'value': TODO
|
|
72
|
+
default: getInitializer(property.value)
|
|
73
|
+
}));
|
|
74
|
+
const slots = getTags(context.class, 'slot').map((tag) => {
|
|
75
|
+
const { description, name } = parseTag(tag);
|
|
76
|
+
return {
|
|
77
|
+
'name': name,
|
|
78
|
+
'description': description,
|
|
79
|
+
'doc-url': undefined,
|
|
80
|
+
'deprecated': false,
|
|
81
|
+
'experimental': false
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
json.contributions.html.elements.push({
|
|
85
|
+
'name': context.componentTag,
|
|
86
|
+
'description': 'TODO',
|
|
87
|
+
'doc-url': (_e = options.reference) === null || _e === void 0 ? void 0 : _e.call(options, context.componentTag),
|
|
88
|
+
'deprecated': hasTag(context.class, 'deprecated'),
|
|
89
|
+
'experimental': hasTag(context.class, 'experimental'),
|
|
90
|
+
'js': {
|
|
91
|
+
events,
|
|
92
|
+
properties: [].concat(properties, methods)
|
|
93
|
+
},
|
|
94
|
+
attributes,
|
|
95
|
+
slots
|
|
96
|
+
});
|
|
97
|
+
}
|
|
74
98
|
const dirname = path.dirname(options.destination);
|
|
75
99
|
fs.ensureDirSync(dirname);
|
|
76
100
|
fs.writeJSONSync(options.destination, json, { encoding: 'utf8', spaces: 2 });
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { File } from '@babel/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { File, ImportDeclaration } from '@babel/types';
|
|
2
|
+
interface AddDependencyReturns {
|
|
3
|
+
local?: string;
|
|
4
|
+
node: ImportDeclaration;
|
|
5
|
+
}
|
|
6
|
+
export declare function addDependency(path: File | any, source: string): AddDependencyReturns;
|
|
7
|
+
export declare function addDependency(path: File | any, source: string, local: string): AddDependencyReturns;
|
|
8
|
+
export declare function addDependency(path: File | any, source: string, local: string, imported: string): AddDependencyReturns;
|
|
9
|
+
export {};
|
|
@@ -17,7 +17,9 @@ export function addDependency(path, source, local, imported) {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
if (isNormal && declaration)
|
|
20
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
node: declaration
|
|
22
|
+
};
|
|
21
23
|
let specifier = declaration === null || declaration === void 0 ? void 0 : declaration.specifiers.find((specifier) => {
|
|
22
24
|
var _a;
|
|
23
25
|
if (isDefault) {
|
|
@@ -28,7 +30,10 @@ export function addDependency(path, source, local, imported) {
|
|
|
28
30
|
}
|
|
29
31
|
});
|
|
30
32
|
if (specifier)
|
|
31
|
-
return
|
|
33
|
+
return {
|
|
34
|
+
local: specifier.local.name,
|
|
35
|
+
node: declaration
|
|
36
|
+
};
|
|
32
37
|
if (isDefault) {
|
|
33
38
|
specifier = t.importDefaultSpecifier(t.identifier(local));
|
|
34
39
|
}
|
|
@@ -44,8 +49,12 @@ export function addDependency(path, source, local, imported) {
|
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
else {
|
|
52
|
+
declaration = t.importDeclaration(specifier ? [specifier] : [], t.stringLiteral(source));
|
|
47
53
|
// TODO
|
|
48
|
-
(file.program || file).body.unshift(
|
|
54
|
+
(file.program || file).body.unshift(declaration);
|
|
49
55
|
}
|
|
50
|
-
return
|
|
56
|
+
return {
|
|
57
|
+
local,
|
|
58
|
+
node: declaration
|
|
59
|
+
};
|
|
51
60
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Expression } from '@babel/types';
|
|
2
|
-
export declare const getInitializer: (node: Expression) =>
|
|
2
|
+
export declare const getInitializer: (node: Expression) => string | undefined;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
// TODO: return type
|
|
2
1
|
export const getInitializer = (node) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const value = node;
|
|
6
|
-
if (!value)
|
|
7
|
-
return;
|
|
8
|
-
const extra = value.extra || {};
|
|
9
|
-
return extra.raw || value['value'];
|
|
2
|
+
var _a;
|
|
3
|
+
return ((_a = node === null || node === void 0 ? void 0 : node.extra) === null || _a === void 0 ? void 0 : _a.raw) || (node === null || node === void 0 ? void 0 : node['value']);
|
|
10
4
|
};
|
package/constants/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "@htmlplus/element";
|
|
2
|
-
export declare const API_HOST
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const API_HOST: unique symbol;
|
|
3
|
+
export declare const API_INSTANCE: unique symbol;
|
|
4
|
+
export declare const API_STATUS: unique symbol;
|
|
4
5
|
export declare const DECORATOR_ELEMENT = "Element";
|
|
5
6
|
export declare const DECORATOR_EVENT = "Event";
|
|
6
7
|
export declare const DECORATOR_PROPERTY = "Property";
|
|
@@ -14,6 +15,8 @@ export declare const LIFECYCLE_UPDATE = "updateCallback";
|
|
|
14
15
|
export declare const LIFECYCLE_UPDATED = "updatedCallback";
|
|
15
16
|
export declare const METHOD_RENDER = "render";
|
|
16
17
|
export declare const STATIC_MEMBERS = "members";
|
|
18
|
+
export declare const STATIC_MEMBERS_INITIALIZER = "default";
|
|
19
|
+
export declare const STATIC_MEMBERS_TYPE = "type";
|
|
17
20
|
export declare const STATIC_STYLES = "styles";
|
|
18
21
|
export declare const TYPE_BOOLEAN = "boolean";
|
|
19
22
|
export declare const TYPE_DATE = "date";
|
|
@@ -21,3 +24,7 @@ export declare const TYPE_FUNCTION = "function";
|
|
|
21
24
|
export declare const TYPE_STRING = "string";
|
|
22
25
|
export declare const TYPE_NUMBER = "number";
|
|
23
26
|
export declare const UTILS_STYLE_MAP = "styles";
|
|
27
|
+
export declare const VENDOR_UHTML = "@htmlplus/element/client/vendors/uhtml.js";
|
|
28
|
+
export declare const AUTO_IMPORT_STYLE = "AUTO_IMPORT_STYLE";
|
|
29
|
+
export declare const COMMENT_AUTO_ADDED_DEPENDENCY = " THIS DEPENDENCY IS AUTO-ADDED, DO NOT EDIT MANUALY";
|
|
30
|
+
export declare const COMMENT_AUTO_ADDED_PROPERTY = " THIS PROPERTY IS AUTO-ADDED, DO NOT EDIT MANUALY";
|
package/constants/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export const PACKAGE_NAME = '@htmlplus/element';
|
|
2
2
|
// apis
|
|
3
|
-
export const API_HOST =
|
|
3
|
+
export const API_HOST = Symbol();
|
|
4
|
+
export const API_INSTANCE = Symbol();
|
|
4
5
|
// TODO
|
|
5
|
-
export const API_STATUS =
|
|
6
|
+
export const API_STATUS = Symbol();
|
|
6
7
|
// decorators
|
|
7
8
|
export const DECORATOR_ELEMENT = 'Element';
|
|
8
9
|
export const DECORATOR_EVENT = 'Event';
|
|
@@ -20,6 +21,8 @@ export const LIFECYCLE_UPDATED = 'updatedCallback';
|
|
|
20
21
|
export const METHOD_RENDER = 'render';
|
|
21
22
|
// statics
|
|
22
23
|
export const STATIC_MEMBERS = 'members';
|
|
24
|
+
export const STATIC_MEMBERS_INITIALIZER = 'default';
|
|
25
|
+
export const STATIC_MEMBERS_TYPE = 'type';
|
|
23
26
|
export const STATIC_STYLES = 'styles';
|
|
24
27
|
// types
|
|
25
28
|
export const TYPE_BOOLEAN = 'boolean';
|
|
@@ -29,3 +32,8 @@ export const TYPE_STRING = 'string';
|
|
|
29
32
|
export const TYPE_NUMBER = 'number';
|
|
30
33
|
// utils
|
|
31
34
|
export const UTILS_STYLE_MAP = 'styles';
|
|
35
|
+
// TODO
|
|
36
|
+
export const VENDOR_UHTML = '@htmlplus/element/client/vendors/uhtml.js';
|
|
37
|
+
export const AUTO_IMPORT_STYLE = 'AUTO_IMPORT_STYLE';
|
|
38
|
+
export const COMMENT_AUTO_ADDED_DEPENDENCY = ' THIS DEPENDENCY IS AUTO-ADDED, DO NOT EDIT MANUALY';
|
|
39
|
+
export const COMMENT_AUTO_ADDED_PROPERTY = ' THIS PROPERTY IS AUTO-ADDED, DO NOT EDIT MANUALY';
|
package/package.json
CHANGED
package/client/utils/sync.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sync: (node: HTMLElement) => (next?: any) => void;
|