@shopify/ui-extensions 1.0.2 → 2.0.0-alpha.0
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/README.md +57 -1
- package/admin.d.ts +2 -0
- package/admin.esnext +2 -0
- package/admin.js +1 -0
- package/admin.mjs +2 -0
- package/build/cjs/{types/Banner.js → api.js} +0 -0
- package/build/cjs/components/BlockStack/BlockStack.js +11 -0
- package/build/cjs/components/BlockStack/README.md +1 -0
- package/build/cjs/components/Button/Button.js +11 -0
- package/build/cjs/components/Button/README.md +1 -0
- package/build/cjs/components/Text/README.md +1 -0
- package/build/cjs/components/Text/Text.js +11 -0
- package/build/cjs/components/TextField/README.md +1 -0
- package/build/cjs/components/TextField/TextField.js +11 -0
- package/build/cjs/components/View/README.md +1 -0
- package/build/cjs/components/View/View.js +11 -0
- package/build/cjs/components/index.js +45 -0
- package/build/cjs/components.js +45 -0
- package/build/cjs/{types/BlockStack.js → extension.js} +0 -0
- package/build/cjs/index.js +44 -1
- package/build/cjs/surfaces/admin/api/checkout-editor/README.md +1 -0
- package/build/cjs/{types/Heading.js → surfaces/admin/api/checkout-editor/render-settings.js} +0 -0
- package/build/cjs/surfaces/admin/api/standard/README.md +1 -0
- package/build/cjs/{types/InlineStack.js → surfaces/admin/api/standard/standard.js} +0 -0
- package/build/cjs/{types/Button.js → surfaces/admin/api.js} +0 -0
- package/build/cjs/{types/shared/index.js → surfaces/admin/components.js} +4 -4
- package/build/cjs/{types/index.js → surfaces/admin/extension-points.js} +0 -0
- package/build/cjs/surfaces/admin/extension.js +27 -0
- package/build/cjs/surfaces/admin/index.js +70 -0
- package/build/cjs/{types/shared/Spacing.js → surfaces/admin/shared.js} +0 -0
- package/build/cjs/surfaces/checkout/api/cart-line-details/README.md +1 -0
- package/build/{node/types/BlockStack.js → cjs/surfaces/checkout/api/cart-line-details/render-after.js} +0 -0
- package/build/{node/types/Button.js → cjs/surfaces/checkout/api/shared.js} +0 -0
- package/build/cjs/surfaces/checkout/api/standard/README.md +1 -0
- package/build/{node/types/Heading.js → cjs/surfaces/checkout/api/standard/standard.js} +0 -0
- package/build/{node/types/Banner.js → cjs/surfaces/checkout/api.js} +0 -0
- package/build/cjs/surfaces/checkout/components.js +18 -0
- package/build/{node/types/InlineStack.js → cjs/surfaces/checkout/extension-points.js} +0 -0
- package/build/cjs/surfaces/checkout/extension.js +27 -0
- package/build/cjs/surfaces/checkout/index.js +70 -0
- package/build/{node/types/index.js → cjs/surfaces/checkout/shared.js} +0 -0
- package/build/cjs/utilities/registration.js +110 -0
- package/build/esm/{types/Banner.mjs → api.mjs} +0 -0
- package/build/esm/components/BlockStack/BlockStack.mjs +2 -0
- package/build/esm/components/BlockStack/README.md +1 -0
- package/build/esm/components/Button/Button.mjs +2 -0
- package/build/esm/components/Button/README.md +1 -0
- package/build/esm/components/Text/README.md +1 -0
- package/build/esm/components/Text/Text.mjs +2 -0
- package/build/esm/components/TextField/README.md +1 -0
- package/build/esm/components/TextField/TextField.mjs +2 -0
- package/build/esm/components/View/README.md +1 -0
- package/build/esm/components/View/View.mjs +2 -0
- package/build/esm/components/index.mjs +5 -0
- package/build/esm/components.mjs +5 -0
- package/build/esm/{types/BlockStack.mjs → extension.mjs} +0 -0
- package/build/esm/index.mjs +3 -0
- package/build/esm/surfaces/admin/api/checkout-editor/README.md +1 -0
- package/build/esm/{types/Heading.mjs → surfaces/admin/api/checkout-editor/render-settings.mjs} +0 -0
- package/build/esm/surfaces/admin/api/standard/README.md +1 -0
- package/build/esm/{types/InlineStack.mjs → surfaces/admin/api/standard/standard.mjs} +0 -0
- package/build/esm/{types/Button.mjs → surfaces/admin/api.mjs} +0 -0
- package/build/esm/surfaces/admin/components.mjs +1 -0
- package/build/esm/{types/index.mjs → surfaces/admin/extension-points.mjs} +0 -0
- package/build/esm/surfaces/admin/extension.mjs +3 -0
- package/build/esm/surfaces/admin/index.mjs +5 -0
- package/build/esm/{types/shared/Spacing.mjs → surfaces/admin/shared.mjs} +0 -0
- package/build/esm/surfaces/checkout/api/cart-line-details/README.md +1 -0
- package/build/{esnext/types/BlockStack.esnext → esm/surfaces/checkout/api/cart-line-details/render-after.mjs} +0 -0
- package/build/{esnext/types/Button.esnext → esm/surfaces/checkout/api/shared.mjs} +0 -0
- package/build/esm/surfaces/checkout/api/standard/README.md +1 -0
- package/build/{esnext/types/Heading.esnext → esm/surfaces/checkout/api/standard/standard.mjs} +0 -0
- package/build/{esnext/types/Banner.esnext → esm/surfaces/checkout/api.mjs} +0 -0
- package/build/esm/surfaces/checkout/components.mjs +1 -0
- package/build/{esnext/types/InlineStack.esnext → esm/surfaces/checkout/extension-points.mjs} +0 -0
- package/build/esm/surfaces/checkout/extension.mjs +3 -0
- package/build/esm/surfaces/checkout/index.mjs +5 -0
- package/build/{esnext/types/index.esnext → esm/surfaces/checkout/shared.mjs} +0 -0
- package/build/esm/utilities/registration.mjs +101 -0
- package/build/esnext/{types/shared/Spacing.esnext → api.esnext} +0 -0
- package/build/esnext/components/BlockStack/BlockStack.esnext +2 -0
- package/build/esnext/components/BlockStack/README.md +1 -0
- package/build/esnext/components/Button/Button.esnext +2 -0
- package/build/esnext/components/Button/README.md +1 -0
- package/build/esnext/components/Text/README.md +1 -0
- package/build/esnext/components/Text/Text.esnext +2 -0
- package/build/esnext/components/TextField/README.md +1 -0
- package/build/esnext/components/TextField/TextField.esnext +2 -0
- package/build/esnext/components/View/README.md +1 -0
- package/build/esnext/components/View/View.esnext +2 -0
- package/build/esnext/components/index.esnext +5 -0
- package/build/esnext/components.esnext +5 -0
- package/build/esnext/extension.esnext +0 -0
- package/build/esnext/index.esnext +3 -0
- package/build/esnext/surfaces/admin/api/checkout-editor/README.md +1 -0
- package/build/esnext/surfaces/admin/api/checkout-editor/render-settings.esnext +0 -0
- package/build/esnext/surfaces/admin/api/standard/README.md +1 -0
- package/build/esnext/surfaces/admin/api/standard/standard.esnext +0 -0
- package/build/esnext/surfaces/admin/api.esnext +0 -0
- package/build/esnext/surfaces/admin/components.esnext +1 -0
- package/build/esnext/surfaces/admin/extension-points.esnext +0 -0
- package/build/esnext/surfaces/admin/extension.esnext +3 -0
- package/build/esnext/surfaces/admin/index.esnext +5 -0
- package/build/esnext/surfaces/admin/shared.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/cart-line-details/README.md +1 -0
- package/build/esnext/surfaces/checkout/api/cart-line-details/render-after.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/shared.esnext +0 -0
- package/build/esnext/surfaces/checkout/api/standard/README.md +1 -0
- package/build/esnext/surfaces/checkout/api/standard/standard.esnext +0 -0
- package/build/esnext/surfaces/checkout/api.esnext +0 -0
- package/build/esnext/surfaces/checkout/components.esnext +1 -0
- package/build/esnext/surfaces/checkout/extension-points.esnext +0 -0
- package/build/esnext/surfaces/checkout/extension.esnext +3 -0
- package/build/esnext/surfaces/checkout/index.esnext +5 -0
- package/build/esnext/surfaces/checkout/shared.esnext +0 -0
- package/build/esnext/utilities/registration.esnext +37 -0
- package/build/node/{types/shared/Spacing.js → api.js} +0 -0
- package/build/node/components/BlockStack/BlockStack.js +11 -0
- package/build/node/components/BlockStack/README.md +1 -0
- package/build/node/components/Button/Button.js +11 -0
- package/build/node/components/Button/README.md +1 -0
- package/build/node/components/Text/README.md +1 -0
- package/build/node/components/Text/Text.js +11 -0
- package/build/node/components/TextField/README.md +1 -0
- package/build/node/components/TextField/TextField.js +11 -0
- package/build/node/components/View/README.md +1 -0
- package/build/node/components/View/View.js +11 -0
- package/build/node/components/index.js +45 -0
- package/build/node/components.js +45 -0
- package/build/node/extension.js +1 -0
- package/build/node/index.js +44 -1
- package/build/node/surfaces/admin/api/checkout-editor/README.md +1 -0
- package/build/node/surfaces/admin/api/checkout-editor/render-settings.js +1 -0
- package/build/node/surfaces/admin/api/standard/README.md +1 -0
- package/build/node/surfaces/admin/api/standard/standard.js +1 -0
- package/build/node/surfaces/admin/api.js +1 -0
- package/build/node/{types/shared/index.js → surfaces/admin/components.js} +4 -4
- package/build/node/surfaces/admin/extension-points.js +1 -0
- package/build/node/surfaces/admin/extension.js +27 -0
- package/build/node/surfaces/admin/index.js +70 -0
- package/build/node/surfaces/admin/shared.js +1 -0
- package/build/node/surfaces/checkout/api/cart-line-details/README.md +1 -0
- package/build/node/surfaces/checkout/api/cart-line-details/render-after.js +1 -0
- package/build/node/surfaces/checkout/api/shared.js +1 -0
- package/build/node/surfaces/checkout/api/standard/README.md +1 -0
- package/build/node/surfaces/checkout/api/standard/standard.js +1 -0
- package/build/node/surfaces/checkout/api.js +1 -0
- package/build/node/surfaces/checkout/components.js +18 -0
- package/build/node/surfaces/checkout/extension-points.js +1 -0
- package/build/node/surfaces/checkout/extension.js +27 -0
- package/build/node/surfaces/checkout/index.js +70 -0
- package/build/node/surfaces/checkout/shared.js +1 -0
- package/build/node/utilities/registration.js +44 -0
- package/build/ts/api.d.ts +8 -0
- package/build/ts/api.d.ts.map +1 -0
- package/build/ts/{types/Banner.js → api.js} +0 -0
- package/build/ts/components/BlockStack/BlockStack.d.ts +8 -0
- package/build/ts/components/BlockStack/BlockStack.d.ts.map +1 -0
- package/build/ts/components/BlockStack/BlockStack.js +5 -0
- package/build/ts/components/Button/Button.d.ts +12 -0
- package/build/ts/components/Button/Button.d.ts.map +1 -0
- package/build/ts/components/Button/Button.js +5 -0
- package/build/ts/components/Text/Text.d.ts +8 -0
- package/build/ts/components/Text/Text.d.ts.map +1 -0
- package/build/ts/components/Text/Text.js +5 -0
- package/build/ts/components/TextField/TextField.d.ts +43 -0
- package/build/ts/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/components/TextField/TextField.js +5 -0
- package/build/ts/components/View/View.d.ts +8 -0
- package/build/ts/components/View/View.d.ts.map +1 -0
- package/build/ts/components/View/View.js +5 -0
- package/build/ts/components/index.d.ts +11 -0
- package/build/ts/components/index.d.ts.map +1 -0
- package/build/ts/components/index.js +13 -0
- package/build/ts/components.d.ts +11 -0
- package/build/ts/components.d.ts.map +1 -0
- package/build/ts/components.js +13 -0
- package/build/ts/extension.d.ts +15 -0
- package/build/ts/extension.d.ts.map +1 -0
- package/build/ts/{types/BlockStack.js → extension.js} +0 -0
- package/build/ts/index.d.ts +3 -1
- package/build/ts/index.d.ts.map +1 -1
- package/build/ts/index.js +17 -0
- package/build/ts/index.ts.d.ts +0 -0
- package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts +19 -0
- package/build/ts/surfaces/admin/api/checkout-editor/render-settings.d.ts.map +1 -0
- package/build/ts/{types/Heading.js → surfaces/admin/api/checkout-editor/render-settings.js} +0 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +7 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -0
- package/build/ts/{types/InlineStack.js → surfaces/admin/api/standard/standard.js} +0 -0
- package/build/ts/surfaces/admin/api.d.ts +3 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -0
- package/build/ts/{types/Button.js → surfaces/admin/api.js} +0 -0
- package/build/ts/surfaces/admin/components.d.ts +2 -0
- package/build/ts/surfaces/admin/components.d.ts.map +1 -0
- package/build/ts/{types/shared/index.js → surfaces/admin/components.js} +1 -1
- package/build/ts/surfaces/admin/extension-points.d.ts +9 -0
- package/build/ts/surfaces/admin/extension-points.d.ts.map +1 -0
- package/build/ts/{types/index.js → surfaces/admin/extension-points.js} +0 -0
- package/build/ts/surfaces/admin/extension.d.ts +4 -0
- package/build/ts/surfaces/admin/extension.d.ts.map +1 -0
- package/build/ts/surfaces/admin/extension.js +20 -0
- package/build/ts/surfaces/admin/index.d.ts +6 -0
- package/build/ts/surfaces/admin/index.d.ts.map +1 -0
- package/build/ts/surfaces/admin/index.js +21 -0
- package/build/ts/surfaces/admin/index.ts.d.ts +0 -0
- package/build/ts/surfaces/admin/shared.d.ts +8 -0
- package/build/ts/surfaces/admin/shared.d.ts.map +1 -0
- package/build/ts/{types/shared/Spacing.js → surfaces/admin/shared.js} +0 -0
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts +6 -0
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/cart-line-details/render-after.js +2 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +4 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.js +2 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +7 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/standard/standard.js +2 -0
- package/build/ts/surfaces/checkout/api.d.ts +3 -0
- package/build/ts/surfaces/checkout/api.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api.js +2 -0
- package/build/ts/surfaces/checkout/components.d.ts +2 -0
- package/build/ts/surfaces/checkout/components.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components.js +17 -0
- package/build/ts/surfaces/checkout/extension-points.d.ts +10 -0
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/extension-points.js +2 -0
- package/build/ts/surfaces/checkout/extension.d.ts +4 -0
- package/build/ts/surfaces/checkout/extension.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/extension.js +20 -0
- package/build/ts/surfaces/checkout/index.d.ts +6 -0
- package/build/ts/surfaces/checkout/index.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/index.js +21 -0
- package/build/ts/surfaces/checkout/index.ts.d.ts +0 -0
- package/build/ts/surfaces/checkout/shared.d.ts +8 -0
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/shared.js +2 -0
- package/build/ts/utilities/registration.d.ts +13 -0
- package/build/ts/utilities/registration.d.ts.map +1 -0
- package/build/ts/utilities/registration.js +111 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/checkout.d.ts +2 -0
- package/checkout.esnext +2 -0
- package/checkout.js +1 -0
- package/checkout.mjs +2 -0
- package/index.d.ts +2 -1
- package/index.esnext +2 -1
- package/index.js +1 -1
- package/index.mjs +2 -1
- package/package.json +26 -4
- package/sewing-kit.config.ts +3 -1
- package/src/api.ts +8 -0
- package/src/components/BlockStack/BlockStack.ts +7 -0
- package/src/components/BlockStack/README.md +1 -0
- package/src/components/Button/Button.ts +10 -0
- package/src/components/Button/README.md +1 -0
- package/src/components/Text/README.md +1 -0
- package/src/components/Text/Text.ts +5 -0
- package/src/components/TextField/README.md +1 -0
- package/src/components/TextField/TextField.ts +45 -0
- package/src/components/View/README.md +1 -0
- package/src/components/View/View.ts +5 -0
- package/src/components/index.ts +14 -0
- package/src/components.ts +14 -0
- package/src/extension.ts +45 -0
- package/src/index.ts +3 -7
- package/src/surfaces/admin/api/checkout-editor/README.md +1 -0
- package/src/surfaces/admin/api/checkout-editor/render-settings.ts +26 -0
- package/src/surfaces/admin/api/standard/README.md +1 -0
- package/src/surfaces/admin/api/standard/standard.ts +8 -0
- package/src/surfaces/admin/api.ts +2 -0
- package/src/surfaces/admin/components.ts +1 -0
- package/src/surfaces/admin/extension-points.ts +17 -0
- package/src/surfaces/admin/extension.ts +7 -0
- package/src/surfaces/admin/index.ts +5 -0
- package/src/surfaces/admin/shared.ts +14 -0
- package/src/surfaces/checkout/api/cart-line-details/README.md +1 -0
- package/src/surfaces/checkout/api/cart-line-details/render-after.ts +7 -0
- package/src/surfaces/checkout/api/shared.ts +3 -0
- package/src/surfaces/checkout/api/standard/README.md +1 -0
- package/src/surfaces/checkout/api/standard/standard.ts +8 -0
- package/src/surfaces/checkout/api.ts +2 -0
- package/src/surfaces/checkout/components.ts +1 -0
- package/src/surfaces/checkout/extension-points.ts +21 -0
- package/src/surfaces/checkout/extension.ts +7 -0
- package/src/surfaces/checkout/index.ts +5 -0
- package/src/surfaces/checkout/shared.ts +14 -0
- package/src/utilities/registration.ts +60 -0
- package/build/esm/types/shared/index.mjs +0 -1
- package/build/esnext/types/shared/index.esnext +0 -1
- package/build/ts/types/Banner.d.ts +0 -10
- package/build/ts/types/Banner.d.ts.map +0 -1
- package/build/ts/types/BlockStack.d.ts +0 -14
- package/build/ts/types/BlockStack.d.ts.map +0 -1
- package/build/ts/types/Button.d.ts +0 -46
- package/build/ts/types/Button.d.ts.map +0 -1
- package/build/ts/types/Heading.d.ts +0 -14
- package/build/ts/types/Heading.d.ts.map +0 -1
- package/build/ts/types/InlineStack.d.ts +0 -19
- package/build/ts/types/InlineStack.d.ts.map +0 -1
- package/build/ts/types/index.d.ts +0 -6
- package/build/ts/types/index.d.ts.map +0 -1
- package/build/ts/types/shared/Spacing.d.ts +0 -2
- package/build/ts/types/shared/Spacing.d.ts.map +0 -1
- package/build/ts/types/shared/index.d.ts +0 -2
- package/build/ts/types/shared/index.d.ts.map +0 -1
- package/src/types/Banner.ts +0 -12
- package/src/types/BlockStack.ts +0 -14
- package/src/types/Button.ts +0 -45
- package/src/types/Heading.ts +0 -14
- package/src/types/InlineStack.ts +0 -19
- package/src/types/index.ts +0 -5
- package/src/types/shared/Spacing.ts +0 -7
- package/src/types/shared/index.ts +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
1
|
# `@shopify/ui-extensions`
|
|
2
2
|
|
|
3
|
-
This package contains
|
|
3
|
+
This package contains the public type definitions and utilities needed to create a Shopify UI extension. This is a generalized package that is intended to be the long-term home of the surface-specific packages in this repository, like `@shopify/checkout-ui-extensions` and `@shopify/admin-ui-extensions`.
|
|
4
|
+
|
|
5
|
+
Currently, this package contains the API for two [surfaces](https://github.com/Shopify/ui-extensions-private/discussions/1770#discussion-4324275):
|
|
6
|
+
|
|
7
|
+
- [`admin`](./src/surfaces/admin)
|
|
8
|
+
- [`checkout`](./src/surfaces/checkout)
|
|
9
|
+
|
|
10
|
+
This surface-based grouping is mostly cosmetic; all extensions use the same underlying technology, and most of the same “core” components (e.g., `Layout`, `BlockStack`, etc) and capabilities (e.g., direct API access, session tokens). Separating APIs by surface makes it easier for a developer to see what is available to them in each context, and gives us a flexible system for introducing components and APIs available in only some surfaces.
|
|
11
|
+
|
|
12
|
+
An admin extension using “vanilla” JavaScript would be written as follows:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import {
|
|
16
|
+
extension,
|
|
17
|
+
TextField,
|
|
18
|
+
EditorSettings,
|
|
19
|
+
} from '@shopify/ui-extensions/admin';
|
|
20
|
+
|
|
21
|
+
export default extension(
|
|
22
|
+
'Admin::CheckoutEditor::RenderSettings',
|
|
23
|
+
(root, {settings, applySettingChange}) => {
|
|
24
|
+
const editorSettings = root.createComponent(EditorSettings);
|
|
25
|
+
|
|
26
|
+
const textfield = root.createComponent(TextField, {
|
|
27
|
+
label: 'Message',
|
|
28
|
+
helpText: 'The message to show to buyers when this extension is rendered',
|
|
29
|
+
value: settings.current.message,
|
|
30
|
+
onChange(value) {
|
|
31
|
+
applySettingsChange({key: 'message', value});
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
editorSettings.appendChild(textfield);
|
|
36
|
+
root.appendChild(editorSettings);
|
|
37
|
+
},
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## What is a “UI Extension”?
|
|
42
|
+
|
|
43
|
+
A UI extension is a JavaScript-based module that can hook in to client-side behaviors on any of Shopify’s first party UI surface areas. No matter whether the developer is embedding into the admin or checkout, whether they are rendering UI or [registering listeners for client-side events](https://shopify.dev/apps/pixels); it’s all a UI extension.
|
|
44
|
+
|
|
45
|
+
The most minimal definition of a UI extension has the following properties:
|
|
46
|
+
|
|
47
|
+
- A **name** that is presented to merchants when interacting with the extension.
|
|
48
|
+
- The **extension points** that the UI extension implements. These are represented with string identifiers that describe the surface and responsibility of the extension. For example, [`Checkout::CartLines::RenderAfter`](https://shopify.dev/api/checkout-extensions/checkout/extension-points/api) gives the UI Extension the ability to render UI after the cart lines in a checkout; [`WebPixel::Register`](https://shopify.dev/apps/pixels/pixel-extension) registers a Web Pixel to track client-side events. A UI Extension can register to support multiple extension points, and must map each to a JavaScript module in their application.
|
|
49
|
+
|
|
50
|
+
The types in this package allow us to represent additional details about the extension points developers can implement. Each extension point can define what APIs it supports, including:
|
|
51
|
+
|
|
52
|
+
- What **UI Components** are available to be rendered, and what properties those UI components accept
|
|
53
|
+
- What **imperative APIs** are provided by the host, for reading and writing data relevant to the extension
|
|
54
|
+
|
|
55
|
+
The available components and APIs can be different for each extension point. Additionally, Shopify can vary the components and APIs it provides based on many other factors at runtime, like:
|
|
56
|
+
|
|
57
|
+
- Whether an extension is built by Shopify or a third party
|
|
58
|
+
- Whether the API client that owns the extension has certain approval scopes,
|
|
59
|
+
- Whether the shop or API client has particular beta flags enabled
|
package/admin.d.ts
ADDED
package/admin.esnext
ADDED
package/admin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./build/cjs/surfaces/admin/index.ts/index");
|
package/admin.mjs
ADDED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BlockStack = void 0;
|
|
7
|
+
|
|
8
|
+
var _core = require("@remote-ui/core");
|
|
9
|
+
|
|
10
|
+
var BlockStack = (0, _core.createRemoteComponent)('BlockStack');
|
|
11
|
+
exports.BlockStack = BlockStack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# BlockStack
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Button
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Text
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TextField
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TextField = void 0;
|
|
7
|
+
|
|
8
|
+
var _core = require("@remote-ui/core");
|
|
9
|
+
|
|
10
|
+
var TextField = (0, _core.createRemoteComponent)('TextField');
|
|
11
|
+
exports.TextField = TextField;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# View
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlockStack", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _BlockStack.BlockStack;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Button", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Button.Button;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Text", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _Text.Text;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "TextField", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _TextField.TextField;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "View", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _View.View;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
var _BlockStack = require("./BlockStack/BlockStack");
|
|
38
|
+
|
|
39
|
+
var _Button = require("./Button/Button");
|
|
40
|
+
|
|
41
|
+
var _Text = require("./Text/Text");
|
|
42
|
+
|
|
43
|
+
var _TextField = require("./TextField/TextField");
|
|
44
|
+
|
|
45
|
+
var _View = require("./View/View");
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlockStack", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _BlockStack.BlockStack;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Button", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Button.Button;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Text", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _Text.Text;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "TextField", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _TextField.TextField;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "View", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _View.View;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
var _BlockStack = require("./components/BlockStack/BlockStack");
|
|
38
|
+
|
|
39
|
+
var _Button = require("./components/Button/Button");
|
|
40
|
+
|
|
41
|
+
var _Text = require("./components/Text/Text");
|
|
42
|
+
|
|
43
|
+
var _TextField = require("./components/TextField/TextField");
|
|
44
|
+
|
|
45
|
+
var _View = require("./components/View/View");
|
|
File without changes
|
package/build/cjs/index.js
CHANGED
|
@@ -1 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _api = require("./api");
|
|
8
|
+
|
|
9
|
+
Object.keys(_api).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _api[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _api[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _components = require("./components");
|
|
21
|
+
|
|
22
|
+
Object.keys(_components).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _components[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _extension = require("./extension");
|
|
34
|
+
|
|
35
|
+
Object.keys(_extension).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _extension[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _extension[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Checkout editor API
|
package/build/cjs/{types/Heading.js → surfaces/admin/api/checkout-editor/render-settings.js}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Standard admin API
|
|
File without changes
|
|
File without changes
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _components = require("../../components");
|
|
8
8
|
|
|
9
|
-
Object.keys(
|
|
9
|
+
Object.keys(_components).forEach(function (key) {
|
|
10
10
|
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] ===
|
|
11
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
12
12
|
Object.defineProperty(exports, key, {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _components[key];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
});
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
extension: true
|
|
8
|
+
};
|
|
9
|
+
exports.extension = void 0;
|
|
10
|
+
|
|
11
|
+
var _registration = require("../../utilities/registration");
|
|
12
|
+
|
|
13
|
+
var _extension = require("../../extension");
|
|
14
|
+
|
|
15
|
+
Object.keys(_extension).forEach(function (key) {
|
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
18
|
+
if (key in exports && exports[key] === _extension[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _extension[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
var extension = (0, _registration.createExtensionRegistrationFunction)();
|
|
27
|
+
exports.extension = extension;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _api = require("./api");
|
|
8
|
+
|
|
9
|
+
Object.keys(_api).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _api[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _api[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _components = require("./components");
|
|
21
|
+
|
|
22
|
+
Object.keys(_components).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _components[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _extensionPoints = require("./extension-points");
|
|
34
|
+
|
|
35
|
+
Object.keys(_extensionPoints).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _extensionPoints[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _extensionPoints[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _extension = require("./extension");
|
|
47
|
+
|
|
48
|
+
Object.keys(_extension).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _extension[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function get() {
|
|
54
|
+
return _extension[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var _shared = require("./shared");
|
|
60
|
+
|
|
61
|
+
Object.keys(_shared).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _shared[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function get() {
|
|
67
|
+
return _shared[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Checkout cart line details API
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Standard checkout API
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _components = require("../../components");
|
|
8
|
+
|
|
9
|
+
Object.keys(_components).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _components[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
extension: true
|
|
8
|
+
};
|
|
9
|
+
exports.extension = void 0;
|
|
10
|
+
|
|
11
|
+
var _registration = require("../../utilities/registration");
|
|
12
|
+
|
|
13
|
+
var _extension = require("../../extension");
|
|
14
|
+
|
|
15
|
+
Object.keys(_extension).forEach(function (key) {
|
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
18
|
+
if (key in exports && exports[key] === _extension[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _extension[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
var extension = (0, _registration.createExtensionRegistrationFunction)();
|
|
27
|
+
exports.extension = extension;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _api = require("./api");
|
|
8
|
+
|
|
9
|
+
Object.keys(_api).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _api[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _api[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _components = require("./components");
|
|
21
|
+
|
|
22
|
+
Object.keys(_components).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _components[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _extensionPoints = require("./extension-points");
|
|
34
|
+
|
|
35
|
+
Object.keys(_extensionPoints).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _extensionPoints[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _extensionPoints[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _extension = require("./extension");
|
|
47
|
+
|
|
48
|
+
Object.keys(_extension).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _extension[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function get() {
|
|
54
|
+
return _extension[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
var _shared = require("./shared");
|
|
60
|
+
|
|
61
|
+
Object.keys(_shared).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _shared[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function get() {
|
|
67
|
+
return _shared[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
File without changes
|