@shopify/ui-extensions 2025.10.0-rc.8 → 2025.10.0-rc.9

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.
Files changed (156) hide show
  1. package/build/ts/surfaces/admin/components/AdminAction.d.ts +1 -1
  2. package/build/ts/surfaces/admin/components/AdminBlock.d.ts +1 -1
  3. package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  4. package/build/ts/surfaces/admin/components/Avatar.d.ts +139 -0
  5. package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
  6. package/build/ts/surfaces/admin/components/Banner.d.ts +1 -1
  7. package/build/ts/surfaces/admin/components/Box.d.ts +1 -1
  8. package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
  9. package/build/ts/surfaces/admin/components/Checkbox.d.ts +1 -1
  10. package/build/ts/surfaces/admin/components/Choice.d.ts +1 -1
  11. package/build/ts/surfaces/admin/components/ChoiceList.d.ts +1 -1
  12. package/build/ts/surfaces/admin/components/Clickable.d.ts +1 -1
  13. package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -1
  14. package/build/ts/surfaces/admin/components/Divider.d.ts +1 -1
  15. package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -1
  16. package/build/ts/surfaces/admin/components/Form.d.ts +1 -1
  17. package/build/ts/surfaces/admin/components/Grid.d.ts +1 -1
  18. package/build/ts/surfaces/admin/components/GridItem.d.ts +1 -1
  19. package/build/ts/surfaces/admin/components/Heading.d.ts +1 -1
  20. package/build/ts/surfaces/admin/components/Icon.d.ts +1 -1
  21. package/build/ts/surfaces/admin/components/Image.d.ts +1 -1
  22. package/build/ts/surfaces/admin/components/Link.d.ts +1 -1
  23. package/build/ts/surfaces/admin/components/ListItem.d.ts +1 -1
  24. package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -1
  25. package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -1
  26. package/build/ts/surfaces/admin/components/Option.d.ts +1 -1
  27. package/build/ts/surfaces/admin/components/OptionGroup.d.ts +1 -1
  28. package/build/ts/surfaces/admin/components/OrderedList.d.ts +1 -1
  29. package/build/ts/surfaces/admin/components/Page.d.ts +1 -1
  30. package/build/ts/surfaces/admin/components/Paragraph.d.ts +1 -1
  31. package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -1
  32. package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -1
  33. package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -1
  34. package/build/ts/surfaces/admin/components/Section.d.ts +1 -1
  35. package/build/ts/surfaces/admin/components/Select.d.ts +1 -1
  36. package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -1
  37. package/build/ts/surfaces/admin/components/Stack.d.ts +1 -1
  38. package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
  39. package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
  40. package/build/ts/surfaces/admin/components/Switch.d.ts +1 -1
  41. package/build/ts/surfaces/admin/components/Table.d.ts +1 -1
  42. package/build/ts/surfaces/admin/components/TableBody.d.ts +1 -1
  43. package/build/ts/surfaces/admin/components/TableCell.d.ts +1 -1
  44. package/build/ts/surfaces/admin/components/TableHeader.d.ts +1 -1
  45. package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  46. package/build/ts/surfaces/admin/components/TableRow.d.ts +1 -1
  47. package/build/ts/surfaces/admin/components/Text.d.ts +1 -1
  48. package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -1
  49. package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
  50. package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -1
  51. package/build/ts/surfaces/admin/components/URLField.d.ts +1 -1
  52. package/build/ts/surfaces/admin/components/UnorderedList.d.ts +1 -1
  53. package/build/ts/surfaces/admin/components/shared.d.ts +195 -160
  54. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +68 -11
  55. package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +68 -11
  56. package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +68 -11
  57. package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +68 -11
  58. package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +68 -11
  59. package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +68 -11
  60. package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +68 -11
  61. package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +68 -11
  62. package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +68 -11
  63. package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +68 -11
  64. package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +68 -11
  65. package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +68 -11
  66. package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +68 -11
  67. package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +68 -11
  68. package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +68 -11
  69. package/build/ts/surfaces/admin/targets/admin.customers.segmentation-templates.render.d.ts +68 -11
  70. package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +68 -11
  71. package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +68 -11
  72. package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +68 -11
  73. package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +68 -11
  74. package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +68 -11
  75. package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +68 -11
  76. package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +68 -11
  77. package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +68 -11
  78. package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +68 -11
  79. package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +68 -11
  80. package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +68 -11
  81. package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +68 -11
  82. package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +68 -11
  83. package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +68 -11
  84. package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +68 -11
  85. package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +68 -11
  86. package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +68 -11
  87. package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +68 -11
  88. package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +68 -11
  89. package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +68 -11
  90. package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +68 -11
  91. package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +68 -11
  92. package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +68 -11
  93. package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +68 -11
  94. package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +68 -11
  95. package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +68 -11
  96. package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +68 -11
  97. package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +68 -11
  98. package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +68 -11
  99. package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +68 -11
  100. package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +68 -11
  101. package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +68 -11
  102. package/build/tsconfig.tsbuildinfo +1 -1
  103. package/package.json +1 -1
  104. package/src/surfaces/admin/components/AdminAction.d.ts +1 -1
  105. package/src/surfaces/admin/components/AdminBlock.d.ts +1 -1
  106. package/src/surfaces/admin/components/AdminPrintAction.d.ts +1 -1
  107. package/src/surfaces/admin/components/Avatar.d.ts +139 -0
  108. package/src/surfaces/admin/components/Badge.d.ts +1 -1
  109. package/src/surfaces/admin/components/Banner.d.ts +1 -1
  110. package/src/surfaces/admin/components/Box.d.ts +1 -1
  111. package/src/surfaces/admin/components/Button.d.ts +1 -1
  112. package/src/surfaces/admin/components/Checkbox.d.ts +1 -1
  113. package/src/surfaces/admin/components/Choice.d.ts +1 -1
  114. package/src/surfaces/admin/components/ChoiceList.d.ts +1 -1
  115. package/src/surfaces/admin/components/Clickable.d.ts +1 -1
  116. package/src/surfaces/admin/components/DatePicker.d.ts +1 -1
  117. package/src/surfaces/admin/components/Divider.d.ts +1 -1
  118. package/src/surfaces/admin/components/EmailField.d.ts +1 -1
  119. package/src/surfaces/admin/components/Form.d.ts +1 -1
  120. package/src/surfaces/admin/components/Grid.d.ts +1 -1
  121. package/src/surfaces/admin/components/GridItem.d.ts +1 -1
  122. package/src/surfaces/admin/components/Heading.d.ts +1 -1
  123. package/src/surfaces/admin/components/Icon.d.ts +1 -1
  124. package/src/surfaces/admin/components/Image.d.ts +1 -1
  125. package/src/surfaces/admin/components/Link.d.ts +1 -1
  126. package/src/surfaces/admin/components/ListItem.d.ts +1 -1
  127. package/src/surfaces/admin/components/MoneyField.d.ts +1 -1
  128. package/src/surfaces/admin/components/NumberField.d.ts +1 -1
  129. package/src/surfaces/admin/components/Option.d.ts +1 -1
  130. package/src/surfaces/admin/components/OptionGroup.d.ts +1 -1
  131. package/src/surfaces/admin/components/OrderedList.d.ts +1 -1
  132. package/src/surfaces/admin/components/Page.d.ts +1 -1
  133. package/src/surfaces/admin/components/Paragraph.d.ts +1 -1
  134. package/src/surfaces/admin/components/PasswordField.d.ts +1 -1
  135. package/src/surfaces/admin/components/QueryContainer.d.ts +1 -1
  136. package/src/surfaces/admin/components/SearchField.d.ts +1 -1
  137. package/src/surfaces/admin/components/Section.d.ts +1 -1
  138. package/src/surfaces/admin/components/Select.d.ts +1 -1
  139. package/src/surfaces/admin/components/Spinner.d.ts +1 -1
  140. package/src/surfaces/admin/components/Stack.d.ts +1 -1
  141. package/src/surfaces/admin/components/StandardComponents.ts +1 -0
  142. package/src/surfaces/admin/components/Switch.d.ts +1 -1
  143. package/src/surfaces/admin/components/Table.d.ts +1 -1
  144. package/src/surfaces/admin/components/TableBody.d.ts +1 -1
  145. package/src/surfaces/admin/components/TableCell.d.ts +1 -1
  146. package/src/surfaces/admin/components/TableHeader.d.ts +1 -1
  147. package/src/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
  148. package/src/surfaces/admin/components/TableRow.d.ts +1 -1
  149. package/src/surfaces/admin/components/Text.d.ts +1 -1
  150. package/src/surfaces/admin/components/TextArea.d.ts +1 -1
  151. package/src/surfaces/admin/components/TextField.d.ts +1 -1
  152. package/src/surfaces/admin/components/Thumbnail.d.ts +1 -1
  153. package/src/surfaces/admin/components/URLField.d.ts +1 -1
  154. package/src/surfaces/admin/components/UnorderedList.d.ts +1 -1
  155. package/src/surfaces/admin/components/shared.d.ts +195 -160
  156. package/src/surfaces/admin/components.d.ts +274 -182
