@shopify/ui-extensions-server-kit 5.3.0 → 5.4.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.
@@ -0,0 +1,44 @@
1
+ import * as React from "./";
2
+ export { Fragment } from "./";
3
+
4
+ export namespace JSX {
5
+ interface Element extends React.JSX.Element {}
6
+ interface ElementClass extends React.JSX.ElementClass {}
7
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
8
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
9
+ type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
10
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
11
+ interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
12
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
13
+ }
14
+
15
+ export interface JSXSource {
16
+ /**
17
+ * The source file where the element originates from.
18
+ */
19
+ fileName?: string | undefined;
20
+
21
+ /**
22
+ * The line number where the element was created.
23
+ */
24
+ lineNumber?: number | undefined;
25
+
26
+ /**
27
+ * The column number where the element was created.
28
+ */
29
+ columnNumber?: number | undefined;
30
+ }
31
+
32
+ /**
33
+ * Create a React element.
34
+ *
35
+ * You should not use this function directly. Use JSX and a transpiler instead.
36
+ */
37
+ export function jsxDEV(
38
+ type: React.ElementType,
39
+ props: unknown,
40
+ key: React.Key | undefined,
41
+ isStatic: boolean,
42
+ source?: JSXSource,
43
+ self?: unknown,
44
+ ): React.ReactElement;
@@ -0,0 +1,35 @@
1
+ import * as React from "./";
2
+ export { Fragment } from "./";
3
+
4
+ export namespace JSX {
5
+ interface Element extends React.JSX.Element {}
6
+ interface ElementClass extends React.JSX.ElementClass {}
7
+ interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
8
+ interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
9
+ type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
10
+ interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
11
+ interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
12
+ interface IntrinsicElements extends React.JSX.IntrinsicElements {}
13
+ }
14
+
15
+ /**
16
+ * Create a React element.
17
+ *
18
+ * You should not use this function directly. Use JSX and a transpiler instead.
19
+ */
20
+ export function jsx(
21
+ type: React.ElementType,
22
+ props: unknown,
23
+ key?: React.Key,
24
+ ): React.ReactElement;
25
+
26
+ /**
27
+ * Create a React element.
28
+ *
29
+ * You should not use this function directly. Use JSX and a transpiler instead.
30
+ */
31
+ export function jsxs(
32
+ type: React.ElementType,
33
+ props: unknown,
34
+ key?: React.Key,
35
+ ): React.ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/ui-extensions-server-kit",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,7 +50,7 @@
50
50
  "jsdom": "^20.0.3",
51
51
  "react": "^17.0.2",
52
52
  "vi-fetch": "^0.8.0",
53
- "vite": "6.3.5"
53
+ "vite": "6.4.1"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": "^17.0.2"
@@ -60,7 +60,6 @@
60
60
  "clean": "nx clean",
61
61
  "lint": "nx lint",
62
62
  "lint:fix": "nx lint:fix",
63
- "test": "nx run ui-extensions-server-kit:test",
64
- "test:watch": "nx test:watch"
63
+ "vitest": "vitest"
65
64
  }
66
65
  }
package/project.json CHANGED
@@ -53,20 +53,6 @@
53
53
  "command": "pnpm eslint src --fix",
54
54
  "cwd": "packages/ui-extensions-server-kit"
55
55
  }
56
- },
57
- "test": {
58
- "executor": "nx:run-commands",
59
- "options": {
60
- "command": "pnpm vitest run",
61
- "cwd": "packages/ui-extensions-server-kit"
62
- }
63
- },
64
- "test:watch": {
65
- "executor": "nx:run-commands",
66
- "options": {
67
- "command": "pnpm vitest watch",
68
- "cwd": "packages/ui-extensions-server-kit"
69
- }
70
56
  }
71
57
  }
72
58
  }
@@ -54,6 +54,7 @@ export function mockExtension(obj: DeepPartial<ExtensionPayload> = {}): Extensio
54
54
  // in a generalized, non-surprising way
55
55
  extensionPoints: obj.extensionPoints as any,
56
56
  capabilities: obj.capabilities as any,
57
+ supportedFeatures: obj.supportedFeatures as any,
57
58
  localization: obj.localization as any,
58
59
  authenticatedRedirectStartUrl: obj.authenticatedRedirectStartUrl as any,
59
60
  authenticatedRedirectRedirectUrls: obj.authenticatedRedirectRedirectUrls as any,
package/src/types.ts CHANGED
@@ -130,6 +130,10 @@ export interface ExtensionPayload {
130
130
  name: string
131
131
  version: string
132
132
  }
133
+ error?: {
134
+ message: string
135
+ file?: string
136
+ }
133
137
  }
134
138
  uuid: string
135
139
  version: string
@@ -139,6 +143,7 @@ export interface ExtensionPayload {
139
143
  handle: string
140
144
  extensionPoints: ExtensionPoints
141
145
  capabilities?: Capabilities
146
+ supportedFeatures: ExtensionSupportedFeatures
142
147
  authenticatedRedirectStartUrl?: string
143
148
  authenticatedRedirectRedirectUrls?: string[]
144
149
  localization?: FlattenedLocalization | Localization | null
@@ -154,6 +159,10 @@ export interface ExtensionPayload {
154
159
  }
155
160
  }
156
161
 
162
+ export interface ExtensionSupportedFeatures {
163
+ offlineMode: boolean
164
+ }
165
+
157
166
  export enum Status {
158
167
  Success = 'success',
159
168
  }