1- import type { AttributeHandler , __attributesToProps } from './decorators/attribute.js' ;
1+ import type { AttributeHandler , AttributePropSpecs , __attributesToProps , __hasAttributeChangedCallback } from './decorators/attribute.js' ;
22import type { DashCasedProps } from './utils.js' ;
33declare const root : unique symbol ;
44declare const LumeElement_base : ( new ( ...a : any [ ] ) => {
@@ -19,10 +19,17 @@ declare class LumeElement extends LumeElement_base {
1919 #private;
2020 /**
2121 * The default tag name of the elements this class instantiates. When using
22- * the `@element` decorator, this property will be set to the value defined
23- * by the decorator.
22+ * the `@element` decorator, if this field has not been specified, it will
23+ * be set to the value defined by the decorator.
2424 */
2525 static elementName : string ;
26+ /**
27+ * When using the @element decorator, the element will be automatically
28+ * defined in the CustomElementRegistry if this is true, otherwise manual
29+ * registration will be needed if false. If autoDefine is passed into the
30+ * decorator, this field will be overriden by that value.
31+ */
32+ static autoDefine : boolean ;
2633 /**
2734 * Define this class for the given element `name`, or using its default name
2835 * (`elementName`) if no `name` given. Defaults to using the global
@@ -38,7 +45,10 @@ declare class LumeElement extends LumeElement_base {
3845 * different subclass of the class this is called on if passing in a custom
3946 * `name`, otherwise returns the same class this is called on.
4047 */
41- static defineElement ( name ?: string , registry ?: CustomElementRegistry ) : CustomElementConstructor ;
48+ static defineElement ( ) : typeof LumeElement ;
49+ static defineElement ( registry : CustomElementRegistry ) : typeof LumeElement ;
50+ static defineElement ( name : string ) : typeof LumeElement ;
51+ static defineElement ( name : string , registry : CustomElementRegistry ) : typeof LumeElement ;
4252 /**
4353 * Non-decorator users can use this to specify a list of attributes, and the
4454 * attributes will automatically be mapped to reactive properties. All
@@ -80,10 +90,9 @@ declare class LumeElement extends LumeElement_base {
8090 */
8191 static observedAttributeHandlers ?: AttributeHandlerMap ;
8292 /** Note, this is internal and used by the @attribute decorator, see attribute.ts. */
83- [ __attributesToProps ] ?: Record < string , {
84- name : string ;
85- attributeHandler ?: AttributeHandler ;
86- } > ;
93+ [ __attributesToProps ] ?: AttributePropSpecs ;
94+ /** Note, this is internal and used by the @attribute decorator, see attribute.ts. */
95+ [ __hasAttributeChangedCallback ] ?: true ;
8796 /**
8897 * This can be used by a subclass, or other frameworks handling elements, to
8998 * detect property values that exist from before custom element upgrade.
0 commit comments