@shopify/ui-extensions 2026.1.0-rc.2 → 2026.1.0-rc.3
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/build/ts/surfaces/admin/components/Choice.d.ts +17 -62
- package/build/ts/surfaces/admin/components/shared.d.ts +102 -3
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/admin/components/Choice.d.ts +17 -62
- package/src/surfaces/admin/components/shared.d.ts +102 -3
- package/src/surfaces/admin/components.d.ts +517 -389
- package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +1 -0
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** VERSION: 1.
|
|
1
|
+
/** VERSION: 1.28.3 **/
|
|
2
2
|
/* eslint-disable import/extensions */
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-namespace */
|
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
8
8
|
/// <reference lib="DOM" />
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
ComponentChildren,
|
|
11
|
+
ChoiceProps$1,
|
|
12
|
+
PreactCustomElement,
|
|
13
|
+
RenderImpl,
|
|
14
|
+
} from './shared.d.ts';
|
|
10
15
|
|
|
11
16
|
export interface ChoiceProps
|
|
12
17
|
extends Required<
|
|
@@ -20,64 +25,8 @@ export interface ChoiceProps
|
|
|
20
25
|
>
|
|
21
26
|
> {}
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
ShadowRoot: (element: any) => ComponentChildren;
|
|
26
|
-
styles?: Styles;
|
|
27
|
-
};
|
|
28
|
-
export interface ActivationEventEsque {
|
|
29
|
-
shiftKey: boolean;
|
|
30
|
-
metaKey: boolean;
|
|
31
|
-
ctrlKey: boolean;
|
|
32
|
-
button: number;
|
|
33
|
-
}
|
|
34
|
-
export interface ClickOptions {
|
|
35
|
-
/**
|
|
36
|
-
* The event you want to influence the synthetic click.
|
|
37
|
-
*/
|
|
38
|
-
sourceEvent?: ActivationEventEsque;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Base class for creating custom elements with Preact.
|
|
42
|
-
* While this class could be used in both Node and the browser, the constructor will only be used in the browser.
|
|
43
|
-
* So we give it a type of HTMLElement to avoid typing issues later where it's used, which will only happen in the browser.
|
|
44
|
-
*/
|
|
45
|
-
declare const BaseClass: typeof globalThis.HTMLElement;
|
|
46
|
-
declare abstract class PreactCustomElement extends BaseClass {
|
|
47
|
-
/** @private */
|
|
48
|
-
static get observedAttributes(): string[];
|
|
49
|
-
constructor({
|
|
50
|
-
styles,
|
|
51
|
-
ShadowRoot: renderFunction,
|
|
52
|
-
delegatesFocus,
|
|
53
|
-
...options
|
|
54
|
-
}: RenderImpl);
|
|
55
|
-
|
|
56
|
-
/** @private */
|
|
57
|
-
setAttribute(name: string, value: string): void;
|
|
58
|
-
/** @private */
|
|
59
|
-
attributeChangedCallback(name: string): void;
|
|
60
|
-
/** @private */
|
|
61
|
-
connectedCallback(): void;
|
|
62
|
-
/** @private */
|
|
63
|
-
disconnectedCallback(): void;
|
|
64
|
-
/** @private */
|
|
65
|
-
adoptedCallback(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Queue a run of the render function.
|
|
68
|
-
* You shouldn't need to call this manually - it should be handled by changes to @property values.
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
queueRender(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
|
|
74
|
-
*
|
|
75
|
-
* For example, if the `sourceEvent` was a middle click, or has particular keys held down,
|
|
76
|
-
* components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
|
|
77
|
-
* @private
|
|
78
|
-
* @param options
|
|
79
|
-
*/
|
|
80
|
-
click({sourceEvent}?: ClickOptions): void;
|
|
28
|
+
declare class PolarisCustomElement extends PreactCustomElement {
|
|
29
|
+
constructor(renderImpl: Omit<RenderImpl, 'globalShadowCSS'>);
|
|
81
30
|
}
|
|
82
31
|
|
|
83
32
|
/** Used when an element does not have children. */
|
|
@@ -95,7 +44,7 @@ export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
|
95
44
|
children?: preact.ComponentChildren;
|
|
96
45
|
}
|
|
97
46
|
|
|
98
|
-
declare class Choice extends
|
|
47
|
+
declare class Choice extends PolarisCustomElement implements ChoiceProps {
|
|
99
48
|
accessor disabled: ChoiceProps['disabled'];
|
|
100
49
|
get selected(): boolean;
|
|
101
50
|
set selected(selected: ChoiceProps['selected']);
|
|
@@ -116,7 +65,7 @@ declare global {
|
|
|
116
65
|
declare module 'preact' {
|
|
117
66
|
namespace createElement.JSX {
|
|
118
67
|
interface IntrinsicElements {
|
|
119
|
-
[tagName]: Omit<ChoiceJSXProps, 'details'> &
|
|
68
|
+
[tagName]: Omit<ChoiceJSXProps, 'details' | 'secondaryContent'> &
|
|
120
69
|
PreactBaseElementPropsWithChildren<Choice>;
|
|
121
70
|
}
|
|
122
71
|
}
|
|
@@ -143,6 +92,12 @@ export interface ChoiceJSXProps
|
|
|
143
92
|
* @implementation this content should be linked to the input with an `aria-describedby` attribute.
|
|
144
93
|
*/
|
|
145
94
|
details?: ComponentChildren;
|
|
95
|
+
/**
|
|
96
|
+
* Additional content to display below the choice label.
|
|
97
|
+
* Can include rich content like TextFields, Buttons, or other interactive components.
|
|
98
|
+
* Event handlers on React components are preserved.
|
|
99
|
+
*/
|
|
100
|
+
secondaryContent?: ComponentChildren;
|
|
146
101
|
}
|
|
147
102
|
|
|
148
103
|
export {Choice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** VERSION: 1.
|
|
1
|
+
/** VERSION: 1.28.3 **/
|
|
2
2
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
4
4
|
|
|
@@ -164,11 +164,11 @@ export interface ExtendableEvent extends Event {
|
|
|
164
164
|
*/
|
|
165
165
|
waitUntil?: (promise: Promise<void>) => void;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
interface AggregateError$1<T extends Error> extends Error {
|
|
168
168
|
errors: T[];
|
|
169
169
|
}
|
|
170
170
|
export interface AggregateErrorEvent<T extends Error> extends ErrorEvent {
|
|
171
|
-
error: AggregateError<T>;
|
|
171
|
+
error: AggregateError$1<T>;
|
|
172
172
|
}
|
|
173
173
|
export type SizeKeyword =
|
|
174
174
|
| 'small-500'
|
|
@@ -261,6 +261,7 @@ declare const privateIconArray: readonly [
|
|
|
261
261
|
'alert-octagon-filled',
|
|
262
262
|
'alert-triangle',
|
|
263
263
|
'alert-triangle-filled',
|
|
264
|
+
'align-horizontal-centers',
|
|
264
265
|
'app-extension',
|
|
265
266
|
'apps',
|
|
266
267
|
'archive',
|
|
@@ -3245,6 +3246,38 @@ interface PopoverProps$1
|
|
|
3245
3246
|
*/
|
|
3246
3247
|
children?: ComponentChildren;
|
|
3247
3248
|
}
|
|
3249
|
+
interface PressButtonProps$1
|
|
3250
|
+
extends GlobalProps,
|
|
3251
|
+
Pick<
|
|
3252
|
+
ButtonProps$1,
|
|
3253
|
+
| 'accessibilityLabel'
|
|
3254
|
+
| 'children'
|
|
3255
|
+
| 'icon'
|
|
3256
|
+
| 'inlineSize'
|
|
3257
|
+
| 'lang'
|
|
3258
|
+
| 'tone'
|
|
3259
|
+
| 'variant'
|
|
3260
|
+
| 'disabled'
|
|
3261
|
+
| 'loading'
|
|
3262
|
+
| 'onClick'
|
|
3263
|
+
| 'onBlur'
|
|
3264
|
+
| 'onFocus'
|
|
3265
|
+
> {
|
|
3266
|
+
/**
|
|
3267
|
+
* Whether the button is pressed.
|
|
3268
|
+
*
|
|
3269
|
+
* @default false
|
|
3270
|
+
*/
|
|
3271
|
+
pressed?: boolean;
|
|
3272
|
+
/**
|
|
3273
|
+
* Whether the button is pressed by default.
|
|
3274
|
+
*
|
|
3275
|
+
* @default false
|
|
3276
|
+
*
|
|
3277
|
+
* @implementation `defaultPressed` reflects to the `pressed` attribute.
|
|
3278
|
+
*/
|
|
3279
|
+
defaultPressed?: boolean;
|
|
3280
|
+
}
|
|
3248
3281
|
interface QueryContainerProps$1 extends GlobalProps {
|
|
3249
3282
|
/**
|
|
3250
3283
|
* The content of the container.
|
|
@@ -3803,6 +3836,70 @@ export interface Context<T> extends Provider<T> {
|
|
|
3803
3836
|
Provider: Provider<T>;
|
|
3804
3837
|
displayName?: string;
|
|
3805
3838
|
}
|
|
3839
|
+
export type Styles = string;
|
|
3840
|
+
declare const shadowRootSymbol: unique symbol;
|
|
3841
|
+
export type RenderImpl = Omit<ShadowRootInit, 'mode'> & {
|
|
3842
|
+
ShadowRoot: (element: any) => ComponentChildren$1;
|
|
3843
|
+
styles?: Styles;
|
|
3844
|
+
/**
|
|
3845
|
+
* Only needed once in the root element, to inject global shadow CSS for all components.
|
|
3846
|
+
*/
|
|
3847
|
+
globalShadowCSS?: Styles;
|
|
3848
|
+
};
|
|
3849
|
+
export interface ActivationEventEsque {
|
|
3850
|
+
shiftKey: boolean;
|
|
3851
|
+
metaKey: boolean;
|
|
3852
|
+
ctrlKey: boolean;
|
|
3853
|
+
button: number;
|
|
3854
|
+
}
|
|
3855
|
+
export interface ClickOptions {
|
|
3856
|
+
/**
|
|
3857
|
+
* The event you want to influence the synthetic click.
|
|
3858
|
+
*/
|
|
3859
|
+
sourceEvent?: ActivationEventEsque;
|
|
3860
|
+
}
|
|
3861
|
+
declare const BaseClass: typeof globalThis.HTMLElement;
|
|
3862
|
+
export declare abstract class PreactCustomElement extends BaseClass {
|
|
3863
|
+
/** @private */
|
|
3864
|
+
#private;
|
|
3865
|
+
/** @private */
|
|
3866
|
+
static get observedAttributes(): string[];
|
|
3867
|
+
/** @private */
|
|
3868
|
+
[shadowRootSymbol]: ShadowRoot | null;
|
|
3869
|
+
constructor({
|
|
3870
|
+
styles,
|
|
3871
|
+
ShadowRoot: renderFunction,
|
|
3872
|
+
delegatesFocus,
|
|
3873
|
+
globalShadowCSS,
|
|
3874
|
+
...options
|
|
3875
|
+
}: RenderImpl);
|
|
3876
|
+
|
|
3877
|
+
/** @private */
|
|
3878
|
+
setAttribute(name: string, value: string): void;
|
|
3879
|
+
/** @private */
|
|
3880
|
+
attributeChangedCallback(name: string): void;
|
|
3881
|
+
/** @private */
|
|
3882
|
+
connectedCallback(): void;
|
|
3883
|
+
/** @private */
|
|
3884
|
+
disconnectedCallback(): void;
|
|
3885
|
+
/** @private */
|
|
3886
|
+
adoptedCallback(): void;
|
|
3887
|
+
/**
|
|
3888
|
+
* Queue a run of the render function.
|
|
3889
|
+
* You shouldn't need to call this manually - it should be handled by changes to @property values.
|
|
3890
|
+
* @private
|
|
3891
|
+
*/
|
|
3892
|
+
queueRender(): void;
|
|
3893
|
+
/**
|
|
3894
|
+
* Like the standard `element.click()`, but you can influence the behavior with a `sourceEvent`.
|
|
3895
|
+
*
|
|
3896
|
+
* For example, if the `sourceEvent` was a middle click, or has particular keys held down,
|
|
3897
|
+
* components will attempt to produce the desired behavior on links, such as opening the page in the background tab.
|
|
3898
|
+
* @private
|
|
3899
|
+
* @param options
|
|
3900
|
+
*/
|
|
3901
|
+
click({sourceEvent}?: ClickOptions): void;
|
|
3902
|
+
}
|
|
3806
3903
|
type IconType$1 =
|
|
3807
3904
|
| 'adjust'
|
|
3808
3905
|
| 'affiliate'
|
|
@@ -3814,6 +3911,7 @@ type IconType$1 =
|
|
|
3814
3911
|
| 'alert-octagon'
|
|
3815
3912
|
| 'alert-octagon-filled'
|
|
3816
3913
|
| 'alert-triangle'
|
|
3914
|
+
| 'align-horizontal-centers'
|
|
3817
3915
|
| 'app-extension'
|
|
3818
3916
|
| 'apps'
|
|
3819
3917
|
| 'archive'
|
|
@@ -4237,6 +4335,7 @@ type IconType$1 =
|
|
|
4237
4335
|
| 'sort-ascending'
|
|
4238
4336
|
| 'sort-descending'
|
|
4239
4337
|
| 'sound'
|
|
4338
|
+
| 'split'
|
|
4240
4339
|
| 'sports'
|
|
4241
4340
|
| 'star'
|
|
4242
4341
|
| 'star-filled'
|