@swell/apps-sdk 1.0.95 → 1.0.96
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 +49 -49
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +49 -49
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +49 -49
- package/dist/index.mjs.map +4 -4
- package/dist/src/compatibility/drops/object-handles.d.ts +1 -1
- package/dist/src/compatibility/shopify-configs.d.ts +4 -8
- package/dist/src/compatibility/shopify-objects/resource.d.ts +1 -1
- package/dist/src/compatibility/shopify.d.ts +6 -2
- package/dist/src/constants.d.ts +2 -2
- package/dist/src/easyblocks/config.d.ts +9 -3
- package/dist/src/liquid/filters/asset_url.d.ts +3 -2
- package/dist/src/liquid/filters/default_errors.d.ts +3 -2
- package/dist/src/liquid/filters/index.d.ts +4 -2
- package/dist/src/liquid/filters/json.d.ts +3 -2
- package/dist/src/liquid/filters/json_pretty.d.ts +3 -2
- package/dist/src/liquid/filters/script_tag.d.ts +3 -0
- package/dist/src/liquid/filters/stylesheet_tag.d.ts +3 -2
- package/dist/src/liquid/filters/translate.d.ts +3 -2
- package/dist/src/liquid/index.d.ts +15 -19
- package/dist/src/liquid/tags/case.d.ts +1 -1
- package/dist/src/liquid/tags/for.d.ts +1 -1
- package/dist/src/liquid/tags/form.d.ts +1 -1
- package/dist/src/liquid/tags/inline_editable.d.ts +1 -1
- package/dist/src/liquid/tags/javascript.d.ts +1 -1
- package/dist/src/liquid/tags/layout.d.ts +1 -1
- package/dist/src/liquid/tags/paginate.d.ts +1 -1
- package/dist/src/liquid/tags/render.d.ts +1 -1
- package/dist/src/liquid/tags/section.d.ts +1 -1
- package/dist/src/liquid/tags/sections.d.ts +1 -1
- package/dist/src/liquid/tags/shopify/include.d.ts +1 -1
- package/dist/src/liquid/tags/style.d.ts +1 -1
- package/dist/src/liquid/test-helpers.d.ts +2 -0
- package/dist/src/liquid/utils.d.ts +6 -14
- package/dist/src/menus.d.ts +1 -1
- package/dist/src/theme.d.ts +15 -15
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/types/shopify.d.ts +19 -15
- package/dist/types/swell.d.ts +14 -5
- package/package.json +2 -2
package/dist/types/swell.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FormatInput } from 'swell-js';
|
|
2
2
|
import type { SwellStorefrontRecord, SwellStorefrontResource, SwellStorefrontSingleton } from '../src/resources';
|
|
3
3
|
import type { Swell, SwellStorefrontCollection, StorefrontResource } from '../src/api';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ShopifySettingRoleSchema, ShopifySettingsData, ShopifySettingsSchema } from './shopify';
|
|
5
5
|
export interface SwellApiParams {
|
|
6
6
|
url: URL | string;
|
|
7
7
|
config?: SwellAppConfig;
|
|
@@ -233,6 +233,7 @@ export interface ThemePageSchema {
|
|
|
233
233
|
slug?: string;
|
|
234
234
|
label?: string;
|
|
235
235
|
description?: string;
|
|
236
|
+
$locale?: string;
|
|
236
237
|
};
|
|
237
238
|
}
|
|
238
239
|
interface ThemePageAdditionalProps {
|
|
@@ -240,6 +241,7 @@ interface ThemePageAdditionalProps {
|
|
|
240
241
|
current: number;
|
|
241
242
|
label: string;
|
|
242
243
|
slug?: string;
|
|
244
|
+
$locale?: string;
|
|
243
245
|
}
|
|
244
246
|
export interface ThemeCustomPage extends ThemePageAdditionalProps {
|
|
245
247
|
custom: true;
|
|
@@ -254,7 +256,7 @@ export interface ThemeGlobals extends SwellData {
|
|
|
254
256
|
settings: ThemeSettings;
|
|
255
257
|
session: SwellData;
|
|
256
258
|
request: SwellPageRequest;
|
|
257
|
-
menus?: Record<string, SwellMenu>;
|
|
259
|
+
menus?: Record<string, SwellMenu | undefined>;
|
|
258
260
|
page: ThemePage;
|
|
259
261
|
cart: SwellStorefrontSingleton | {};
|
|
260
262
|
account: SwellStorefrontSingleton | null;
|
|
@@ -332,7 +334,7 @@ export interface ThemeSectionSchemaData {
|
|
|
332
334
|
limit?: number;
|
|
333
335
|
blocks?: ThemeBlockSchema[];
|
|
334
336
|
presets?: ThemePresetSchema[];
|
|
335
|
-
default?:
|
|
337
|
+
default?: ThemePresetSchema;
|
|
336
338
|
}
|
|
337
339
|
export interface ThemeSectionSchema extends ThemeSectionSchemaData {
|
|
338
340
|
id: string;
|
|
@@ -356,6 +358,7 @@ export interface ThemeSettingFieldSchema {
|
|
|
356
358
|
required?: boolean;
|
|
357
359
|
fields?: Array<ThemeSettingFieldSchema>;
|
|
358
360
|
localized?: boolean;
|
|
361
|
+
titleField?: string;
|
|
359
362
|
format?: string;
|
|
360
363
|
min?: number;
|
|
361
364
|
max?: number;
|
|
@@ -384,6 +387,7 @@ export interface ThemeSettingFieldSchema {
|
|
|
384
387
|
query?: SwellData;
|
|
385
388
|
params?: SwellData;
|
|
386
389
|
limit?: number;
|
|
390
|
+
role?: ShopifySettingRoleSchema;
|
|
387
391
|
}
|
|
388
392
|
export interface ThemeSettingSectionSchema {
|
|
389
393
|
id?: string;
|
|
@@ -396,6 +400,7 @@ export interface ThemePageSectionSchema extends ThemeSectionSchema {
|
|
|
396
400
|
export interface ThemeSectionGroupInfo {
|
|
397
401
|
prop: string;
|
|
398
402
|
label: string;
|
|
403
|
+
source: string;
|
|
399
404
|
}
|
|
400
405
|
export interface ThemePageTemplateSectionConfig {
|
|
401
406
|
type: string;
|
|
@@ -464,12 +469,16 @@ export interface ThemeFontVariantSetting {
|
|
|
464
469
|
style?: 'normal' | 'italic' | 'oblique' | string;
|
|
465
470
|
variant?: ThemeFontVariant;
|
|
466
471
|
}
|
|
472
|
+
export interface ThemeFormConfigParam {
|
|
473
|
+
name: string;
|
|
474
|
+
value: string;
|
|
475
|
+
}
|
|
467
476
|
export interface ThemeFormConfig {
|
|
468
477
|
id: string;
|
|
469
478
|
url: string;
|
|
470
479
|
return_url?: string;
|
|
471
|
-
params?:
|
|
472
|
-
handler?:
|
|
480
|
+
params?: ThemeFormConfigParam[];
|
|
481
|
+
handler?: () => void;
|
|
473
482
|
}
|
|
474
483
|
export interface ThemeFormErrorMessage {
|
|
475
484
|
code?: string;
|
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.96",
|
|
5
5
|
"description": "Swell SDK for building isomorphic apps.",
|
|
6
6
|
"author": "Swell",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"color": "^4.2.3",
|
|
45
45
|
"country-flag-icons": "1.5.18",
|
|
46
46
|
"keyv": "^5.2.3",
|
|
47
|
-
"liquidjs": "^10.
|
|
47
|
+
"liquidjs": "^10.21.0",
|
|
48
48
|
"lodash": "^4.17.21",
|
|
49
49
|
"lodash-es": "^4.17.21",
|
|
50
50
|
"qs": "^6.12.3",
|