thunderous 0.4.2 → 0.5.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/dist/index.cjs +1000 -34
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +1000 -24
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
@@ -98,11 +98,16 @@ type RenderFunction<Props extends CustomElementProps> = (args: RenderArgs<Props>
|
|
98
98
|
*/
|
99
99
|
declare const customElement: <Props extends CustomElementProps>(render: RenderFunction<Props>, options?: Partial<RenderOptions>) => ElementResult;
|
100
100
|
type Registry = {
|
101
|
-
register: (tagName: string, element: CustomElementConstructor) => void;
|
102
|
-
getTagName: (element: CustomElementConstructor) => string | undefined;
|
101
|
+
register: (tagName: string, element: CustomElementConstructor | ElementResult) => void;
|
102
|
+
getTagName: (element: CustomElementConstructor | ElementResult) => string | undefined;
|
103
103
|
};
|
104
104
|
/**
|
105
105
|
* Create a registry for custom elements.
|
106
|
+
*
|
107
|
+
* This allows you to delegate custom element definitions to the consumer of your library,
|
108
|
+
* by using their associated classes to look up tag names dynamically.
|
109
|
+
*
|
110
|
+
* This can be useful when you need to select a custom element whose tag name is variable.
|
106
111
|
* @example
|
107
112
|
* ```ts
|
108
113
|
* const registry = createRegistry();
|
package/dist/index.d.ts
CHANGED
@@ -98,11 +98,16 @@ type RenderFunction<Props extends CustomElementProps> = (args: RenderArgs<Props>
|
|
98
98
|
*/
|
99
99
|
declare const customElement: <Props extends CustomElementProps>(render: RenderFunction<Props>, options?: Partial<RenderOptions>) => ElementResult;
|
100
100
|
type Registry = {
|
101
|
-
register: (tagName: string, element: CustomElementConstructor) => void;
|
102
|
-
getTagName: (element: CustomElementConstructor) => string | undefined;
|
101
|
+
register: (tagName: string, element: CustomElementConstructor | ElementResult) => void;
|
102
|
+
getTagName: (element: CustomElementConstructor | ElementResult) => string | undefined;
|
103
103
|
};
|
104
104
|
/**
|
105
105
|
* Create a registry for custom elements.
|
106
|
+
*
|
107
|
+
* This allows you to delegate custom element definitions to the consumer of your library,
|
108
|
+
* by using their associated classes to look up tag names dynamically.
|
109
|
+
*
|
110
|
+
* This can be useful when you need to select a custom element whose tag name is variable.
|
106
111
|
* @example
|
107
112
|
* ```ts
|
108
113
|
* const registry = createRegistry();
|