@@ -1,4 +1,4 @@
1
- /** VERSION: 1.1.1 **/
1
+ /** VERSION: 1.2.0 **/
2
2
 
3
3
  /* eslint-disable @typescript-eslint/ban-types */
4
4
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -32,6 +32,41 @@ export type SizeKeyword =
32
32
  | 'large-400'
33
33
  | 'large-500';
34
34
  export type ColorKeyword = 'subdued' | 'base' | 'strong';
35
+ interface AvatarProps$1 extends GlobalProps {
36
+ /**
37
+ * Initials to display in the avatar.
38
+ */
39
+ initials?: string;
40
+ /**
41
+ * The URL or path to the image.
42
+ *
43
+ * Initials will be rendered as a fallback if `src` is not provided, fails to load or does not load quickly
44
+ */
45
+ src?: string;
46
+ /**
47
+ * Invoked when load of provided image completes successfully.
48
+ *
49
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload
50
+ */
51
+ onLoad?: () => void;
52
+ /**
53
+ * Invoked on load error of provided image.
54
+ *
55
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
56
+ */
57
+ onError?: () => void;
58
+ /**
59
+ * Size of the avatar.
60
+ *
61
+ * @default 'base'
62
+ */
63
+ size?: SizeKeyword;
64
+ /**
65
+ * An alternative text that describes the avatar for the reader
66
+ * to understand what it is about or identify the user the avatar belongs to.
67
+ */
68
+ alt?: string;
69
+ }
35
70
  export type BackgroundColorKeyword = 'transparent' | ColorKeyword;
