@spiffcommerce/theme-bridge 1.27.1-alpha.4 → 1.27.1-alpha.5
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-BV1xo7wP.js.map +1 -1
- package/dist/index-UxVSQULk.cjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,12 @@ interface ThemeConfigurationPageItem {
|
|
|
84
84
|
/**
|
|
85
85
|
* Optional: HTML code to render in the middle preview section, using Handlebars.js templating
|
|
86
86
|
* syntax to inject configuration values into the preview whenever changes are made.
|
|
87
|
+
*
|
|
88
|
+
* Available context variables are:
|
|
89
|
+
* - Every field from your configuration (that you expect to be available).
|
|
90
|
+
* - A "sampleData" object with the following fields: `{
|
|
91
|
+
* products: []{name: string};
|
|
92
|
+
* }`
|
|
87
93
|
*/
|
|
88
94
|
previewElement?: string;
|
|
89
95
|
/**
|
|
@@ -209,9 +215,18 @@ interface LimitOption {
|
|
|
209
215
|
* Generic fields which have no extra configuration and can accept default values from the Theme developer.
|
|
210
216
|
*/
|
|
211
217
|
interface GenericFieldBase extends ConfigurableField {
|
|
212
|
-
type: FieldType.Boolean | FieldType.Color | FieldType.
|
|
218
|
+
type: FieldType.Boolean | FieldType.Color | FieldType.DateRange;
|
|
213
219
|
}
|
|
214
220
|
type GenericField = GenericFieldBase & RequiredOrDefault;
|
|
221
|
+
type NumberField = ConfigurableField & RequiredOrDefault & {
|
|
222
|
+
type: FieldType.Number;
|
|
223
|
+
/** Optional: the minimum value a user can configure this to be. */
|
|
224
|
+
min?: number;
|
|
225
|
+
/** Optional: the maximum value a user can configure this to be. */
|
|
226
|
+
max?: number;
|
|
227
|
+
/** Optional: when using step controls or a slider, the value will increase by this amount. */
|
|
228
|
+
step?: number;
|
|
229
|
+
};
|
|
215
230
|
declare enum AssetType {
|
|
216
231
|
Color = "Color",
|
|
217
232
|
ColorProfile = "ColorProfile",
|
|
@@ -318,7 +333,7 @@ type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : nev
|
|
|
318
333
|
/**
|
|
319
334
|
* All field types that are configurable by a user in Hub.
|
|
320
335
|
*/
|
|
321
|
-
type ThemeConfigurationConfigurableFields = GenericField | AssetField | ConversionConfigurationField | SelectField | TextField | ListField | ObjectField | CustomObjectField | ProductCollectionField | MetafieldConfigurationField;
|
|
336
|
+
type ThemeConfigurationConfigurableFields = GenericField | NumberField | AssetField | ConversionConfigurationField | SelectField | TextField | ListField | ObjectField | CustomObjectField | ProductCollectionField | MetafieldConfigurationField;
|
|
322
337
|
/**
|
|
323
338
|
* All field types, including non-configurable ones.
|
|
324
339
|
*/
|
|
@@ -418,6 +433,9 @@ interface ThemeConfigurationSchemaFieldResource {
|
|
|
418
433
|
fields?: ThemeConfigurationSchemaFieldResource[];
|
|
419
434
|
/** When this field is type `Object` this will point to a pre-defined schema to use, if any. */
|
|
420
435
|
schema?: string;
|
|
436
|
+
min?: number;
|
|
437
|
+
max?: number;
|
|
438
|
+
step?: number;
|
|
421
439
|
}
|
|
422
440
|
interface ThemeLaunchDataResource {
|
|
423
441
|
targetFiles: ThemeLaunchDataTargetFileResource[];
|