@shopify/ui-extensions 2025.10.0-rc.43 → 2025.10.0-rc.45
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/docs/shared/components/ColorField.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/intents/intents.d.ts +132 -0
- package/build/ts/surfaces/admin/api/intents/intents.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/intents/intents.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/intents/intents.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +2 -7
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Avatar.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Badge.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Banner.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Box.d.ts +70 -7
- package/build/ts/surfaces/admin/components/Button.d.ts +7 -1
- package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +11 -1
- package/build/ts/surfaces/admin/components/Checkbox.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Chip.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Choice.d.ts +8 -1
- package/build/ts/surfaces/admin/components/ChoiceList.d.ts +8 -1
- package/build/ts/surfaces/admin/components/Clickable.d.ts +71 -7
- package/build/ts/surfaces/admin/components/ClickableChip.d.ts +7 -1
- package/build/ts/surfaces/admin/components/ColorField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Divider.d.ts +1 -0
- package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Grid.d.ts +123 -10
- package/build/ts/surfaces/admin/components/GridItem.d.ts +71 -7
- package/build/ts/surfaces/admin/components/Heading.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Icon.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Image.d.ts +64 -6
- package/build/ts/surfaces/admin/components/Link.d.ts +7 -1
- package/build/ts/surfaces/admin/components/ListItem.d.ts +8 -1
- package/build/ts/surfaces/admin/components/Modal.d.ts +1 -1
- package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Option.d.ts +7 -1
- package/build/ts/surfaces/admin/components/OptionGroup.d.ts +8 -1
- package/build/ts/surfaces/admin/components/OrderedList.d.ts +8 -1
- package/build/ts/surfaces/admin/components/Page.d.ts +11 -1
- package/build/ts/surfaces/admin/components/Paragraph.d.ts +8 -1
- package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Section.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Select.d.ts +7 -1
- package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Stack.d.ts +87 -7
- package/build/ts/surfaces/admin/components/Switch.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Table.d.ts +8 -1
- package/build/ts/surfaces/admin/components/TableBody.d.ts +8 -1
- package/build/ts/surfaces/admin/components/TableCell.d.ts +8 -1
- package/build/ts/surfaces/admin/components/TableHeader.d.ts +8 -1
- package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +7 -1
- package/build/ts/surfaces/admin/components/TableRow.d.ts +8 -1
- package/build/ts/surfaces/admin/components/Text.d.ts +7 -1
- package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -0
- package/build/ts/surfaces/admin/components/TextField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -0
- package/build/ts/surfaces/admin/components/Tooltip.d.ts +7 -1
- package/build/ts/surfaces/admin/components/URLField.d.ts +1 -0
- package/build/ts/surfaces/admin/components/UnorderedList.d.ts +8 -1
- package/build/ts/surfaces/admin/components/shared.d.ts +7 -24
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/docs/shared/components/ColorField.ts +2 -1
- package/src/surfaces/admin/api/intents/examples/create-article.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-catalog.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-collection.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-customer.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-discount.js +11 -0
- package/src/surfaces/admin/api/intents/examples/create-market.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-menu.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-metafield-definition.js +11 -0
- package/src/surfaces/admin/api/intents/examples/create-metaobject-definition.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-metaobject.js +11 -0
- package/src/surfaces/admin/api/intents/examples/create-page.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-product.js +9 -0
- package/src/surfaces/admin/api/intents/examples/create-variant.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-article.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-catalog.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-collection.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-customer.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-discount.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-market.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-menu.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-metafield-definition.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-metaobject.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-page.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-product.js +11 -0
- package/src/surfaces/admin/api/intents/examples/edit-variant.js +11 -0
- package/src/surfaces/admin/api/intents/intents.ts +153 -0
- package/src/surfaces/admin/api/standard/standard.ts +2 -6
- package/src/surfaces/admin/components/Avatar.d.ts +1 -0
- package/src/surfaces/admin/components/Badge.d.ts +7 -1
- package/src/surfaces/admin/components/Banner.d.ts +7 -1
- package/src/surfaces/admin/components/Box.d.ts +70 -7
- package/src/surfaces/admin/components/Button.d.ts +7 -1
- package/src/surfaces/admin/components/ButtonGroup.d.ts +11 -1
- package/src/surfaces/admin/components/Checkbox.d.ts +1 -0
- package/src/surfaces/admin/components/Chip.d.ts +7 -1
- package/src/surfaces/admin/components/Choice.d.ts +8 -1
- package/src/surfaces/admin/components/ChoiceList.d.ts +8 -1
- package/src/surfaces/admin/components/Clickable.d.ts +71 -7
- package/src/surfaces/admin/components/ClickableChip.d.ts +7 -1
- package/src/surfaces/admin/components/ColorField.d.ts +1 -0
- package/src/surfaces/admin/components/DatePicker.d.ts +1 -0
- package/src/surfaces/admin/components/Divider.d.ts +1 -0
- package/src/surfaces/admin/components/EmailField.d.ts +1 -0
- package/src/surfaces/admin/components/Grid.d.ts +123 -10
- package/src/surfaces/admin/components/GridItem.d.ts +71 -7
- package/src/surfaces/admin/components/Heading.d.ts +7 -1
- package/src/surfaces/admin/components/Icon.d.ts +1 -0
- package/src/surfaces/admin/components/Image.d.ts +64 -6
- package/src/surfaces/admin/components/Link.d.ts +7 -1
- package/src/surfaces/admin/components/ListItem.d.ts +8 -1
- package/src/surfaces/admin/components/Modal.d.ts +1 -1
- package/src/surfaces/admin/components/MoneyField.d.ts +1 -0
- package/src/surfaces/admin/components/NumberField.d.ts +1 -0
- package/src/surfaces/admin/components/Option.d.ts +7 -1
- package/src/surfaces/admin/components/OptionGroup.d.ts +8 -1
- package/src/surfaces/admin/components/OrderedList.d.ts +8 -1
- package/src/surfaces/admin/components/Page.d.ts +11 -1
- package/src/surfaces/admin/components/Paragraph.d.ts +8 -1
- package/src/surfaces/admin/components/PasswordField.d.ts +1 -0
- package/src/surfaces/admin/components/SearchField.d.ts +1 -0
- package/src/surfaces/admin/components/Section.d.ts +7 -1
- package/src/surfaces/admin/components/Select.d.ts +7 -1
- package/src/surfaces/admin/components/Spinner.d.ts +1 -0
- package/src/surfaces/admin/components/Stack.d.ts +87 -7
- package/src/surfaces/admin/components/Switch.d.ts +1 -0
- package/src/surfaces/admin/components/Table.d.ts +8 -1
- package/src/surfaces/admin/components/TableBody.d.ts +8 -1
- package/src/surfaces/admin/components/TableCell.d.ts +8 -1
- package/src/surfaces/admin/components/TableHeader.d.ts +8 -1
- package/src/surfaces/admin/components/TableHeaderRow.d.ts +7 -1
- package/src/surfaces/admin/components/TableRow.d.ts +8 -1
- package/src/surfaces/admin/components/Text.d.ts +7 -1
- package/src/surfaces/admin/components/TextArea.d.ts +1 -0
- package/src/surfaces/admin/components/TextField.d.ts +1 -0
- package/src/surfaces/admin/components/Thumbnail.d.ts +1 -0
- package/src/surfaces/admin/components/Tooltip.d.ts +7 -1
- package/src/surfaces/admin/components/URLField.d.ts +1 -0
- package/src/surfaces/admin/components/UnorderedList.d.ts +8 -1
- package/src/surfaces/admin/components/shared.d.ts +7 -24
- package/src/surfaces/admin/components.d.ts +323 -146
- package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorField.d.ts","sourceRoot":"","sources":["../../../../../src/docs/shared/components/ColorField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mCAAmC,EAAC,MAAM,cAAc,CAAC;AAEtE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"ColorField.d.ts","sourceRoot":"","sources":["../../../../../src/docs/shared/components/ColorField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mCAAmC,EAAC,MAAM,cAAc,CAAC;AAEtE,QAAA,MAAM,IAAI,EAAE,mCAOX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User dismissed or closed the workflow without completing it.
|
|
3
|
+
*/
|
|
4
|
+
export interface ClosedIntentResponse {
|
|
5
|
+
code?: 'closed';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Successful intent completion.
|
|
9
|
+
*/
|
|
10
|
+
export interface SuccessIntentResponse {
|
|
11
|
+
code?: 'ok';
|
|
12
|
+
data?: {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Failed intent completion.
|
|
18
|
+
*/
|
|
19
|
+
export interface ErrorIntentResponse {
|
|
20
|
+
code?: 'error';
|
|
21
|
+
message?: string;
|
|
22
|
+
issues?: {
|
|
23
|
+
/**
|
|
24
|
+
* The path to the field with the issue.
|
|
25
|
+
*/
|
|
26
|
+
path?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* The error message for the issue.
|
|
29
|
+
*/
|
|
30
|
+
message?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A code identifier for the issue.
|
|
33
|
+
*/
|
|
34
|
+
code?: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Result of an intent activity.
|
|
39
|
+
* Discriminated union representing all possible completion outcomes.
|
|
40
|
+
*/
|
|
41
|
+
export type IntentResponse = SuccessIntentResponse | ErrorIntentResponse | ClosedIntentResponse;
|
|
42
|
+
/**
|
|
43
|
+
* Activity handle for tracking intent workflow progress.
|
|
44
|
+
*/
|
|
45
|
+
export interface IntentActivity {
|
|
46
|
+
/**
|
|
47
|
+
* A Promise that resolves when the intent workflow completes, returning the response.
|
|
48
|
+
*/
|
|
49
|
+
complete?: Promise<IntentResponse>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The action to perform on a resource.
|
|
53
|
+
*/
|
|
54
|
+
export type IntentAction = 'create' | 'edit';
|
|
55
|
+
/**
|
|
56
|
+
* Supported resource types that can be targeted by intents.
|
|
57
|
+
*/
|
|
58
|
+
export type IntentType = 'shopify/Article' | 'shopify/Catalog' | 'shopify/Collection' | 'shopify/Customer' | 'shopify/Discount' | 'shopify/Market' | 'shopify/Menu' | 'shopify/MetafieldDefinition' | 'shopify/Metaobject' | 'shopify/MetaobjectDefinition' | 'shopify/Page' | 'shopify/Product' | 'shopify/ProductVariant';
|
|
59
|
+
/**
|
|
60
|
+
* Options for invoking intents when using the query string format.
|
|
61
|
+
*/
|
|
62
|
+
export interface IntentQueryOptions {
|
|
63
|
+
/**
|
|
64
|
+
* The resource identifier for edit actions (e.g., 'gid://shopify/Product/123').
|
|
65
|
+
*/
|
|
66
|
+
value?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Additional data required for certain intent types.
|
|
69
|
+
* For example:
|
|
70
|
+
* - Discount creation requires { type: 'amount-off-product' | 'amount-off-order' | 'buy-x-get-y' | 'free-shipping' }
|
|
71
|
+
* - ProductVariant creation requires { productId: 'gid://shopify/Product/123' }
|
|
72
|
+
* - Metaobject creation requires { type: 'shopify--color-pattern' }
|
|
73
|
+
*/
|
|
74
|
+
data?: {
|
|
75
|
+
[key: string]: unknown;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Structured description of an intent to invoke.
|
|
80
|
+
*/
|
|
81
|
+
export interface IntentQuery extends IntentQueryOptions {
|
|
82
|
+
/**
|
|
83
|
+
* The operation to perform on the target resource.
|
|
84
|
+
*/
|
|
85
|
+
action: IntentAction;
|
|
86
|
+
/**
|
|
87
|
+
* The resource type (e.g., 'shopify/Product').
|
|
88
|
+
*/
|
|
89
|
+
type: IntentType;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The invoke API for triggering intent workflows.
|
|
93
|
+
*
|
|
94
|
+
* @param intent - Either a string query or structured object describing the intent
|
|
95
|
+
* @param options - Optional parameters when using string query format
|
|
96
|
+
* @returns A Promise resolving to an activity handle for tracking the workflow
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```javascript
|
|
100
|
+
* // Create a new product
|
|
101
|
+
* const activity = await intents.invoke('create:shopify/Product');
|
|
102
|
+
* const response = await activity.complete;
|
|
103
|
+
*
|
|
104
|
+
* // Edit an existing product
|
|
105
|
+
* const activity = await intents.invoke('edit:shopify/Product,gid://shopify/Product/123');
|
|
106
|
+
* const response = await activity.complete;
|
|
107
|
+
*
|
|
108
|
+
* // Create a discount with required type
|
|
109
|
+
* const activity = await intents.invoke('create:shopify/Discount', {
|
|
110
|
+
* data: { type: 'amount-off-product' }
|
|
111
|
+
* });
|
|
112
|
+
* const response = await activity.complete;
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export interface IntentInvokeApi {
|
|
116
|
+
(query: IntentQuery): Promise<IntentActivity>;
|
|
117
|
+
(intentURL: string, options?: IntentQueryOptions): Promise<IntentActivity>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Intent information provided to the receiver of an intent.
|
|
121
|
+
*/
|
|
122
|
+
export interface Intents {
|
|
123
|
+
/**
|
|
124
|
+
* The URL that was used to launch the intent.
|
|
125
|
+
*/
|
|
126
|
+
launchUrl?: string | URL;
|
|
127
|
+
/**
|
|
128
|
+
* Invoke an intent workflow to create or edit Shopify resources.
|
|
129
|
+
*/
|
|
130
|
+
invoke?: IntentInvokeApi;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=intents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/intents/intents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,6BAA6B,GAC7B,oBAAoB,GACpB,8BAA8B,GAC9B,cAAc,GACd,iBAAiB,GACjB,wBAAwB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5E;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intents.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/intents/intents.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA2hBX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -2,12 +2,8 @@ import type { I18n } from '../../../../api';
|
|
|
2
2
|
import { ApiVersion } from '../../../../shared';
|
|
3
3
|
import type { Storage } from './storage';
|
|
4
4
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* The URL that was used to launch the intent.
|
|
8
|
-
*/
|
|
9
|
-
launchUrl?: string | URL;
|
|
10
|
-
}
|
|
5
|
+
import type { Intents } from '../intents/intents';
|
|
6
|
+
export type { Intents } from '../intents/intents';
|
|
11
7
|
/**
|
|
12
8
|
* GraphQL error returned by the Shopify Admin API.
|
|
13
9
|
*/
|
|
@@ -64,5 +60,4 @@ export interface StandardApi<ExtensionTarget extends AnyExtensionTarget> {
|
|
|
64
60
|
errors?: GraphQLError[];
|
|
65
61
|
}>;
|
|
66
62
|
}
|
|
67
|
-
export {};
|
|
68
63
|
//# sourceMappingURL=standard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/standard/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/standard/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAEhD,YAAY,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,UAAU,IAAI;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,eAAe,SAAS,kBAAkB;IACrE;;OAEG;IACH,SAAS,EAAE;QACT,MAAM,EAAE,eAAe,CAAC;KACzB,CAAC;IAEF;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,CAAC,IAAI,GAAG,OAAO,EAAE,SAAS,GAAG;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,EAC1D,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAC,SAAS,CAAC,EAAE,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;KAAC,KACrE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;KAAC,CAAC,CAAC;CACtD"}
|
|
@@ -84,6 +84,7 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
|
|
|
84
84
|
(event: CallbackEvent<T>): void;
|
|
85
85
|
})
|
|
86
86
|
| null;
|
|
87
|
+
/** Used when an element does not have children. */
|
|
87
88
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
88
89
|
/** Assigns a unique key to this element. */
|
|
89
90
|
key?: preact.Key;
|
|
@@ -101,6 +101,7 @@ declare abstract class PreactCustomElement extends BaseClass {
|
|
|
101
101
|
click({sourceEvent}?: ClickOptions): void;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/** Used when an element does not have children. */
|
|
104
105
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
105
106
|
/** Assigns a unique key to this element. */
|
|
106
107
|
key?: preact.Key;
|
|
@@ -109,6 +110,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
109
110
|
/** Assigns this element to a parent's slot. */
|
|
110
111
|
slot?: Lowercase<string>;
|
|
111
112
|
}
|
|
113
|
+
/** Used when an element has children. */
|
|
114
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
115
|
+
extends PreactBaseElementProps<TClass> {
|
|
116
|
+
children?: preact.ComponentChildren;
|
|
117
|
+
}
|
|
112
118
|
|
|
113
119
|
declare class Badge extends PreactCustomElement implements BadgeProps {
|
|
114
120
|
accessor color: BadgeProps['color'];
|
|
@@ -125,7 +131,7 @@ declare global {
|
|
|
125
131
|
declare module 'preact' {
|
|
126
132
|
namespace createElement.JSX {
|
|
127
133
|
interface IntrinsicElements {
|
|
128
|
-
[tagName]: BadgeJSXProps &
|
|
134
|
+
[tagName]: BadgeJSXProps & PreactBaseElementPropsWithChildren<Badge>;
|
|
129
135
|
}
|
|
130
136
|
}
|
|
131
137
|
}
|
|
@@ -16,6 +16,7 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
|
|
|
16
16
|
(event: CallbackEvent<T>): void;
|
|
17
17
|
})
|
|
18
18
|
| null;
|
|
19
|
+
/** Used when an element does not have children. */
|
|
19
20
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
20
21
|
/** Assigns a unique key to this element. */
|
|
21
22
|
key?: preact.Key;
|
|
@@ -24,6 +25,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
24
25
|
/** Assigns this element to a parent's slot. */
|
|
25
26
|
slot?: Lowercase<string>;
|
|
26
27
|
}
|
|
28
|
+
/** Used when an element has children. */
|
|
29
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
30
|
+
extends PreactBaseElementProps<TClass> {
|
|
31
|
+
children?: preact.ComponentChildren;
|
|
32
|
+
}
|
|
27
33
|
|
|
28
34
|
export type RequiredBannerProps = Required<BannerProps$1>;
|
|
29
35
|
export interface BannerProps
|
|
@@ -115,7 +121,7 @@ declare module 'preact' {
|
|
|
115
121
|
namespace createElement.JSX {
|
|
116
122
|
interface IntrinsicElements {
|
|
117
123
|
[tagName]: Omit<BannerJSXProps, 'secondaryActions'> &
|
|
118
|
-
|
|
124
|
+
PreactBaseElementPropsWithChildren<Banner>;
|
|
119
125
|
}
|
|
120
126
|
}
|
|
121
127
|
}
|
|
@@ -9,7 +9,9 @@ import type {
|
|
|
9
9
|
ComponentChildren,
|
|
10
10
|
BoxProps$1,
|
|
11
11
|
MaybeAllValuesShorthandProperty,
|
|
12
|
+
SizeUnitsOrAuto,
|
|
12
13
|
SizeUnits,
|
|
14
|
+
SizeUnitsOrNone,
|
|
13
15
|
} from './shared.d.ts';
|
|
14
16
|
|
|
15
17
|
export type MakeResponsive<T> = T | `@container${string}`;
|
|
@@ -80,10 +82,20 @@ export interface BoxProps
|
|
|
80
82
|
| 'minInlineSize'
|
|
81
83
|
| 'overflow'
|
|
82
84
|
> {
|
|
85
|
+
/**
|
|
86
|
+
* Adjust the background of the component.
|
|
87
|
+
*
|
|
88
|
+
* @default 'transparent'
|
|
89
|
+
*/
|
|
83
90
|
background: Extract<
|
|
84
91
|
RequiredBoxProps['background'],
|
|
85
92
|
'transparent' | 'base' | 'subdued' | 'strong'
|
|
86
93
|
>;
|
|
94
|
+
/**
|
|
95
|
+
* Adjust the width of the border.
|
|
96
|
+
*
|
|
97
|
+
* @default '' - meaning no override
|
|
98
|
+
*/
|
|
87
99
|
borderWidth:
|
|
88
100
|
| MaybeAllValuesShorthandProperty<
|
|
89
101
|
Extract<
|
|
@@ -92,13 +104,28 @@ export interface BoxProps
|
|
|
92
104
|
>
|
|
93
105
|
>
|
|
94
106
|
| Extract<RequiredBoxProps['borderWidth'], ''>;
|
|
107
|
+
/**
|
|
108
|
+
* Adjust the style of the border.
|
|
109
|
+
*
|
|
110
|
+
* @default '' - meaning no override
|
|
111
|
+
*/
|
|
95
112
|
borderStyle:
|
|
96
113
|
| MaybeAllValuesShorthandProperty<BoxBorderStyles>
|
|
97
114
|
| Extract<RequiredBoxProps['borderStyle'], ''>;
|
|
115
|
+
/**
|
|
116
|
+
* Adjust the color of the border.
|
|
117
|
+
*
|
|
118
|
+
* @default '' - meaning no override
|
|
119
|
+
*/
|
|
98
120
|
borderColor: Extract<
|
|
99
121
|
RequiredBoxProps['borderColor'],
|
|
100
122
|
'subdued' | 'base' | 'strong' | ''
|
|
101
123
|
>;
|
|
124
|
+
/**
|
|
125
|
+
* Adjust the radius of the border.
|
|
126
|
+
*
|
|
127
|
+
* @default 'none'
|
|
128
|
+
*/
|
|
102
129
|
borderRadius: MaybeAllValuesShorthandProperty<BoxBorderRadii>;
|
|
103
130
|
/**
|
|
104
131
|
* Adjust the padding of all edges.
|
|
@@ -195,12 +222,42 @@ export interface BoxProps
|
|
|
195
222
|
* @default 'auto'
|
|
196
223
|
*/
|
|
197
224
|
display: ResponsiveBoxProps['display'];
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Adjust the [block size](https://developer.mozilla.org/en-US/docs/Web/CSS/block-size).
|
|
227
|
+
*
|
|
228
|
+
* @default 'auto'
|
|
229
|
+
*/
|
|
230
|
+
blockSize: SizeUnitsOrAuto;
|
|
231
|
+
/**
|
|
232
|
+
* Adjust the [minimum block size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-block-size).
|
|
233
|
+
*
|
|
234
|
+
* @default '0'
|
|
235
|
+
*/
|
|
236
|
+
minBlockSize: SizeUnits;
|
|
237
|
+
/**
|
|
238
|
+
* Adjust the [maximum block size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-block-size).
|
|
239
|
+
*
|
|
240
|
+
* @default 'none'
|
|
241
|
+
*/
|
|
242
|
+
maxBlockSize: SizeUnitsOrNone;
|
|
243
|
+
/**
|
|
244
|
+
* Adjust the [inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size).
|
|
245
|
+
*
|
|
246
|
+
* @default 'auto'
|
|
247
|
+
*/
|
|
248
|
+
inlineSize: SizeUnitsOrAuto;
|
|
249
|
+
/**
|
|
250
|
+
* Adjust the [minimum inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size).
|
|
251
|
+
*
|
|
252
|
+
* @default '0'
|
|
253
|
+
*/
|
|
254
|
+
minInlineSize: SizeUnits;
|
|
255
|
+
/**
|
|
256
|
+
* Adjust the [maximum inline size](https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size).
|
|
257
|
+
*
|
|
258
|
+
* @default 'none'
|
|
259
|
+
*/
|
|
260
|
+
maxInlineSize: SizeUnitsOrNone;
|
|
204
261
|
}
|
|
205
262
|
|
|
206
263
|
export type Styles = string;
|
|
@@ -291,6 +348,7 @@ declare class BoxElement extends PreactCustomElement implements BoxProps {
|
|
|
291
348
|
accessor display: BoxProps['display'];
|
|
292
349
|
}
|
|
293
350
|
|
|
351
|
+
/** Used when an element does not have children. */
|
|
294
352
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
295
353
|
/** Assigns a unique key to this element. */
|
|
296
354
|
key?: preact.Key;
|
|
@@ -299,6 +357,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
299
357
|
/** Assigns this element to a parent's slot. */
|
|
300
358
|
slot?: Lowercase<string>;
|
|
301
359
|
}
|
|
360
|
+
/** Used when an element has children. */
|
|
361
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
362
|
+
extends PreactBaseElementProps<TClass> {
|
|
363
|
+
children?: preact.ComponentChildren;
|
|
364
|
+
}
|
|
302
365
|
|
|
303
366
|
declare class Box extends BoxElement implements BoxProps {
|
|
304
367
|
constructor();
|
|
@@ -311,7 +374,7 @@ declare global {
|
|
|
311
374
|
declare module 'preact' {
|
|
312
375
|
namespace createElement.JSX {
|
|
313
376
|
interface IntrinsicElements {
|
|
314
|
-
[tagName]: BoxJSXProps &
|
|
377
|
+
[tagName]: BoxJSXProps & PreactBaseElementPropsWithChildren<Box>;
|
|
315
378
|
}
|
|
316
379
|
}
|
|
317
380
|
}
|
|
@@ -22,6 +22,7 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
|
|
|
22
22
|
(event: CallbackEvent<T>): void;
|
|
23
23
|
})
|
|
24
24
|
| null;
|
|
25
|
+
/** Used when an element does not have children. */
|
|
25
26
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
26
27
|
/** Assigns a unique key to this element. */
|
|
27
28
|
key?: preact.Key;
|
|
@@ -30,6 +31,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
30
31
|
/** Assigns this element to a parent's slot. */
|
|
31
32
|
slot?: Lowercase<string>;
|
|
32
33
|
}
|
|
34
|
+
/** Used when an element has children. */
|
|
35
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
36
|
+
extends PreactBaseElementProps<TClass> {
|
|
37
|
+
children?: preact.ComponentChildren;
|
|
38
|
+
}
|
|
33
39
|
|
|
34
40
|
export interface IconProps
|
|
35
41
|
extends Pick<
|
|
@@ -194,7 +200,7 @@ declare global {
|
|
|
194
200
|
declare module 'preact' {
|
|
195
201
|
namespace createElement.JSX {
|
|
196
202
|
interface IntrinsicElements {
|
|
197
|
-
[tagName]: ButtonJSXProps &
|
|
203
|
+
[tagName]: ButtonJSXProps & PreactBaseElementPropsWithChildren<Button>;
|
|
198
204
|
}
|
|
199
205
|
}
|
|
200
206
|
}
|
|
@@ -71,6 +71,7 @@ declare abstract class PreactCustomElement extends BaseClass {
|
|
|
71
71
|
click({sourceEvent}?: ClickOptions): void;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/** Used when an element does not have children. */
|
|
74
75
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
75
76
|
/** Assigns a unique key to this element. */
|
|
76
77
|
key?: preact.Key;
|
|
@@ -79,6 +80,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
79
80
|
/** Assigns this element to a parent's slot. */
|
|
80
81
|
slot?: Lowercase<string>;
|
|
81
82
|
}
|
|
83
|
+
/** Used when an element has children. */
|
|
84
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
85
|
+
extends PreactBaseElementProps<TClass> {
|
|
86
|
+
children?: preact.ComponentChildren;
|
|
87
|
+
}
|
|
82
88
|
|
|
83
89
|
declare class ButtonGroup
|
|
84
90
|
extends PreactCustomElement
|
|
@@ -96,7 +102,11 @@ declare global {
|
|
|
96
102
|
declare module 'preact' {
|
|
97
103
|
namespace createElement.JSX {
|
|
98
104
|
interface IntrinsicElements {
|
|
99
|
-
[tagName]:
|
|
105
|
+
[tagName]: Omit<
|
|
106
|
+
ButtonGroupJSXProps,
|
|
107
|
+
'primaryAction' | 'secondaryActions'
|
|
108
|
+
> &
|
|
109
|
+
PreactBaseElementPropsWithChildren<ButtonGroup>;
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
}
|
|
@@ -20,6 +20,7 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
|
|
|
20
20
|
(event: CallbackEvent<T>): void;
|
|
21
21
|
})
|
|
22
22
|
| null;
|
|
23
|
+
/** Used when an element does not have children. */
|
|
23
24
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
24
25
|
/** Assigns a unique key to this element. */
|
|
25
26
|
key?: preact.Key;
|
|
@@ -71,6 +71,7 @@ declare abstract class PreactCustomElement extends BaseClass {
|
|
|
71
71
|
click({sourceEvent}?: ClickOptions): void;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/** Used when an element does not have children. */
|
|
74
75
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
75
76
|
/** Assigns a unique key to this element. */
|
|
76
77
|
key?: preact.Key;
|
|
@@ -79,6 +80,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
79
80
|
/** Assigns this element to a parent's slot. */
|
|
80
81
|
slot?: Lowercase<string>;
|
|
81
82
|
}
|
|
83
|
+
/** Used when an element has children. */
|
|
84
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
85
|
+
extends PreactBaseElementProps<TClass> {
|
|
86
|
+
children?: preact.ComponentChildren;
|
|
87
|
+
}
|
|
82
88
|
|
|
83
89
|
declare class Chip extends PreactCustomElement implements ChipProps {
|
|
84
90
|
accessor color: ChipProps['color'];
|
|
@@ -98,7 +104,7 @@ declare module 'preact' {
|
|
|
98
104
|
Extract<keyof HTMLAttributes<HTMLElement>, `on${Capitalize<string>}`>
|
|
99
105
|
> &
|
|
100
106
|
Omit<ChipJSXProps, 'graphic'> &
|
|
101
|
-
|
|
107
|
+
PreactBaseElementPropsWithChildren<Chip>;
|
|
102
108
|
}
|
|
103
109
|
}
|
|
104
110
|
}
|
|
@@ -80,6 +80,7 @@ declare abstract class PreactCustomElement extends BaseClass {
|
|
|
80
80
|
click({sourceEvent}?: ClickOptions): void;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/** Used when an element does not have children. */
|
|
83
84
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
84
85
|
/** Assigns a unique key to this element. */
|
|
85
86
|
key?: preact.Key;
|
|
@@ -88,6 +89,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
88
89
|
/** Assigns this element to a parent's slot. */
|
|
89
90
|
slot?: Lowercase<string>;
|
|
90
91
|
}
|
|
92
|
+
/** Used when an element has children. */
|
|
93
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
94
|
+
extends PreactBaseElementProps<TClass> {
|
|
95
|
+
children?: preact.ComponentChildren;
|
|
96
|
+
}
|
|
91
97
|
|
|
92
98
|
declare class Choice extends PreactCustomElement implements ChoiceProps {
|
|
93
99
|
accessor disabled: ChoiceProps['disabled'];
|
|
@@ -110,7 +116,8 @@ declare global {
|
|
|
110
116
|
declare module 'preact' {
|
|
111
117
|
namespace createElement.JSX {
|
|
112
118
|
interface IntrinsicElements {
|
|
113
|
-
[tagName]: ChoiceJSXProps &
|
|
119
|
+
[tagName]: Omit<ChoiceJSXProps, 'details'> &
|
|
120
|
+
PreactBaseElementPropsWithChildren<Choice>;
|
|
114
121
|
}
|
|
115
122
|
}
|
|
116
123
|
}
|
|
@@ -16,6 +16,7 @@ export type CallbackEventListener<T extends keyof HTMLElementTagNameMap> =
|
|
|
16
16
|
(event: CallbackEvent<T>): void;
|
|
17
17
|
})
|
|
18
18
|
| null;
|
|
19
|
+
/** Used when an element does not have children. */
|
|
19
20
|
export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
20
21
|
/** Assigns a unique key to this element. */
|
|
21
22
|
key?: preact.Key;
|
|
@@ -24,6 +25,11 @@ export interface PreactBaseElementProps<TClass extends HTMLElement> {
|
|
|
24
25
|
/** Assigns this element to a parent's slot. */
|
|
25
26
|
slot?: Lowercase<string>;
|
|
26
27
|
}
|
|
28
|
+
/** Used when an element has children. */
|
|
29
|
+
export interface PreactBaseElementPropsWithChildren<TClass extends HTMLElement>
|
|
30
|
+
extends PreactBaseElementProps<TClass> {
|
|
31
|
+
children?: preact.ComponentChildren;
|
|
32
|
+
}
|
|
27
33
|
|
|
28
34
|
export interface ChoiceListProps
|
|
29
35
|
extends Required<
|
|
@@ -135,7 +141,8 @@ declare global {
|
|
|
135
141
|
declare module 'preact' {
|
|
136
142
|
namespace createElement.JSX {
|
|
137
143
|
interface IntrinsicElements {
|
|
138
|
-
[tagName]: ChoiceListJSXProps &
|
|
144
|
+
[tagName]: ChoiceListJSXProps &
|
|
145
|
+
PreactBaseElementPropsWithChildren<ChoiceList>;
|
|
139
146
|
}
|
|
140
147
|
}
|
|
141
148
|
}
|