36
71
  export interface BackgroundProps {
37
72
  /**
@@ -3124,6 +3159,165 @@ export type URLAutocompleteField = ExtractStrict<
3124
3159
  AnyAutocompleteField,
3125
3160
  'url' | 'photo' | 'impp' | `${AutocompleteAddressGroup} impp`
3126
3161
  >;
3162
+ //
3163
+ // Preact Virtual DOM
3164
+ // -----------------------------------
3165
+ export interface VNode<P = {}> {
3166
+ type: ComponentType<P> | string;
3167
+ props: P & {
3168
+ children: ComponentChildren$1;
3169
+ };
3170
+ key: Key;
3171
+ /**
3172
+ * ref is not guaranteed by React.ReactElement, for compatibility reasons
3173
+ * with popular react libs we define it as optional too
3174
+ */
3175
+ ref?: Ref<any> | null;
3176
+ /**
3177
+ * The time this `vnode` started rendering. Will only be set when
3178
+ * the devtools are attached.
3179
+ * Default value: `0`
3180
+ */
3181
+ startTime?: number;
3182
+ /**
3183
+ * The time that the rendering of this `vnode` was completed. Will only be
3184
+ * set when the devtools are attached.
3185
+ * Default value: `-1`
3186
+ */
3187
+ endTime?: number;
3188
+ }
3189
+ //
3190
+ // Preact Component interface
3191
+ // -----------------------------------
3192
+ export type Key = string | number | any;
3193
+ export interface RefObject<T> {
3194
+ current: T | null;
3195
+ }
3196
+ export type RefCallback<T> = (instance: T | null) => void;
3197
+ export type Ref<T> = RefObject<T> | RefCallback<T> | null;
3198
+ export type ComponentChild =
3199
+ | VNode<any>
3200
+ | object
3201
+ | string
3202
+ | number
3203
+ | bigint
3204
+ | boolean
3205
+ | null
3206
+ | undefined;
3207
+ type ComponentChildren$1 = ComponentChild[] | ComponentChild;
3208
+ export interface Attributes {
3209
+ key?: Key | undefined;
3210
+ jsx?: boolean | undefined;
3211
+ }
3212
+ export interface ErrorInfo {
3213
+ componentStack?: string;
3214
+ }
3215
+ export type RenderableProps<P, RefType = any> = P &
3216
+ Readonly<
3217
+ Attributes & {
3218
+ children?: ComponentChildren$1;
3219
+ ref?: Ref<RefType>;
3220
+ }
3221
+ >;
3222
+ export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
3223
+ export interface FunctionComponent<P = {}> {
3224
+ (props: RenderableProps<P>, context?: any): ComponentChildren$1;
3225
+ displayName?: string;
3226
+ defaultProps?: Partial<P> | undefined;
3227
+ }
3228
+ export interface ComponentClass<P = {}, S = {}> {
3229
+ new (props: P, context?: any): Component<P, S>;
3230
+ displayName?: string;
3231
+ defaultProps?: Partial<P>;
3232
+ contextType?: Context<any>;
3233
+ getDerivedStateFromProps?(
3234
+ props: Readonly<P>,
3235
+ state: Readonly<S>,
3236
+ ): Partial<S> | null;
3237
+ getDerivedStateFromError?(error: any): Partial<S> | null;
3238
+ }
3239
+ export interface Component<P = {}, S = {}> {
3240
+ componentWillMount?(): void;
3241
+ componentDidMount?(): void;
3242
+ componentWillUnmount?(): void;
3243
+ getChildContext?(): object;
3244
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
3245
+ shouldComponentUpdate?(
3246
+ nextProps: Readonly<P>,
3247
+ nextState: Readonly<S>,
3248
+ nextContext: any,
3249
+ ): boolean;
3250
+ componentWillUpdate?(
3251
+ nextProps: Readonly<P>,
3252
+ nextState: Readonly<S>,
3253
+ nextContext: any,
3254
+ ): void;
3255
+ getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
3256
+ componentDidUpdate?(
3257
+ previousProps: Readonly<P>,
3258
+ previousState: Readonly<S>,
3259
+ snapshot: any,
3260
+ ): void;
3261
+ componentDidCatch?(error: any, errorInfo: ErrorInfo): void;
3262
+ }
3263
+ declare abstract class Component<P, S> {
3264
+ constructor(props?: P, context?: any);
3265
+ static displayName?: string;
3266
+ static defaultProps?: any;
3267
+ static contextType?: Context<any>;
3268
+ // Static members cannot reference class type parameters. This is not
3269
+ // supported in TypeScript. Reusing the same type arguments from `Component`
3270
+ // will lead to an impossible state where one cannot satisfy the type
3271
+ // constraint under no circumstances, see #1356.In general type arguments
3272
+ // seem to be a bit buggy and not supported well at the time of this
3273
+ // writing with TS 3.3.3333.
3274
+ static getDerivedStateFromProps?(
3275
+ props: Readonly<object>,
3276
+ state: Readonly<object>,
3277
+ ): object | null;
3278
+
3279
+ static getDerivedStateFromError?(error: any): object | null;
3280
+ state: Readonly<S>;
3281
+ props: RenderableProps<P>;
3282
+ context: any;
3283
+ base?: Element | Text;
3284
+ // From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
3285
+ // // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
3286
+ // // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
3287
+ setState<K extends keyof S>(
3288
+ state:
3289
+ | ((
3290
+ prevState: Readonly<S>,
3291
+ props: Readonly<P>,
3292
+ ) => Pick<S, K> | Partial<S> | null)
3293
+ | (Pick<S, K> | Partial<S> | null),
3294
+ callback?: () => void,
3295
+ ): void;
3296
+
3297
+ forceUpdate(callback?: () => void): void;
3298
+ abstract render(
3299
+ props?: RenderableProps<P>,
3300
+ state?: Readonly<S>,
3301
+ context?: any,
3302
+ ): ComponentChildren$1;
3303
+ }
3304
+ //
3305
+ // Context
3306
+ // -----------------------------------
3307
+ export interface Consumer<T>
3308
+ extends FunctionComponent<{
3309
+ children: (value: T) => ComponentChildren$1;
3310
+ }> {}
3311
+ export interface Provider<T>
3312
+ extends FunctionComponent<{
3313
+ value: T;
3314
+ children?: ComponentChildren$1;
3315
+ }> {}
3316
+ export interface Context<T> extends Provider<T> {
3317
+ Consumer: Consumer<T>;
3318
+ Provider: Provider<T>;
3319
+ displayName?: string;
3320
+ }
3127
3321
  type IconType$1 =
