1- /** VERSION: 0.51.0 **/
1+ /** VERSION: 0.51.1 **/
22/* eslint-disable import/extensions */
3-
3+ /* eslint-disable @typescript-eslint/ban-types */
44/* eslint-disable @typescript-eslint/no-namespace */
5-
5+ /* eslint-disable @typescript-eslint/member-ordering */
6+ /* eslint-disable line-comment-position */
7+ /* eslint-disable @typescript-eslint/unified-signatures */
8+ /* eslint-disable no-var */
9+ /* eslint-disable import/no-deprecated */
10+ /* eslint-disable import/namespace */
11+ /* eslint-disable import/no-deprecated */
612// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
713/// <reference lib="DOM" />
8- import type { ComponentChild , AdminActionProps$1 } from './shared.d.ts' ;
14+ import type { ComponentChild , AdminActionProps$1 } from './shared.d.ts' ;
915
10- export interface AdminActionProps
11- extends Pick < AdminActionProps$1 , 'heading' | 'loading' > { }
16+ export interface AdminActionProps extends Pick < AdminActionProps$1 , 'heading' | 'loading' > {
17+ }
1218
13- declare const tagName = 's-admin-action' ;
14- export interface AdminActionJSXProps
15- extends Partial < AdminActionProps > ,
16- Pick < AdminActionProps$1 , 'id' > {
17- /**
18- * The primary action to display in the admin action.
19- */
20- primaryAction : ComponentChild ;
21- /**
22- * The secondary actions to display in the admin action.
23- */
24- secondaryActions : ComponentChild ;
19+ declare const tagName = "s-admin-action" ;
20+ export interface AdminActionJSXProps extends Partial < AdminActionProps > , Pick < AdminActionProps$1 , 'id' > {
21+ /**
22+ * The primary action to display in the admin action.
23+ */
24+ primaryAction : ComponentChild ;
25+ /**
26+ * The secondary actions to display in the admin action.
27+ */
28+ secondaryActions : ComponentChild ;
2529}
2630
2731export type Styles = string ;
2832export type RenderImpl = Omit < ShadowRootInit , 'mode' > & {
29- ShadowRoot : ( element : any ) => ComponentChild ;
30- styles ?: Styles ;
33+ ShadowRoot : ( element : any ) => ComponentChild ;
34+ styles ?: Styles ;
3135} ;
3236export interface ActivationEventEsque {
33- shiftKey : boolean ;
34- metaKey : boolean ;
35- ctrlKey : boolean ;
36- button : number ;
37+ shiftKey : boolean ;
38+ metaKey : boolean ;
39+ ctrlKey : boolean ;
40+ button : number ;
3741}
3842export interface ClickOptions {
39- /**
40- * The event you want to influence the synthetic click.
41- */
42- sourceEvent ?: ActivationEventEsque ;
43+ /**
44+ * The event you want to influence the synthetic click.
45+ */
46+ sourceEvent ?: ActivationEventEsque ;
4347}
4448/**
4549 * Base class for creating custom elements with Preact.
@@ -48,66 +52,53 @@ export interface ClickOptions {
4852 */
4953declare const BaseClass : typeof globalThis . HTMLElement ;
5054declare abstract class PreactCustomElement extends BaseClass {
51- /** @private */
52- static get observedAttributes ( ) : string [ ] ;
53- constructor ( {
54- styles,
55- ShadowRoot : renderFunction ,
56- delegatesFocus,
57- ...options
58- } : RenderImpl ) ;
59-
60- /** @private */
61- setAttribute ( name : string , value : string ) : void ;
62- /** @private */
63- attributeChangedCallback ( name : string ) : void ;
64- /** @private */
65- connectedCallback ( ) : void ;
66- /** @private */
67- disconnectedCallback ( ) : void ;
68- /** @private */
69- adoptedCallback ( ) : void ;
70- /**
71- * Queue a run of the render function.
72- * You shouldn't need to call this manually - it should be handled by changes to @property values.
73- * @private
74- */
75- queueRender ( ) : void ;
76- /**
77- * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
78- *
79- * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
80- * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
81- * @private
82- * @param options
83- */
84- click ( { sourceEvent} ?: ClickOptions ) : void ;
55+ /** @private */
56+ static get observedAttributes ( ) : string [ ] ;
57+ constructor ( { styles, ShadowRoot : renderFunction , delegatesFocus, ...options } : RenderImpl ) ;
58+ /** @private */
59+ setAttribute ( name : string , value : string ) : void ;
60+ /** @private */
61+ attributeChangedCallback ( name : string ) : void ;
62+ /** @private */
63+ connectedCallback ( ) : void ;
64+ /** @private */
65+ disconnectedCallback ( ) : void ;
66+ /** @private */
67+ adoptedCallback ( ) : void ;
68+ /**
69+ * Queue a run of the render function.
70+ * You shouldn't need to call this manually - it should be handled by changes to @property values.
71+ * @private
72+ */
73+ queueRender ( ) : void ;
74+ /**
75+ * Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
76+ *
77+ * For example, if the `sourceEvent` was a middle click, or has particular keys held down,
78+ * components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
79+ * @private
80+ * @param options
81+ */
82+ click ( { sourceEvent } ?: ClickOptions ) : void ;
8583}
8684
87- declare class AdminAction
88- extends PreactCustomElement
89- implements AdminActionProps
90- {
91- heading : string ;
92- loading : boolean ;
93- constructor ( ) ;
85+ declare class AdminAction extends PreactCustomElement implements AdminActionProps {
86+ heading : string ;
87+ loading : boolean ;
88+ constructor ( ) ;
9489}
9590declare global {
96- interface HTMLElementTagNameMap {
97- [ tagName ] : AdminAction ;
98- }
91+ interface HTMLElementTagNameMap {
92+ [ tagName ] : AdminAction ;
93+ }
9994}
10095declare module 'preact' {
101- namespace createElement . JSX {
102- interface IntrinsicElements {
103- [ tagName ] : Omit <
104- HTMLAttributes < HTMLElement > ,
105- Extract < keyof HTMLAttributes < HTMLElement > , `on${Capitalize < string > } `>
106- > &
107- Omit < AdminActionJSXProps , 'primaryAction' | 'secondaryActions' > ;
96+ namespace createElement . JSX {
97+ interface IntrinsicElements {
98+ [ tagName ] : Omit < HTMLAttributes < HTMLElement > , Extract < keyof HTMLAttributes < HTMLElement > , `on${Capitalize < string > } `> > & AdminActionJSXProps ;
99+ }
108100 }
109- }
110101}
111102
112- export { AdminAction } ;
113- export type { AdminActionJSXProps } ;
103+ export { AdminAction } ;
104+ export type { AdminActionJSXProps } ;
0 commit comments