@swell/apps-sdk 1.0.20 → 1.0.21
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.cjs +19 -19
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +19 -19
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +19 -19
- package/dist/index.mjs.map +4 -4
- package/dist/jest.config.d.ts +14 -0
- package/dist/src/api.d.ts +1 -0
- package/dist/src/easyblocks/config.d.ts +6 -0
- package/dist/src/easyblocks/utils.d.ts +2 -0
- package/dist/src/editor/resources.d.ts +9 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/liquid/color.d.ts +1 -1
- package/dist/src/liquid/filters/color_desaturate.d.ts +1 -1
- package/dist/src/liquid/filters/color_lighten.d.ts +1 -1
- package/dist/src/liquid/filters/color_mix.d.ts +1 -1
- package/dist/src/liquid/filters/color_saturate.d.ts +1 -1
- package/dist/src/liquid/filters/date.d.ts +3 -6
- package/dist/src/liquid/filters/divided_by.d.ts +2 -0
- package/dist/src/liquid/filters/font_face.d.ts +1 -1
- package/dist/src/liquid/filters/image_tag.d.ts +1 -1
- package/dist/src/liquid/filters/image_url.d.ts +1 -1
- package/dist/src/liquid/filters/index.d.ts +3 -1
- package/dist/src/liquid/filters/money.d.ts +1 -1
- package/dist/src/liquid/filters/time_tag.d.ts +1 -1
- package/dist/src/liquid/filters/translate.d.ts +1 -1
- package/dist/src/liquid/utils.d.ts +1 -1
- package/dist/src/resources.d.ts +2 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/test/liquid/filters/asset_url.test.d.ts +1 -0
- package/dist/test/liquid/filters/brightness_difference.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_brightness.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_contrast.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_darken.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_desaturate.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_difference.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_extract.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_lighten.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_mix.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_modify.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_saturate.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_to_hex.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_to_hsl.test.d.ts +1 -0
- package/dist/test/liquid/filters/color_to_rgb.test.d.ts +1 -0
- package/dist/test/liquid/filters/date.test.d.ts +1 -0
- package/dist/test/liquid/filters/default_errors.test.d.ts +1 -0
- package/dist/test/liquid/filters/divided_by.test.d.ts +1 -0
- package/dist/test/liquid/filters/font_face.test.d.ts +1 -0
- package/dist/test/liquid/filters/font_modify.test.d.ts +1 -0
- package/dist/test/liquid/filters/font_url.test.d.ts +1 -0
- package/dist/test/liquid/filters/format_address.test.d.ts +1 -0
- package/dist/test/liquid/filters/image_tag.test.d.ts +1 -0
- package/dist/test/liquid/filters/image_url.test.d.ts +1 -0
- package/dist/test/liquid/filters/inline_editable.test.d.ts +1 -0
- package/dist/test/liquid/filters/json.test.d.ts +1 -0
- package/dist/test/liquid/filters/json_pretty.test.d.ts +1 -0
- package/dist/test/liquid/filters/money.test.d.ts +1 -0
- package/dist/test/liquid/filters/money_with_currency.test.d.ts +1 -0
- package/dist/test/liquid/filters/money_without_currency.test.d.ts +1 -0
- package/dist/test/liquid/filters/money_without_trailing_zeros.test.d.ts +1 -0
- package/dist/test/liquid/filters/stylesheet_tag.test.d.ts +1 -0
- package/dist/test/liquid/filters/time_tag.test.d.ts +1 -0
- package/dist/test/liquid/filters/translate.test.d.ts +1 -0
- package/dist/test/liquid/filters/where.test.d.ts +1 -0
- package/dist/test/liquid/helpers.d.ts +6 -0
- package/dist/test/liquid/tags/case.test.d.ts +1 -0
- package/dist/test/liquid/tags/for.test.d.ts +1 -0
- package/dist/test/liquid/tags/form.test.d.ts +1 -0
- package/dist/test/liquid/tags/inline_editable.test.d.ts +1 -0
- package/dist/test/liquid/tags/javascript.test.d.ts +1 -0
- package/dist/test/liquid/tags/style.test.d.ts +1 -0
- package/dist/types/shopify.d.ts +1 -1
- package/dist/types/swell.d.ts +8 -2
- package/package.json +6 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let roots: string[];
|
|
3
|
+
let transform: {
|
|
4
|
+
'^.+\\.(ts|js)$': string;
|
|
5
|
+
};
|
|
6
|
+
let testEnvironment: string;
|
|
7
|
+
let moduleFileExtensions: string[];
|
|
8
|
+
let moduleNameMapper: {
|
|
9
|
+
'^@/(.*)$': string;
|
|
10
|
+
};
|
|
11
|
+
let extensionsToTreatAsEsm: string[];
|
|
12
|
+
let transformIgnorePatterns: string[];
|
|
13
|
+
}
|
|
14
|
+
export default _default;
|
package/dist/src/api.d.ts
CHANGED
|
@@ -104,6 +104,12 @@ export declare function getEasyblocksPagePropsWithConfigs(themeGlobals: ThemeGlo
|
|
|
104
104
|
id: string;
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
|
+
swell_paragraph: {
|
|
108
|
+
type: string;
|
|
109
|
+
widget: {
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
107
113
|
swell_editor: {
|
|
108
114
|
type: string;
|
|
109
115
|
widget: {
|
|
@@ -29,8 +29,10 @@ export declare function schemaToEasyblocksValue(fields: ThemeSettingFieldSchema[
|
|
|
29
29
|
export declare function getThemeSettingsFromProps(props: any, editorSchema: any[]): any;
|
|
30
30
|
export declare function getSectionSettingsFromProps(props: any, sectionSchema: any): {
|
|
31
31
|
settings: any;
|
|
32
|
+
id: any;
|
|
32
33
|
blocks: any;
|
|
33
34
|
} | {
|
|
34
35
|
settings?: undefined;
|
|
36
|
+
id?: undefined;
|
|
35
37
|
blocks?: undefined;
|
|
36
38
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Swell } from '@/api';
|
|
2
|
+
import { SwellStorefrontRecord, SwellStorefrontSingleton } from '@/resources';
|
|
3
|
+
import type { SwellData } from 'types/swell';
|
|
4
|
+
export declare class MockRecordResource extends SwellStorefrontRecord {
|
|
5
|
+
constructor(swell: Swell, slug: string, query?: SwellData);
|
|
6
|
+
}
|
|
7
|
+
export declare class MockRecordSingleton extends SwellStorefrontSingleton {
|
|
8
|
+
constructor(swell: Swell, slug: string, query?: SwellData);
|
|
9
|
+
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell, ThemeColor } from
|
|
1
|
+
import { LiquidSwell, ThemeColor } from '..';
|
|
2
2
|
export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, value: number) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell, ThemeColor } from
|
|
1
|
+
import { LiquidSwell, ThemeColor } from '..';
|
|
2
2
|
export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, percent: number) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell, ThemeColor } from
|
|
1
|
+
import { LiquidSwell, ThemeColor } from '..';
|
|
2
2
|
export default function bind(_liquidSwell: LiquidSwell): (color1: string | ThemeColor, color2: string | ThemeColor, ratio: number) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell, ThemeColor } from
|
|
1
|
+
import { LiquidSwell, ThemeColor } from '..';
|
|
2
2
|
export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, value: number) => string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { LiquidSwell } from '..';
|
|
2
|
-
export default function bind(_liquidSwell: LiquidSwell): (dateValue: string,
|
|
2
|
+
export default function bind(_liquidSwell: LiquidSwell): (dateValue: string, ...params: any[]) => string;
|
|
3
3
|
export declare function ensureDate(dateValue: string | Date): Date;
|
|
4
|
-
export declare function getDateFilterParams(
|
|
5
|
-
format: unknown;
|
|
6
|
-
datetime: unknown;
|
|
7
|
-
strFormat: string | undefined;
|
|
8
|
-
};
|
|
4
|
+
export declare function getDateFilterParams(params: any[]): Record<string, unknown>;
|
|
9
5
|
export declare function applyDateFormat(type: string, date: Date): string;
|
|
6
|
+
export declare function isCustomDateFormat(format: string): boolean;
|
|
10
7
|
export declare function applyStrftimeFormat(format: string, date: Date): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LiquidSwell } from '..';
|
|
2
|
-
export default function bind(_liquidSwell: LiquidSwell): (fontSetting: any, params: any[]) => string | null;
|
|
2
|
+
export default function bind(_liquidSwell: LiquidSwell): (fontSetting: any, ...params: any[]) => string | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LiquidSwell } from '..';
|
|
2
|
-
export default function bind(_liquidSwell: LiquidSwell): (imageUrl: string, params: any[]) => string;
|
|
2
|
+
export default function bind(_liquidSwell: LiquidSwell): (imageUrl: string, ...params: any[]) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LiquidSwell } from '..';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
bind(_liquidSwell: LiquidSwell): (imageField: any, params: any[]) => Promise<string>;
|
|
3
|
+
bind(_liquidSwell: LiquidSwell): (imageField: any, ...params: any[]) => Promise<string>;
|
|
4
4
|
resolve: string[][];
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
@@ -16,6 +16,7 @@ import color_to_hsl from './color_to_hsl';
|
|
|
16
16
|
import color_to_rgb from './color_to_rgb';
|
|
17
17
|
import date from './date';
|
|
18
18
|
import default_errors from './default_errors';
|
|
19
|
+
import divided_by from './divided_by';
|
|
19
20
|
import font_face from './font_face';
|
|
20
21
|
import font_modify from './font_modify';
|
|
21
22
|
import font_url from './font_url';
|
|
@@ -53,6 +54,7 @@ export declare const filters: {
|
|
|
53
54
|
color_to_rgb: typeof color_to_rgb;
|
|
54
55
|
date: typeof date;
|
|
55
56
|
default_errors: typeof default_errors;
|
|
57
|
+
divided_by: typeof divided_by;
|
|
56
58
|
font_face: typeof font_face;
|
|
57
59
|
font_modify: typeof font_modify;
|
|
58
60
|
font_url: typeof font_url;
|
|
@@ -62,7 +64,7 @@ export declare const filters: {
|
|
|
62
64
|
};
|
|
63
65
|
image_tag: typeof image_tag;
|
|
64
66
|
image_url: {
|
|
65
|
-
bind(_liquidSwell: LiquidSwell): (imageField: any, params: any[]) => Promise<string>;
|
|
67
|
+
bind(_liquidSwell: LiquidSwell): (imageField: any, ...params: any[]) => Promise<string>;
|
|
66
68
|
resolve: string[][];
|
|
67
69
|
};
|
|
68
70
|
json: typeof json;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell } from
|
|
1
|
+
import { LiquidSwell } from '..';
|
|
2
2
|
export default function bind(liquidSwell: LiquidSwell): (value: number) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LiquidSwell } from '..';
|
|
2
|
-
export default function bind(_liquidSwell: LiquidSwell): (dateValue: string,
|
|
2
|
+
export default function bind(_liquidSwell: LiquidSwell): (dateValue: string, ...params: any[]) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LiquidSwell } from
|
|
1
|
+
import { LiquidSwell } from '..';
|
|
2
2
|
export default function bind(liquidSwell: LiquidSwell): (key: string, params?: any[]) => Promise<string>;
|
|
@@ -27,7 +27,7 @@ export declare function isString(value: unknown): value is string;
|
|
|
27
27
|
export declare function isNumber(value: unknown): value is number;
|
|
28
28
|
export declare function isFunction(value: unknown): value is Function;
|
|
29
29
|
export declare function toLiquid(value: unknown): unknown;
|
|
30
|
-
export declare function isNil(value: unknown): value is
|
|
30
|
+
export declare function isNil(value: unknown): value is undefined | null;
|
|
31
31
|
export declare function isUndefined(value: unknown): value is undefined;
|
|
32
32
|
export declare function isArray<T>(value: unknown): value is Array<T>;
|
|
33
33
|
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
package/dist/src/resources.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class StorefrontResource<T extends SwellData = SwellData> {
|
|
|
17
17
|
_setGetter(getter: StorefrontResourceGetter<T>): void;
|
|
18
18
|
_resolve(): Promise<T | null | undefined>;
|
|
19
19
|
_isResultResolved(): boolean;
|
|
20
|
-
resolve(): Promise<any>;
|
|
20
|
+
resolve(resolveStorefrontResources?: boolean, resourceMetadata?: boolean): Promise<any>;
|
|
21
21
|
toObject(): {} | null;
|
|
22
22
|
toJSON(): {} | null;
|
|
23
23
|
valueOf(): Promise<any>;
|
|
@@ -45,6 +45,7 @@ export declare class SwellStorefrontCollection<T extends SwellCollection = Swell
|
|
|
45
45
|
pages?: SwellCollectionPages;
|
|
46
46
|
page_count?: number;
|
|
47
47
|
limit: number;
|
|
48
|
+
name?: string;
|
|
48
49
|
constructor(swell: Swell, collection: string, query?: SwellData, getter?: StorefrontResourceGetter<T>);
|
|
49
50
|
_getProxy(): SwellStorefrontCollection<T>;
|
|
50
51
|
_initQuery(query: SwellData): SwellData;
|
|
@@ -15,5 +15,5 @@ export declare function forEachKeyDeep(obj: any, fn: (key: string, value: any) =
|
|
|
15
15
|
export declare function findCircularReferences(value: any): unknown[];
|
|
16
16
|
export declare function removeCircularReferences(value: any): any;
|
|
17
17
|
export declare function dehydrateSwellRefsInStorefrontResources(obj: any): any;
|
|
18
|
-
export declare function resolveAsyncResources(response: any, resolveStorefrontResources?: boolean): Promise<any>;
|
|
18
|
+
export declare function resolveAsyncResources(response: any, resolveStorefrontResources?: boolean, resolveWithResourceMetadata?: boolean): Promise<any>;
|
|
19
19
|
export declare function stringifyQueryParams(queryParams: SwellData): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LiquidSwell } from '@/liquid';
|
|
2
|
+
type DescribeLiquidCallbackType = (render: (template: string, data?: any) => Promise<string>, liquid: LiquidSwell) => void;
|
|
3
|
+
export declare function describeFilter(name: string, callback: DescribeLiquidCallbackType): void;
|
|
4
|
+
export declare function describeTag(name: string, callback: DescribeLiquidCallbackType): void;
|
|
5
|
+
export declare function removeSpaces(value: string): string;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/shopify.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ShopifyResource } from '../src/compatibility/shopify-objects/resou
|
|
|
3
3
|
import type { ShopifyCompatibility } from '../src/compatibility/shopify';
|
|
4
4
|
import type { StorefrontResource } from '../src/resources';
|
|
5
5
|
export type ShopifyBasicInputType = 'text' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'number' | 'range';
|
|
6
|
-
export type ShopifySpecializedInputType = 'article' | 'blog' | 'collection' | 'collection_list' | 'color' | 'color_background' | 'color_scheme' | 'color_scheme_group' | 'font_picker' | 'header' | 'html' | 'image_picker' | 'inline_richtext' | 'link_list' | 'liquid' | 'page' | 'page' | 'product' | 'product_list' | 'richtext' | 'text_alignment' | 'url' | 'video' | 'video_url';
|
|
6
|
+
export type ShopifySpecializedInputType = 'article' | 'blog' | 'collection' | 'collection_list' | 'color' | 'color_background' | 'color_scheme' | 'color_scheme_group' | 'font_picker' | 'header' | 'paragraph' | 'html' | 'image_picker' | 'inline_richtext' | 'link_list' | 'liquid' | 'page' | 'page' | 'product' | 'product_list' | 'richtext' | 'text_alignment' | 'url' | 'video' | 'video_url';
|
|
7
7
|
export interface ShopifyBgStyleSchema {
|
|
8
8
|
solid: string;
|
|
9
9
|
gradient: string;
|
package/dist/types/swell.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export interface SwellAppShopifyCompatibilityConfig {
|
|
|
30
30
|
}>;
|
|
31
31
|
forms: Array<{
|
|
32
32
|
id: string;
|
|
33
|
+
shopify_type: string;
|
|
33
34
|
client_params: Array<{
|
|
34
35
|
name: string;
|
|
35
36
|
value: string;
|
|
@@ -49,6 +50,11 @@ export interface SwellAppStorefrontThemePage {
|
|
|
49
50
|
export interface SwellAppStorefrontThemeProps {
|
|
50
51
|
provider: 'app';
|
|
51
52
|
pages: Array<SwellAppStorefrontThemePage>;
|
|
53
|
+
resources?: SwellAppStorefrontThemeResources;
|
|
54
|
+
}
|
|
55
|
+
export interface SwellAppStorefrontThemeResources {
|
|
56
|
+
singletons: Record<string, string>;
|
|
57
|
+
records: Record<string, string>;
|
|
52
58
|
}
|
|
53
59
|
export interface SwellErrorOptions {
|
|
54
60
|
status?: number;
|
|
@@ -213,7 +219,7 @@ export interface ThemeSectionSchema {
|
|
|
213
219
|
presets?: ThemePresetSchema[];
|
|
214
220
|
default?: ShopifySettingSchema;
|
|
215
221
|
}
|
|
216
|
-
export type ThemeSettingBasicInputType = 'short_text' | 'long_text' | 'boolean' | 'number' | 'date' | 'select' | 'asset' | 'tags' | 'collection' | 'color' | 'color_scheme' | 'color_scheme_group' | 'font' | 'header' | 'lookup' | 'generic_lookup' | 'menu' | 'icon' | 'field_group';
|
|
222
|
+
export type ThemeSettingBasicInputType = 'short_text' | 'long_text' | 'paragraph' | 'boolean' | 'number' | 'date' | 'select' | 'asset' | 'tags' | 'collection' | 'color' | 'color_scheme' | 'color_scheme_group' | 'font' | 'header' | 'lookup' | 'generic_lookup' | 'menu' | 'icon' | 'field_group';
|
|
217
223
|
export type ThemeSettingAliasInputType = 'text' | 'textarea' | 'rich_text' | 'asset' | 'phone' | 'email' | 'url' | 'slug' | 'basic_html' | 'rich_html' | 'markdown' | 'liquid' | 'checkbox' | 'toggle' | 'image' | 'document' | 'video' | 'radio' | 'dropdown' | 'checkboxes' | 'integer' | 'float' | 'currency' | 'percent' | 'slider' | 'time' | 'datetime' | 'child_collection' | 'product_lookup' | 'category_lookup' | 'customer_lookup';
|
|
218
224
|
export interface OptionItem {
|
|
219
225
|
label: string;
|
|
@@ -356,7 +362,7 @@ export interface ThemeFormErrorMessage {
|
|
|
356
362
|
field_label?: string;
|
|
357
363
|
}
|
|
358
364
|
export type ThemeFormErrorMessages = Array<ThemeFormErrorMessage>;
|
|
359
|
-
export type CFWorkerKVGetType =
|
|
365
|
+
export type CFWorkerKVGetType = 'text' | 'json' | 'arrayBuffer' | 'stream';
|
|
360
366
|
export interface CFWorkerKVGetOptions<T extends CFWorkerKVGetType> {
|
|
361
367
|
cacheTtl: number;
|
|
362
368
|
type: T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swell/apps-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.21",
|
|
5
5
|
"description": "Swell SDK for building isomorphic apps.",
|
|
6
6
|
"author": "Swell",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,17 +32,21 @@
|
|
|
32
32
|
"prebuild": "rimraf dist",
|
|
33
33
|
"build": "node scripts/build.mjs",
|
|
34
34
|
"postbuild": "tsc --project tsconfig.build.json",
|
|
35
|
-
"watch": "node scripts/build.mjs watch"
|
|
35
|
+
"watch": "node scripts/build.mjs watch",
|
|
36
|
+
"test": "jest --config=./jest.config.js"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@kruining/waterlogged": "^1.1.45",
|
|
39
40
|
"@types/color": "^3.0.6",
|
|
41
|
+
"@types/jest": "29.5.14",
|
|
40
42
|
"@types/lodash-es": "^4.17.12",
|
|
41
43
|
"@types/qs": "^6.9.15",
|
|
42
44
|
"@types/react": "^18.2.64",
|
|
43
45
|
"@types/react-dom": "^18.2.21",
|
|
44
46
|
"@types/strftime": "^0.9.8",
|
|
45
47
|
"esbuild": "0.20.2",
|
|
48
|
+
"esbuild-jest": "0.5.0",
|
|
49
|
+
"jest": "29.7.0",
|
|
46
50
|
"rimraf": "^6.0.1",
|
|
47
51
|
"typescript": "^5.3.3"
|
|
48
52
|
},
|