@htmlplus/element 3.3.0 → 3.4.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.
@@ -1,6 +1,7 @@
1
1
  declare const KEY = "htmlplus";
2
2
  declare const PACKAGE_NAME = "@htmlplus/element";
3
3
  declare const API_CONNECTED: unique symbol;
4
+ declare const API_DEFAULTS: unique symbol;
4
5
  declare const API_HOST: unique symbol;
5
6
  declare const API_REQUEST: unique symbol;
6
7
  declare const API_RENDER_COMPLETED: unique symbol;
@@ -45,4 +46,4 @@ declare const UTILS_STYLES_IMPORTED = "styles";
45
46
  declare const UTILS_STYLES_LOCAL = "UTILS_STYLES";
46
47
  declare const UTILS_PATH = "@htmlplus/element/internal.js";
47
48
 
48
- export { API_CONNECTED, API_HOST, 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, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, 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 };
49
+ export { API_CONNECTED, API_DEFAULTS, API_HOST, 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, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, 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/dist/constants.js CHANGED
@@ -2,6 +2,7 @@ const KEY = 'htmlplus';
2
2
  const PACKAGE_NAME = '@htmlplus/element';
3
3
  // APIs
4
4
  const API_CONNECTED = Symbol();
5
+ const API_DEFAULTS = Symbol();
5
6
  const API_HOST = Symbol();
6
7
  const API_REQUEST = Symbol();
7
8
  const API_RENDER_COMPLETED = Symbol();
@@ -56,4 +57,4 @@ const UTILS_STYLES_IMPORTED = 'styles';
56
57
  const UTILS_STYLES_LOCAL = 'UTILS_STYLES';
57
58
  const UTILS_PATH = '@htmlplus/element/internal.js';
58
59
 
59
- export { API_CONNECTED, API_HOST, 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, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, 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 };
60
+ export { API_CONNECTED, API_DEFAULTS, API_HOST, 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, KEY, LIFECYCLE_ADOPTED, LIFECYCLE_CONNECTED, LIFECYCLE_CONSTRUCTED, LIFECYCLE_DISCONNECTED, LIFECYCLE_READY, LIFECYCLE_UPDATE, LIFECYCLE_UPDATED, METHOD_RENDER, PACKAGE_NAME, STATIC_STYLE, STATIC_TAG, STYLE_IMPORTED, TYPE_ARRAY, TYPE_BIGINT, 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 };
@@ -1,193 +1,193 @@
1
1
  import 'react';
2
2
 
3
3
  type WithPart<K extends keyof React.JSX.IntrinsicElements> = React.JSX.IntrinsicElements[K] & {
4
- part?: string;
4
+ part?: string;
5
5
  };
6
6
 
7
7
  declare namespace JSX {
8
- interface IntrinsicElements {
9
- host: WithPart<'div'> & { [key: string]: any };
8
+ interface IntrinsicElements {
9
+ host: WithPart<'div'> & { [key: string]: unknown };
10
10
 
11
- a: WithPart<'a'>;
12
- abbr: WithPart<'abbr'>;
13
- address: WithPart<'address'>;
14
- area: WithPart<'area'>;
15
- article: WithPart<'article'>;
16
- aside: WithPart<'aside'>;
17
- audio: WithPart<'audio'>;
18
- b: WithPart<'b'>;
19
- base: WithPart<'base'>;
20
- bdi: WithPart<'bdi'>;
21
- bdo: WithPart<'bdo'>;
22
- big: WithPart<'big'>;
23
- blockquote: WithPart<'blockquote'>;
24
- body: WithPart<'body'>;
25
- br: WithPart<'br'>;
26
- button: WithPart<'button'>;
27
- canvas: WithPart<'canvas'>;
28
- caption: WithPart<'caption'>;
29
- center: WithPart<'center'>;
30
- cite: WithPart<'cite'>;
31
- code: WithPart<'code'>;
32
- col: WithPart<'col'>;
33
- colgroup: WithPart<'colgroup'>;
34
- data: WithPart<'data'>;
35
- datalist: WithPart<'datalist'>;
36
- dd: WithPart<'dd'>;
37
- del: WithPart<'del'>;
38
- details: WithPart<'details'>;
39
- dfn: WithPart<'dfn'>;
40
- dialog: WithPart<'dialog'>;
41
- div: WithPart<'div'>;
42
- dl: WithPart<'dl'>;
43
- dt: WithPart<'dt'>;
44
- em: WithPart<'em'>;
45
- embed: WithPart<'embed'>;
46
- fieldset: WithPart<'fieldset'>;
47
- figcaption: WithPart<'figcaption'>;
48
- figure: WithPart<'figure'>;
49
- footer: WithPart<'footer'>;
50
- form: WithPart<'form'>;
51
- h1: WithPart<'h1'>;
52
- h2: WithPart<'h2'>;
53
- h3: WithPart<'h3'>;
54
- h4: WithPart<'h4'>;
55
- h5: WithPart<'h5'>;
56
- h6: WithPart<'h6'>;
57
- head: WithPart<'head'>;
58
- header: WithPart<'header'>;
59
- hgroup: WithPart<'hgroup'>;
60
- hr: WithPart<'hr'>;
61
- html: WithPart<'html'>;
62
- i: WithPart<'i'>;
63
- iframe: WithPart<'iframe'>;
64
- img: WithPart<'img'>;
65
- input: WithPart<'input'>;
66
- ins: WithPart<'ins'>;
67
- kbd: WithPart<'kbd'>;
68
- keygen: WithPart<'keygen'>;
69
- label: WithPart<'label'>;
70
- legend: WithPart<'legend'>;
71
- li: WithPart<'li'>;
72
- link: WithPart<'link'>;
73
- main: WithPart<'main'>;
74
- map: WithPart<'map'>;
75
- mark: WithPart<'mark'>;
76
- menu: WithPart<'menu'>;
77
- menuitem: WithPart<'menuitem'>;
78
- meta: WithPart<'meta'>;
79
- meter: WithPart<'meter'>;
80
- nav: WithPart<'nav'>;
81
- noindex: WithPart<'noindex'>;
82
- noscript: WithPart<'noscript'>;
83
- object: WithPart<'object'>;
84
- ol: WithPart<'ol'>;
85
- optgroup: WithPart<'optgroup'>;
86
- option: WithPart<'option'>;
87
- output: WithPart<'output'>;
88
- p: WithPart<'p'>;
89
- param: WithPart<'param'>;
90
- picture: WithPart<'picture'>;
91
- pre: WithPart<'pre'>;
92
- progress: WithPart<'progress'>;
93
- q: WithPart<'q'>;
94
- rp: WithPart<'rp'>;
95
- rt: WithPart<'rt'>;
96
- ruby: WithPart<'ruby'>;
97
- s: WithPart<'s'>;
98
- samp: WithPart<'samp'>;
99
- search: WithPart<'search'>;
100
- slot: WithPart<'slot'> & { onSlotChange?: (event: Event) => void };
101
- script: WithPart<'script'>;
102
- section: WithPart<'section'>;
103
- select: WithPart<'select'>;
104
- small: WithPart<'small'>;
105
- source: WithPart<'source'>;
106
- span: WithPart<'span'>;
107
- strong: WithPart<'strong'>;
108
- style: WithPart<'style'>;
109
- sub: WithPart<'sub'>;
110
- summary: WithPart<'summary'>;
111
- sup: WithPart<'sup'>;
112
- table: WithPart<'table'>;
113
- template: WithPart<'template'>;
114
- tbody: WithPart<'tbody'>;
115
- td: WithPart<'td'>;
116
- textarea: WithPart<'textarea'>;
117
- tfoot: WithPart<'tfoot'>;
118
- th: WithPart<'th'>;
119
- thead: WithPart<'thead'>;
120
- time: WithPart<'time'>;
121
- title: WithPart<'title'>;
122
- tr: WithPart<'tr'>;
123
- track: WithPart<'track'>;
124
- u: WithPart<'u'>;
125
- ul: WithPart<'ul'>;
126
- var: WithPart<'var'>;
127
- video: WithPart<'video'>;
128
- wbr: WithPart<'wbr'>;
129
- webview: WithPart<'webview'>;
11
+ a: WithPart<'a'>;
12
+ abbr: WithPart<'abbr'>;
13
+ address: WithPart<'address'>;
14
+ area: WithPart<'area'>;
15
+ article: WithPart<'article'>;
16
+ aside: WithPart<'aside'>;
17
+ audio: WithPart<'audio'>;
18
+ b: WithPart<'b'>;
19
+ base: WithPart<'base'>;
20
+ bdi: WithPart<'bdi'>;
21
+ bdo: WithPart<'bdo'>;
22
+ big: WithPart<'big'>;
23
+ blockquote: WithPart<'blockquote'>;
24
+ body: WithPart<'body'>;
25
+ br: WithPart<'br'>;
26
+ button: WithPart<'button'>;
27
+ canvas: WithPart<'canvas'>;
28
+ caption: WithPart<'caption'>;
29
+ center: WithPart<'center'>;
30
+ cite: WithPart<'cite'>;
31
+ code: WithPart<'code'>;
32
+ col: WithPart<'col'>;
33
+ colgroup: WithPart<'colgroup'>;
34
+ data: WithPart<'data'>;
35
+ datalist: WithPart<'datalist'>;
36
+ dd: WithPart<'dd'>;
37
+ del: WithPart<'del'>;
38
+ details: WithPart<'details'>;
39
+ dfn: WithPart<'dfn'>;
40
+ dialog: WithPart<'dialog'>;
41
+ div: WithPart<'div'>;
42
+ dl: WithPart<'dl'>;
43
+ dt: WithPart<'dt'>;
44
+ em: WithPart<'em'>;
45
+ embed: WithPart<'embed'>;
46
+ fieldset: WithPart<'fieldset'>;
47
+ figcaption: WithPart<'figcaption'>;
48
+ figure: WithPart<'figure'>;
49
+ footer: WithPart<'footer'>;
50
+ form: WithPart<'form'>;
51
+ h1: WithPart<'h1'>;
52
+ h2: WithPart<'h2'>;
53
+ h3: WithPart<'h3'>;
54
+ h4: WithPart<'h4'>;
55
+ h5: WithPart<'h5'>;
56
+ h6: WithPart<'h6'>;
57
+ head: WithPart<'head'>;
58
+ header: WithPart<'header'>;
59
+ hgroup: WithPart<'hgroup'>;
60
+ hr: WithPart<'hr'>;
61
+ html: WithPart<'html'>;
62
+ i: WithPart<'i'>;
63
+ iframe: WithPart<'iframe'>;
64
+ img: WithPart<'img'>;
65
+ input: WithPart<'input'>;
66
+ ins: WithPart<'ins'>;
67
+ kbd: WithPart<'kbd'>;
68
+ keygen: WithPart<'keygen'>;
69
+ label: WithPart<'label'>;
70
+ legend: WithPart<'legend'>;
71
+ li: WithPart<'li'>;
72
+ link: WithPart<'link'>;
73
+ main: WithPart<'main'>;
74
+ map: WithPart<'map'>;
75
+ mark: WithPart<'mark'>;
76
+ menu: WithPart<'menu'>;
77
+ menuitem: WithPart<'menuitem'>;
78
+ meta: WithPart<'meta'>;
79
+ meter: WithPart<'meter'>;
80
+ nav: WithPart<'nav'>;
81
+ noindex: WithPart<'noindex'>;
82
+ noscript: WithPart<'noscript'>;
83
+ object: WithPart<'object'>;
84
+ ol: WithPart<'ol'>;
85
+ optgroup: WithPart<'optgroup'>;
86
+ option: WithPart<'option'>;
87
+ output: WithPart<'output'>;
88
+ p: WithPart<'p'>;
89
+ param: WithPart<'param'>;
90
+ picture: WithPart<'picture'>;
91
+ pre: WithPart<'pre'>;
92
+ progress: WithPart<'progress'>;
93
+ q: WithPart<'q'>;
94
+ rp: WithPart<'rp'>;
95
+ rt: WithPart<'rt'>;
96
+ ruby: WithPart<'ruby'>;
97
+ s: WithPart<'s'>;
98
+ samp: WithPart<'samp'>;
99
+ search: WithPart<'search'>;
100
+ slot: WithPart<'slot'> & { onSlotChange?: (event: Event) => void };
101
+ script: WithPart<'script'>;
102
+ section: WithPart<'section'>;
103
+ select: WithPart<'select'>;
104
+ small: WithPart<'small'>;
105
+ source: WithPart<'source'>;
106
+ span: WithPart<'span'>;
107
+ strong: WithPart<'strong'>;
108
+ style: WithPart<'style'>;
109
+ sub: WithPart<'sub'>;
110
+ summary: WithPart<'summary'>;
111
+ sup: WithPart<'sup'>;
112
+ table: WithPart<'table'>;
113
+ template: WithPart<'template'>;
114
+ tbody: WithPart<'tbody'>;
115
+ td: WithPart<'td'>;
116
+ textarea: WithPart<'textarea'>;
117
+ tfoot: WithPart<'tfoot'>;
118
+ th: WithPart<'th'>;
119
+ thead: WithPart<'thead'>;
120
+ time: WithPart<'time'>;
121
+ title: WithPart<'title'>;
122
+ tr: WithPart<'tr'>;
123
+ track: WithPart<'track'>;
124
+ u: WithPart<'u'>;
125
+ ul: WithPart<'ul'>;
126
+ var: WithPart<'var'>;
127
+ video: WithPart<'video'>;
128
+ wbr: WithPart<'wbr'>;
129
+ webview: WithPart<'webview'>;
130
130
 
131
- // SVG
132
- svg: WithPart<'svg'>;
131
+ // SVG
132
+ svg: WithPart<'svg'>;
133
133
 
134
- animate: WithPart<'animate'>;
135
- animateMotion: WithPart<'animateMotion'>;
136
- animateTransform: WithPart<'animateTransform'>;
137
- circle: WithPart<'circle'>;
138
- clipPath: WithPart<'clipPath'>;
139
- defs: WithPart<'defs'>;
140
- desc: WithPart<'desc'>;
141
- ellipse: WithPart<'ellipse'>;
142
- feBlend: WithPart<'feBlend'>;
143
- feColorMatrix: WithPart<'feColorMatrix'>;
144
- feComponentTransfer: WithPart<'feComponentTransfer'>;
145
- feComposite: WithPart<'feComposite'>;
146
- feConvolveMatrix: WithPart<'feConvolveMatrix'>;
147
- feDiffuseLighting: WithPart<'feDiffuseLighting'>;
148
- feDisplacementMap: WithPart<'feDisplacementMap'>;
149
- feDistantLight: WithPart<'feDistantLight'>;
150
- feDropShadow: WithPart<'feDropShadow'>;
151
- feFlood: WithPart<'feFlood'>;
152
- feFuncA: WithPart<'feFuncA'>;
153
- feFuncB: WithPart<'feFuncB'>;
154
- feFuncG: WithPart<'feFuncG'>;
155
- feFuncR: WithPart<'feFuncR'>;
156
- feGaussianBlur: WithPart<'feGaussianBlur'>;
157
- feImage: WithPart<'feImage'>;
158
- feMerge: WithPart<'feMerge'>;
159
- feMergeNode: WithPart<'feMergeNode'>;
160
- feMorphology: WithPart<'feMorphology'>;
161
- feOffset: WithPart<'feOffset'>;
162
- fePointLight: WithPart<'fePointLight'>;
163
- feSpecularLighting: WithPart<'feSpecularLighting'>;
164
- feSpotLight: WithPart<'feSpotLight'>;
165
- feTile: WithPart<'feTile'>;
166
- feTurbulence: WithPart<'feTurbulence'>;
167
- filter: WithPart<'filter'>;
168
- foreignObject: WithPart<'foreignObject'>;
169
- g: WithPart<'g'>;
170
- image: WithPart<'image'>;
171
- line: WithPart<'line'>;
172
- linearGradient: WithPart<'linearGradient'>;
173
- marker: WithPart<'marker'>;
174
- mask: WithPart<'mask'>;
175
- metadata: WithPart<'metadata'>;
176
- mpath: WithPart<'mpath'>;
177
- path: WithPart<'path'>;
178
- pattern: WithPart<'pattern'>;
179
- polygon: WithPart<'polygon'>;
180
- polyline: WithPart<'polyline'>;
181
- radialGradient: WithPart<'radialGradient'>;
182
- rect: WithPart<'rect'>;
183
- set: WithPart<'set'>;
184
- stop: WithPart<'stop'>;
185
- switch: WithPart<'switch'>;
186
- symbol: WithPart<'symbol'>;
187
- text: WithPart<'text'>;
188
- textPath: WithPart<'textPath'>;
189
- tspan: WithPart<'tspan'>;
190
- use: WithPart<'use'>;
191
- view: WithPart<'view'>;
192
- }
134
+ animate: WithPart<'animate'>;
135
+ animateMotion: WithPart<'animateMotion'>;
136
+ animateTransform: WithPart<'animateTransform'>;
137
+ circle: WithPart<'circle'>;
138
+ clipPath: WithPart<'clipPath'>;
139
+ defs: WithPart<'defs'>;
140
+ desc: WithPart<'desc'>;
141
+ ellipse: WithPart<'ellipse'>;
142
+ feBlend: WithPart<'feBlend'>;
143
+ feColorMatrix: WithPart<'feColorMatrix'>;
144
+ feComponentTransfer: WithPart<'feComponentTransfer'>;
145
+ feComposite: WithPart<'feComposite'>;
146
+ feConvolveMatrix: WithPart<'feConvolveMatrix'>;
147
+ feDiffuseLighting: WithPart<'feDiffuseLighting'>;
148
+ feDisplacementMap: WithPart<'feDisplacementMap'>;
149
+ feDistantLight: WithPart<'feDistantLight'>;
150
+ feDropShadow: WithPart<'feDropShadow'>;
151
+ feFlood: WithPart<'feFlood'>;
152
+ feFuncA: WithPart<'feFuncA'>;
153
+ feFuncB: WithPart<'feFuncB'>;
154
+ feFuncG: WithPart<'feFuncG'>;
155
+ feFuncR: WithPart<'feFuncR'>;
156
+ feGaussianBlur: WithPart<'feGaussianBlur'>;
157
+ feImage: WithPart<'feImage'>;
158
+ feMerge: WithPart<'feMerge'>;
159
+ feMergeNode: WithPart<'feMergeNode'>;
160
+ feMorphology: WithPart<'feMorphology'>;
161
+ feOffset: WithPart<'feOffset'>;
162
+ fePointLight: WithPart<'fePointLight'>;
163
+ feSpecularLighting: WithPart<'feSpecularLighting'>;
164
+ feSpotLight: WithPart<'feSpotLight'>;
165
+ feTile: WithPart<'feTile'>;
166
+ feTurbulence: WithPart<'feTurbulence'>;
167
+ filter: WithPart<'filter'>;
168
+ foreignObject: WithPart<'foreignObject'>;
169
+ g: WithPart<'g'>;
170
+ image: WithPart<'image'>;
171
+ line: WithPart<'line'>;
172
+ linearGradient: WithPart<'linearGradient'>;
173
+ marker: WithPart<'marker'>;
174
+ mask: WithPart<'mask'>;
175
+ metadata: WithPart<'metadata'>;
176
+ mpath: WithPart<'mpath'>;
177
+ path: WithPart<'path'>;
178
+ pattern: WithPart<'pattern'>;
179
+ polygon: WithPart<'polygon'>;
180
+ polyline: WithPart<'polyline'>;
181
+ radialGradient: WithPart<'radialGradient'>;
182
+ rect: WithPart<'rect'>;
183
+ set: WithPart<'set'>;
184
+ stop: WithPart<'stop'>;
185
+ switch: WithPart<'switch'>;
186
+ symbol: WithPart<'symbol'>;
187
+ text: WithPart<'text'>;
188
+ textPath: WithPart<'textPath'>;
189
+ tspan: WithPart<'tspan'>;
190
+ use: WithPart<'use'>;
191
+ view: WithPart<'view'>;
192
+ }
193
193
  }
@@ -1,31 +1,31 @@
1
- import { ClassDeclaration, ClassProperty, ClassBody, ClassMethod, File } from '@babel/types';
1
+ import t from '@babel/types';
2
2
  import { ParserOptions } from '@babel/parser';
3
3
 
4
- type Return<T> = void | T | Promise<void | T>;
4
+ type Return<T> = void | T | Promise<void> | Promise<T>;
5
5
  interface TransformerPluginContext {
6
6
  skipped?: boolean;
7
7
  script?: string;
8
8
  assetsDestination?: string;
9
9
  assetsSource?: string;
10
- class?: ClassDeclaration;
11
- classEvents?: Array<ClassProperty>;
12
- classMembers?: ClassBody['body'];
13
- classMethods?: Array<ClassMethod>;
10
+ class?: t.ClassDeclaration;
11
+ classEvents?: t.ClassProperty[];
12
+ classMembers?: t.ClassBody['body'];
13
+ classMethods?: t.ClassMethod[];
14
14
  className?: string;
15
- classProperties?: Array<ClassProperty>;
16
- classStates?: Array<ClassProperty>;
15
+ classProperties?: t.ClassProperty[];
16
+ classStates?: t.ClassProperty[];
17
17
  directoryName?: string;
18
18
  directoryPath?: string;
19
19
  elementKey?: string;
20
20
  elementInterfaceName?: string;
21
21
  elementTagName?: string;
22
- fileAST?: File;
22
+ fileAST?: t.File;
23
23
  fileContent?: string;
24
24
  fileExtension?: string;
25
25
  fileName?: string;
26
26
  filePath?: string;
27
27
  metadata?: {
28
- [key: string]: any;
28
+ [key: string]: unknown;
29
29
  };
30
30
  readmeContent?: string;
31
31
  readmeExtension?: string;
@@ -40,95 +40,100 @@ interface TransformerPluginContext {
40
40
  interface TransformerPluginGlobal {
41
41
  contexts: Array<TransformerPluginContext>;
42
42
  metadata?: {
43
- [key: string]: any;
43
+ [key: string]: unknown;
44
44
  };
45
45
  }
46
46
  interface TransformerPlugin {
47
47
  name: string;
48
- options?: any;
48
+ options?: unknown;
49
49
  start?: (global: TransformerPluginGlobal) => Return<TransformerPluginGlobal>;
50
50
  run?: (context: TransformerPluginContext, global: TransformerPluginGlobal) => Return<TransformerPluginContext>;
51
51
  finish?: (global: TransformerPluginGlobal) => Return<TransformerPluginGlobal>;
52
52
  }
53
-
54
- declare const transformer: (...plugins: TransformerPlugin[]) => {
55
- global: TransformerPluginGlobal;
56
- start: () => Promise<void>;
57
- run: (filePath: string) => Promise<TransformerPluginContext>;
58
- finish: () => Promise<void>;
53
+ type InvertOptional<T> = {
54
+ [K in keyof T as undefined extends T[K] ? K : never]-?: T[K];
55
+ } & {
56
+ [K in keyof T as undefined extends T[K] ? never : K]?: T[K];
59
57
  };
60
58
 
61
- declare const ASSETS_OPTIONS: Partial<AssetsOptions>;
59
+ declare const ASSETS_OPTIONS: InvertOptional<AssetsOptions>;
62
60
  interface AssetsOptions {
63
61
  destination?: (context: TransformerPluginContext) => string;
64
62
  source?: (context: TransformerPluginContext) => string;
65
63
  json?: (context: TransformerPluginContext) => string;
66
64
  }
67
- declare const assets: (options?: AssetsOptions) => TransformerPlugin;
65
+ declare const assets: (userOptions?: AssetsOptions) => TransformerPlugin;
68
66
 
69
- declare const COPY_OPTIONS: Partial<CopyOptions>;
67
+ declare const COPY_OPTIONS: InvertOptional<CopyOptions>;
70
68
  interface CopyOptions {
71
69
  at?: 'start' | 'run' | 'finish';
72
70
  destination: string;
73
71
  source: string;
74
72
  transformer?: (content: string) => string;
75
73
  }
76
- declare const copy: (options: CopyOptions) => TransformerPlugin;
74
+ declare const copy: (userOptions: CopyOptions) => TransformerPlugin;
77
75
 
78
- declare const CUSTOM_ELEMENT_OPTIONS: Partial<CustomElementOptions>;
76
+ declare const CUSTOM_ELEMENT_OPTIONS: InvertOptional<CustomElementOptions>;
79
77
  interface CustomElementOptions {
80
78
  prefix?: string;
81
79
  typings?: boolean;
82
80
  }
83
- declare const customElement: (options?: CustomElementOptions) => TransformerPlugin;
81
+ declare const customElement: (userOptions?: CustomElementOptions) => TransformerPlugin;
84
82
 
85
- declare const DOCUMENT_OPTIONS: Partial<DocumentOptions>;
83
+ declare const DOCUMENT_OPTIONS: InvertOptional<DocumentOptions>;
86
84
  interface DocumentOptions {
87
- destination: string;
88
- transformer?: (context: TransformerPluginContext, element: any) => any;
85
+ destination?: string;
86
+ transformer?: (context: TransformerPluginContext, element: unknown) => unknown;
89
87
  }
90
- declare const document: (options?: DocumentOptions) => TransformerPlugin;
88
+ declare const document: (userOptions?: DocumentOptions) => TransformerPlugin;
91
89
 
92
90
  declare const extract: () => TransformerPlugin;
93
91
 
94
- declare const PARSE_OPTIONS: Partial<ParseOptions>;
92
+ declare const PARSE_OPTIONS: ParseOptions;
95
93
  interface ParseOptions extends ParserOptions {
96
94
  }
97
- declare const parse: (options?: ParseOptions) => TransformerPlugin;
95
+ declare const parse: (userOptions?: ParseOptions) => TransformerPlugin;
98
96
 
99
97
  declare const read: () => TransformerPlugin;
100
98
 
101
- declare const README_OPTIONS: Partial<ReadmeOptions>;
99
+ declare const README_OPTIONS: InvertOptional<ReadmeOptions>;
102
100
  interface ReadmeOptions {
103
101
  source?: (context: TransformerPluginContext) => string;
104
102
  }
105
- declare const readme: (options?: ReadmeOptions) => TransformerPlugin;
103
+ declare const readme: (userOptions?: ReadmeOptions) => TransformerPlugin;
106
104
 
107
- declare const STYLE_OPTIONS: Partial<StyleOptions>;
105
+ declare const STYLE_OPTIONS: InvertOptional<StyleOptions>;
108
106
  interface StyleOptions {
109
107
  source?: (context: TransformerPluginContext) => string | string[];
110
108
  }
111
- declare const style: (options?: StyleOptions) => TransformerPlugin;
109
+ declare const style: (userOptions?: StyleOptions) => TransformerPlugin;
112
110
 
113
111
  declare const validate: () => TransformerPlugin;
114
112
 
115
- declare const VISUAL_STUDIO_CODE_OPTIONS: Partial<VisualStudioCodeOptions>;
113
+ declare const VISUAL_STUDIO_CODE_OPTIONS: InvertOptional<VisualStudioCodeOptions>;
116
114
  interface VisualStudioCodeOptions {
117
115
  destination?: string;
118
116
  reference?: (context: TransformerPluginContext) => string;
119
117
  transformer?: (context: TransformerPluginContext, element: any) => any;
120
118
  }
121
- declare const visualStudioCode: (options?: VisualStudioCodeOptions) => TransformerPlugin;
119
+ declare const visualStudioCode: (userOptions?: VisualStudioCodeOptions) => TransformerPlugin;
122
120
 
123
- declare const WEB_TYPES_OPTIONS: Partial<WebTypesOptions>;
121
+ declare const WEB_TYPES_OPTIONS: InvertOptional<WebTypesOptions>;
124
122
  interface WebTypesOptions {
125
123
  destination?: string;
126
124
  packageName?: string;
127
125
  packageVersion?: string;
128
126
  reference?: (context: TransformerPluginContext) => string;
129
- transformer?: (context: TransformerPluginContext, element: any) => any;
127
+ transformer?: (context: TransformerPluginContext, element: unknown) => unknown;
130
128
  }
131
- declare const webTypes: (options?: WebTypesOptions) => TransformerPlugin;
129
+ declare const webTypes: (userOptions?: WebTypesOptions) => TransformerPlugin;
130
+
131
+ declare const transformer: (...plugins: TransformerPlugin[]) => {
132
+ global: TransformerPluginGlobal;
133
+ start: () => Promise<void>;
134
+ run: (filePath: string) => Promise<TransformerPluginContext>;
135
+ finish: () => Promise<void>;
136
+ };
132
137
 
133
138
  export { ASSETS_OPTIONS, COPY_OPTIONS, CUSTOM_ELEMENT_OPTIONS, DOCUMENT_OPTIONS, PARSE_OPTIONS, README_OPTIONS, STYLE_OPTIONS, VISUAL_STUDIO_CODE_OPTIONS, WEB_TYPES_OPTIONS, assets, copy, customElement, document, extract, parse, read, readme, style, transformer, validate, visualStudioCode, webTypes };
134
- export type { AssetsOptions, CopyOptions, CustomElementOptions, DocumentOptions, ParseOptions, ReadmeOptions, StyleOptions, TransformerPlugin, TransformerPluginContext, TransformerPluginGlobal, VisualStudioCodeOptions, WebTypesOptions };
139
+ export type { AssetsOptions, CopyOptions, CustomElementOptions, DocumentOptions, InvertOptional, ParseOptions, ReadmeOptions, StyleOptions, TransformerPlugin, TransformerPluginContext, TransformerPluginGlobal, VisualStudioCodeOptions, WebTypesOptions };