@spiffcommerce/theme-bridge 1.9.0 → 1.9.2
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/dist/index.d.ts +32 -12
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
import { DesignCreationMessage, SpiffCommerceClient } from '@spiffcommerce/core';
|
|
2
2
|
|
|
3
3
|
interface ThemeConfigurationFile {
|
|
4
|
+
/**
|
|
5
|
+
* Information the theme loader needs in order to launch your theme.
|
|
6
|
+
*/
|
|
4
7
|
launchData: ThemeConfigurationLaunchData;
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* An object that describes information that's configurable by a Partner when they install your theme.
|
|
10
|
+
*/
|
|
11
|
+
configurationSchema?: ThemeConfigurationSchema;
|
|
6
12
|
}
|
|
7
13
|
declare enum ThemeFileType {
|
|
8
14
|
Javascript = "Javascript",
|
|
9
15
|
CSS = "CSS"
|
|
10
16
|
}
|
|
11
17
|
interface ThemeConfigurationLaunchData {
|
|
18
|
+
/**
|
|
19
|
+
* Files that will be loaded when launching the theme.
|
|
20
|
+
*/
|
|
12
21
|
targetFiles: ThemeConfigurationLaunchDataTargetFile[];
|
|
13
22
|
}
|
|
14
|
-
interface
|
|
23
|
+
interface LaunchFileBase {
|
|
24
|
+
/**
|
|
25
|
+
* The local path to the file.
|
|
26
|
+
*/
|
|
15
27
|
filename: string;
|
|
16
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The MIME type of the file.
|
|
30
|
+
*/
|
|
17
31
|
mimeType: string;
|
|
18
|
-
preload?: boolean;
|
|
19
32
|
}
|
|
20
|
-
interface
|
|
21
|
-
|
|
33
|
+
interface GenericLaunchFile extends LaunchFileBase {
|
|
34
|
+
type: ThemeFileType.CSS;
|
|
22
35
|
}
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
36
|
+
interface JavascriptLaunchFile extends LaunchFileBase {
|
|
37
|
+
/**
|
|
38
|
+
* When `false`, the file will be loaded immediately. When `true`, the file will instead be pre-loaded.
|
|
39
|
+
* With javascript files, this will insert them into the page as `<link rel="modulepreload" ... >`.
|
|
40
|
+
*/
|
|
41
|
+
preload?: boolean;
|
|
42
|
+
type: ThemeFileType.Javascript;
|
|
28
43
|
}
|
|
44
|
+
type ThemeConfigurationLaunchDataTargetFile = GenericLaunchFile | JavascriptLaunchFile;
|
|
29
45
|
declare enum FieldType {
|
|
30
46
|
Asset = "Asset",
|
|
31
47
|
Boolean = "Boolean",
|
|
@@ -37,6 +53,9 @@ declare enum FieldType {
|
|
|
37
53
|
SingleLineText = "SingleLineText"
|
|
38
54
|
}
|
|
39
55
|
interface ThemeConfigurationSchema {
|
|
56
|
+
/**
|
|
57
|
+
* An array of fields that a Partner can configure when they install the theme.
|
|
58
|
+
*/
|
|
40
59
|
fields: ThemeConfigurationSchemaField[];
|
|
41
60
|
}
|
|
42
61
|
interface FieldBase {
|
|
@@ -153,6 +172,7 @@ interface ThemeLaunchDataTargetFileResource {
|
|
|
153
172
|
type: ThemeFileType;
|
|
154
173
|
mimeType: string;
|
|
155
174
|
fileLink: string;
|
|
175
|
+
preload?: boolean;
|
|
156
176
|
}
|
|
157
177
|
interface ThemeInstallConfigurationResource {
|
|
158
178
|
id: string;
|
|
@@ -269,4 +289,4 @@ type SpiffDevOptions = Omit<ThemeContextTransaction, "container"> | Omit<ThemeCo
|
|
|
269
289
|
declare function setSpiffDevOptions(container: HTMLElement | string, context: SpiffDevOptions): void;
|
|
270
290
|
declare function exampleThemeInstallConfig(opts?: Partial<ThemeInstallConfigurationResource>): ThemeInstallConfigurationResource;
|
|
271
291
|
|
|
272
|
-
export { type AssetResource, AssetType, type BundleDesignCreationMessage, type DesignCreationMessageWithQuantity, FieldType, type SpiffDevOptions, type SpiffThemeLoader, type ThemeConfigurationFile, type ThemeConfigurationLaunchData, type ThemeConfigurationLaunchDataTargetFile, type ThemeConfigurationSchema, type ThemeConfigurationSchemaField, type ThemeConfigurationSchemaFieldResource, type ThemeConfigurationSchemaResource, type ThemeContext, type ThemeContextBundle, type ThemeContextBundleOptions, type ThemeContextBundleOptionsExisting, type ThemeContextBundleOptionsNew, type ThemeContextTransaction, type ThemeContextWorkflowOptions, type ThemeContextWorkflowOptionsExternalProduct, type ThemeContextWorkflowOptionsIntegrationProduct, type ThemeContextWorkflowOptionsTransaction, ThemeFileType, type ThemeInstallConfigurationField, type ThemeInstallConfigurationResource, type
|
|
292
|
+
export { type AssetResource, AssetType, type BundleDesignCreationMessage, type DesignCreationMessageWithQuantity, FieldType, type SpiffDevOptions, type SpiffThemeLoader, type ThemeConfigurationFile, type ThemeConfigurationLaunchData, type ThemeConfigurationLaunchDataTargetFile, type ThemeConfigurationSchema, type ThemeConfigurationSchemaField, type ThemeConfigurationSchemaFieldResource, type ThemeConfigurationSchemaResource, type ThemeContext, type ThemeContextBundle, type ThemeContextBundleOptions, type ThemeContextBundleOptionsExisting, type ThemeContextBundleOptionsNew, type ThemeContextTransaction, type ThemeContextWorkflowOptions, type ThemeContextWorkflowOptionsExternalProduct, type ThemeContextWorkflowOptionsIntegrationProduct, type ThemeContextWorkflowOptionsTransaction, ThemeFileType, type ThemeInstallConfigurationField, type ThemeInstallConfigurationResource, type ThemeLaunchDataResource, type ThemeLaunchDataTargetFileResource, type ThemeResource, type ThemeVersionResource, exampleThemeInstallConfig, setSpiffDevOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spiffcommerce/theme-bridge",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc && vite build",
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"@preact/preset-vite": "^2.7.0",
|
|
21
21
|
"@spiffcommerce/core": "^19.1.0",
|
|
22
22
|
"@types/node": "^20.11.16",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
24
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
25
|
+
"eslint": "^8.57.0",
|
|
26
|
+
"eslint-config-prettier": "^9.1.0",
|
|
27
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
23
28
|
"preact": "^10.19.3",
|
|
24
29
|
"prettier": "^3.2.4",
|
|
25
30
|
"ts-json-schema-generator": "^1.5.0",
|