3128
3322
  | 'adjust'
3129
3323
  | 'affiliate'
@@ -3621,165 +3815,6 @@ type IconType$1 =
3621
3815
  | 'wrench'
3622
3816
  | 'x'
3623
3817
  | 'x-circle';
3624
- //
3625
- // Preact Virtual DOM
3626
- // -----------------------------------
3627
- export interface VNode<P = {}> {
3628
- type: ComponentType<P> | string;
3629
- props: P & {
3630
- children: ComponentChildren$1;
3631
- };
3632
- key: Key;
3633
- /**
3634
- * ref is not guaranteed by React.ReactElement, for compatibility reasons
3635
- * with popular react libs we define it as optional too
3636
- */
3637
- ref?: Ref<any> | null;
3638
- /**
3639
- * The time this `vnode` started rendering. Will only be set when
3640
- * the devtools are attached.
3641
- * Default value: `0`
3642
- */
3643
- startTime?: number;
3644
- /**
3645
- * The time that the rendering of this `vnode` was completed. Will only be
3646
- * set when the devtools are attached.
3647
- * Default value: `-1`
3648
- */
3649
- endTime?: number;
3650
- }
3651
- //
3652
- // Preact Component interface
3653
- // -----------------------------------
3654
- export type Key = string | number | any;
3655
- export interface RefObject<T> {
3656
- current: T | null;
3657
- }
3658
- export type RefCallback<T> = (instance: T | null) => void;
3659
- export type Ref<T> = RefObject<T> | RefCallback<T> | null;
3660
- export type ComponentChild =
3661
- | VNode<any>
3662
- | object
3663
- | string
3664
- | number
3665
- | bigint
3666
- | boolean
3667
- | null
3668
- | undefined;
3669
- type ComponentChildren$1 = ComponentChild[] | ComponentChild;
3670
- export interface Attributes {
3671
- key?: Key | undefined;
3672
- jsx?: boolean | undefined;
3673
- }
3674
- export interface ErrorInfo {
3675
- componentStack?: string;
3676
- }
3677
- export type RenderableProps<P, RefType = any> = P &
3678
- Readonly<
3679
- Attributes & {
3680
- children?: ComponentChildren$1;
3681
- ref?: Ref<RefType>;
3682
- }
3683
- >;
3684
- export type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
3685
- export interface FunctionComponent<P = {}> {
3686
- (props: RenderableProps<P>, context?: any): ComponentChildren$1;
3687
- displayName?: string;
3688
- defaultProps?: Partial<P> | undefined;
3689
- }
3690
- export interface ComponentClass<P = {}, S = {}> {
3691
- new (props: P, context?: any): Component<P, S>;
3692
- displayName?: string;
3693
- defaultProps?: Partial<P>;
3694
- contextType?: Context<any>;
3695
- getDerivedStateFromProps?(
3696
- props: Readonly<P>,
3697
- state: Readonly<S>,
3698
- ): Partial<S> | null;
3699
- getDerivedStateFromError?(error: any): Partial<S> | null;
3700
- }
3701
- export interface Component<P = {}, S = {}> {
3702
- componentWillMount?(): void;
3703
- componentDidMount?(): void;
3704
- componentWillUnmount?(): void;
3705
- getChildContext?(): object;
3706
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
3707
- shouldComponentUpdate?(
3708
- nextProps: Readonly<P>,
3709
- nextState: Readonly<S>,
3710
- nextContext: any,
3711
- ): boolean;
3712
- componentWillUpdate?(
3713
- nextProps: Readonly<P>,
3714
- nextState: Readonly<S>,
3715
- nextContext: any,
3716
- ): void;
3717
- getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
3718
- componentDidUpdate?(
3719
- previousProps: Readonly<P>,
3720
- previousState: Readonly<S>,
3721
- snapshot: any,
3722
- ): void;
3723
- componentDidCatch?(error: any, errorInfo: ErrorInfo): void;
3724
- }
3725
- declare abstract class Component<P, S> {
3726
- constructor(props?: P, context?: any);
3727
- static displayName?: string;
3728
- static defaultProps?: any;
3729
- static contextType?: Context<any>;
3730
- // Static members cannot reference class type parameters. This is not
3731
- // supported in TypeScript. Reusing the same type arguments from `Component`
3732
- // will lead to an impossible state where one cannot satisfy the type
3733
- // constraint under no circumstances, see #1356.In general type arguments
3734
- // seem to be a bit buggy and not supported well at the time of this
3735
- // writing with TS 3.3.3333.
3736
- static getDerivedStateFromProps?(
3737
- props: Readonly<object>,
3738
- state: Readonly<object>,
3739
- ): object | null;
3740
-
3741
- static getDerivedStateFromError?(error: any): object | null;
3742
- state: Readonly<S>;
3743
- props: RenderableProps<P>;
3744
- context: any;
3745
- base?: Element | Text;
3746
- // From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
3747
- // // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
3748
- // // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
3749
- setState<K extends keyof S>(
3750
- state:
3751
- | ((
3752
- prevState: Readonly<S>,
3753
- props: Readonly<P>,
3754
- ) => Pick<S, K> | Partial<S> | null)
3755
- | (Pick<S, K> | Partial<S> | null),
3756
- callback?: () => void,
3757
- ): void;
3758
-
3759
- forceUpdate(callback?: () => void): void;
3760
- abstract render(
3761
- props?: RenderableProps<P>,
3762
- state?: Readonly<S>,
3763
- context?: any,
3764
- ): ComponentChildren$1;
3765
- }
3766
- //
3767
- // Context
3768
- // -----------------------------------
3769
- export interface Consumer<T>
3770
- extends FunctionComponent<{
3771
- children: (value: T) => ComponentChildren$1;
3772
- }> {}
3773
- export interface Provider<T>
3774
- extends FunctionComponent<{
3775
- value: T;
3776
- children?: ComponentChildren$1;
3777
- }> {}
3778
- export interface Context<T> extends Provider<T> {
3779
- Consumer: Consumer<T>;
3780
- Provider: Provider<T>;
3781
- displayName?: string;
3782
- }
3783
3818
  interface AdminActionProps$1 extends GlobalProps, ActionProps, ActionSlots {
3784
3819
  /**
3785
3820
  * Whether the action is in a loading state, such as initial page load or action opening.
@@ -3810,28 +3845,11 @@ interface AdminPrintActionProps$1 extends GlobalProps {
3810
3845
  src?: string;
3811
3846
  }
3812
3847
 
3813
- export interface IconProps
3814
- extends Pick<IconProps$1, 'type' | 'tone' | 'color' | 'size'> {
3815
- /**
3816
- * Specifies the type of icon that will be displayed.
3817
- */
3818
- type: '' | IconType | 'empty';
3819
- tone: Extract<
3820
- IconProps$1['tone'],
3821
- 'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
3822
- >;
3823
- color: Extract<IconProps$1['color'], 'base' | 'subdued'>;
3824
- size: Extract<IconProps$1['size'], 'small' | 'base'>;
3825
- }
3826
-
3827
- export interface BadgeProps
3828
- extends Pick<BadgeProps$1, 'color' | 'size' | 'tone'> {
3829
- color: Extract<BadgeProps$1['color'], 'base' | 'strong'>;
3830
- icon: IconProps['type'] | '';
3831
- size: Extract<BadgeProps$1['size'], 'base' | 'large' | 'large-100'>;
3832
- tone: Extract<
3833
- BadgeProps$1['tone'],
3834
- 'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
3848
+ export interface AvatarProps
3849
+ extends Required<Pick<AvatarProps$1, 'initials' | 'src' | 'alt'>> {
3850
+ size: Extract<
3851
+ AvatarProps$1['size'],
3852
+ 'small-200' | 'small' | 'base' | 'large' | 'large-200'
3835
3853
  >;
3836
3854
  }
3837
3855
 
@@ -3930,6 +3948,59 @@ export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
3930
3948
  children?: preact.ComponentChildren;
3931
3949
  }
