Skip to content

Commit 182aaee

Browse files
committed
Update definitions
1 parent dfb6a35 commit 182aaee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10490
-14617
lines changed

packages/ui-extensions/src/surfaces/admin/components.d.ts

Lines changed: 3808 additions & 5589 deletions
Large diffs are not rendered by default.
Lines changed: 73 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
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

2731
export type Styles = string;
2832
export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
29-
ShadowRoot: (element: any) => ComponentChild;
30-
styles?: Styles;
33+
ShadowRoot: (element: any) => ComponentChild;
34+
styles?: Styles;
3135
};
3236
export 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
}
3842
export 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
*/
4953
declare const BaseClass: typeof globalThis.HTMLElement;
5054
declare 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
}
9590
declare global {
96-
interface HTMLElementTagNameMap {
97-
[tagName]: AdminAction;
98-
}
91+
interface HTMLElementTagNameMap {
92+
[tagName]: AdminAction;
93+
}
9994
}
10095
declare 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 };
Lines changed: 66 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
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 {AdminBlockProps$1, ComponentChild} from './shared.d.ts';
14+
import type {AdminBlockProps$1,ComponentChild} from './shared.d.ts';
915

10-
export interface AdminBlockProps
11-
extends Pick<AdminBlockProps$1, 'heading' | 'collapsedSummary'> {}
16+
export interface AdminBlockProps extends Pick<AdminBlockProps$1, 'heading' | 'collapsedSummary'> {
17+
}
1218

13-
declare const tagName = 's-admin-block';
14-
export interface AdminBlockJSXProps
15-
extends Partial<AdminBlockProps>,
16-
Pick<AdminBlockProps$1, 'id'> {}
19+
declare const tagName = "s-admin-block";
20+
export interface AdminBlockJSXProps extends Partial<AdminBlockProps>, Pick<AdminBlockProps$1, 'id'> {
21+
}
1722

1823
export type Styles = string;
1924
export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
20-
ShadowRoot: (element: any) => ComponentChild;
21-
styles?: Styles;
25+
ShadowRoot: (element: any) => ComponentChild;
26+
styles?: Styles;
2227
};
2328
export interface ActivationEventEsque {
24-
shiftKey: boolean;
25-
metaKey: boolean;
26-
ctrlKey: boolean;
27-
button: number;
29+
shiftKey: boolean;
30+
metaKey: boolean;
31+
ctrlKey: boolean;
32+
button: number;
2833
}
2934
export interface ClickOptions {
30-
/**
31-
* The event you want to influence the synthetic click.
32-
*/
33-
sourceEvent?: ActivationEventEsque;
35+
/**
36+
* The event you want to influence the synthetic click.
37+
*/
38+
sourceEvent?: ActivationEventEsque;
3439
}
3540
/**
3641
* Base class for creating custom elements with Preact.
@@ -39,66 +44,53 @@ export interface ClickOptions {
3944
*/
4045
declare const BaseClass: typeof globalThis.HTMLElement;
4146
declare abstract class PreactCustomElement extends BaseClass {
42-
/** @private */
43-
static get observedAttributes(): string[];
44-
constructor({
45-
styles,
46-
ShadowRoot: renderFunction,
47-
delegatesFocus,
48-
...options
49-
}: RenderImpl);
50-
51-
/** @private */
52-
setAttribute(name: string, value: string): void;
53-
/** @private */
54-
attributeChangedCallback(name: string): void;
55-
/** @private */
56-
connectedCallback(): void;
57-
/** @private */
58-
disconnectedCallback(): void;
59-
/** @private */
60-
adoptedCallback(): void;
61-
/**
62-
* Queue a run of the render function.
63-
* You shouldn't need to call this manually - it should be handled by changes to @property values.
64-
* @private
65-
*/
66-
queueRender(): void;
67-
/**
68-
* Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
69-
*
70-
* For example, if the `sourceEvent` was a middle click, or has particular keys held down,
71-
* components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
72-
* @private
73-
* @param options
74-
*/
75-
click({sourceEvent}?: ClickOptions): void;
47+
/** @private */
48+
static get observedAttributes(): string[];
49+
constructor({ styles, ShadowRoot: renderFunction, delegatesFocus, ...options }: RenderImpl);
50+
/** @private */
51+
setAttribute(name: string, value: string): void;
52+
/** @private */
53+
attributeChangedCallback(name: string): void;
54+
/** @private */
55+
connectedCallback(): void;
56+
/** @private */
57+
disconnectedCallback(): void;
58+
/** @private */
59+
adoptedCallback(): void;
60+
/**
61+
* Queue a run of the render function.
62+
* You shouldn't need to call this manually - it should be handled by changes to @property values.
63+
* @private
64+
*/
65+
queueRender(): void;
66+
/**
67+
* Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
68+
*
69+
* For example, if the `sourceEvent` was a middle click, or has particular keys held down,
70+
* components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
71+
* @private
72+
* @param options
73+
*/
74+
click({ sourceEvent }?: ClickOptions): void;
7675
}
7776

78-
declare class AdminBlock
79-
extends PreactCustomElement
80-
implements AdminBlockProps
81-
{
82-
heading: string;
83-
collapsedSummary: string;
84-
constructor();
77+
declare class AdminBlock extends PreactCustomElement implements AdminBlockProps {
78+
heading: string;
79+
collapsedSummary: string;
80+
constructor();
8581
}
8682
declare global {
87-
interface HTMLElementTagNameMap {
88-
[tagName]: AdminBlock;
89-
}
83+
interface HTMLElementTagNameMap {
84+
[tagName]: AdminBlock;
85+
}
9086
}
9187
declare module 'preact' {
92-
namespace createElement.JSX {
93-
interface IntrinsicElements {
94-
[tagName]: Omit<
95-
HTMLAttributes<HTMLElement>,
96-
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
97-
> &
98-
AdminBlockJSXProps;
88+
namespace createElement.JSX {
89+
interface IntrinsicElements {
90+
[tagName]: Omit<HTMLAttributes<HTMLElement>, Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>> & AdminBlockJSXProps;
91+
}
9992
}
100-
}
10193
}
10294

103-
export {AdminBlock};
104-
export type {AdminBlockJSXProps};
95+
export { AdminBlock };
96+
export type { AdminBlockJSXProps };

0 commit comments

Comments
 (0)