3932
3950
 
3951
+ declare class Avatar extends PreactCustomElement implements AvatarProps {
3952
+ accessor initials: AvatarProps['initials'];
3953
+ accessor src: AvatarProps['src'];
3954
+ accessor size: AvatarProps['size'];
3955
+ accessor alt: AvatarProps['alt'];
3956
+ constructor();
3957
+ }
3958
+ declare global {
3959
+ interface HTMLElementTagNameMap {
3960
+ [tagName$P]: Avatar;
3961
+ }
3962
+ }
3963
+ declare module 'preact' {
3964
+ namespace createElement.JSX {
3965
+ interface IntrinsicElements {
3966
+ [tagName$P]: AvatarJSXProps & PreactBaseElementPropsWithChildren<Avatar>;
3967
+ }
3968
+ }
3969
+ }
3970
+
3971
+ declare const tagName$P = 's-avatar';
3972
+ export interface AvatarJSXProps
3973
+ extends Partial<AvatarProps>,
3974
+ Pick<AvatarProps$1, 'id'> {
3975
+ onLoad?: () => void;
3976
+ onError?: () => void;
3977
+ }
3978
+
3979
+ export interface IconProps
3980
+ extends Pick<IconProps$1, 'type' | 'tone' | 'color' | 'size'> {
3981
+ /**
3982
+ * Specifies the type of icon that will be displayed.
3983
+ */
3984
+ type: '' | IconType | 'empty';
3985
+ tone: Extract<
3986
+ IconProps$1['tone'],
3987
+ 'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
3988
+ >;
3989
+ color: Extract<IconProps$1['color'], 'base' | 'subdued'>;
3990
+ size: Extract<IconProps$1['size'], 'small' | 'base'>;
3991
+ }
3992
+
3993
+ export interface BadgeProps
3994
+ extends Pick<BadgeProps$1, 'color' | 'size' | 'tone'> {
3995
+ color: Extract<BadgeProps$1['color'], 'base' | 'strong'>;
3996
+ icon: IconProps['type'] | '';
3997
+ size: Extract<BadgeProps$1['size'], 'base' | 'large' | 'large-100'>;
3998
+ tone: Extract<
3999
+ BadgeProps$1['tone'],
4000
+ 'auto' | 'neutral' | 'info' | 'success' | 'caution' | 'warning' | 'critical'
4001
+ >;
4002
+ }
4003
+
3933
4004
  declare class Badge extends PreactCustomElement implements BadgeProps {
3934
4005
  accessor color: BadgeProps['color'];
3935
4006
  accessor icon: BadgeProps['icon'];
@@ -6450,6 +6521,7 @@ export {
6450
6521
  AdminAction,
6451
6522
  AdminBlock,
6452
6523
  AdminPrintAction,
6524
+ Avatar,
6453
6525
  Badge,
6454
6526
  Banner,
6455
6527
  Box,
@@ -6503,6 +6575,7 @@ export type {
6503
6575
  AdminActionJSXProps,
6504
6576
  AdminBlockJSXProps,
6505
6577
  AdminPrintActionJSXProps,
6578
+ AvatarJSXProps,
6506
6579
  BadgeJSXProps,
6507
6580
  BannerJSXProps,
6508
6581
  BoxJSXProps,
@@ -6553,6 +6626,11 @@ export type {
6553
6626
  UnorderedListJSXProps,
6554
6627
  };
6555
6628
 
6629
+ export interface AvatarEvents {
6630
+ load: CallbackEventListener<typeof tagName> | null = null;
6631
+ error: OnErrorEventHandler = null;
6632
+ }
6633
+
6556
6634
  export interface BannerEvents {
6557
6635
  dismiss: CallbackEventListener<typeof tagName> | null = null;
6558
6636
  afterhide: CallbackEventListener<typeof tagName> | null = null;
@@ -6727,6 +6805,20 @@ export interface FunctionSettingsEvents {
6727
6805
  save: CallbackEventListener<typeof tagName> | null = null;
6728
6806
  error: OnErrorEventHandler = null;
6729
6807
  }
6808
+ declare module 'react' {
6809
+ namespace JSX {
6810
+ interface IntrinsicElements {
6811
+ [tagName$P]: AvatarJSXProps & ReactBaseElementPropsWithChildren<Avatar>;
6812
+ }
6813
+ }
6814
+ }
6815
+ declare global {
6816
+ namespace JSX {
6817
+ interface IntrinsicElements {
6818
+ [tagName$P]: AvatarJSXProps & ReactBaseElementPropsWithChildren<Avatar>;
6819
+ }
6820
+ }
6821
+ }
6730
6822
  declare module 'react' {
6731
6823
  namespace JSX {
6732
6824
  interface IntrinsicElements {