@swell/apps-sdk 1.0.28 → 1.0.30

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.
@@ -2,5 +2,5 @@ import { StorefrontResource } from '../../resources';
2
2
  import { ShopifyCompatibility } from '../shopify';
3
3
  import { ShopifyResource } from './resource';
4
4
  import type { SwellRecord } from 'types/swell';
5
- export default function ShopifyAddress(instance: ShopifyCompatibility, address: StorefrontResource | SwellRecord): ShopifyResource;
5
+ export default function ShopifyAddress(instance: ShopifyCompatibility, address: StorefrontResource | SwellRecord, account?: StorefrontResource): ShopifyResource;
6
6
  export declare function ShopifyCountry(_instance: ShopifyCompatibility, countryCode: string): ShopifyResource;
@@ -2,11 +2,12 @@ import type { Backend } from '@swell/easyblocks-core';
2
2
  import { SwellTheme } from '../theme';
3
3
  import type { SwellThemeConfig, ThemeGlobals, ThemeLayoutSectionGroupConfig, ThemePageSectionSchema, ThemeSectionConfig } from 'types/swell';
4
4
  export declare function getEasyblocksPropsFromThemeConfigs(theme: SwellTheme, themeConfigs: SwellThemeConfig[], pageId: string): Promise<{
5
- pageTemplate: string | import("types/swell").ThemePageTemplateConfig;
5
+ pageTemplate: any;
6
6
  allSections: import("types/swell").ThemeSectionSchema[];
7
7
  pageSections: ThemeSectionConfig[];
8
8
  layoutSectionGroups: ThemeLayoutSectionGroupConfig[];
9
9
  }>;
10
+ export declare function getEasyblocksPageTemplate(theme: SwellTheme, pageId: string): Promise<any>;
10
11
  export declare function getEasyblocksPagePropsWithConfigs(themeGlobals: ThemeGlobals, allSections: ThemePageSectionSchema[], pageSections: ThemeSectionConfig[], layoutSectionGroups: ThemeLayoutSectionGroupConfig[], pageId: string): {
11
12
  easyblocksConfig: {
12
13
  components: unknown[];
@@ -20,6 +21,12 @@ export declare function getEasyblocksPagePropsWithConfigs(themeGlobals: ThemeGlo
20
21
  isDefault: boolean;
21
22
  }[];
22
23
  types: {
24
+ swell_css: {
25
+ type: string;
26
+ widget: {
27
+ id: string;
28
+ };
29
+ };
23
30
  swell_boolean: {
24
31
  type: string;
25
32
  widget: {
@@ -1,6 +1,5 @@
1
1
  import type { SwellRecord, SwellThemeConfig, ThemeLayoutSectionGroupConfig, ThemeSectionConfig, ThemeSectionGroup, ThemeSectionSchema, ThemeSettingFieldSchema } from 'types/swell';
2
2
  import type { SwellTheme } from '../theme';
3
- export declare function getPageTemplate(theme: SwellTheme, pageId: string): Promise<string | import("types/swell").ThemePageTemplateConfig>;
4
3
  export declare function getAllSections(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeSectionSchema[]>;
5
4
  export declare function getPageSections(theme: SwellTheme, sectionGroup: ThemeSectionGroup | SwellRecord, getSectionSchemaHandler?: any): Promise<ThemeSectionConfig[]>;
6
5
  export declare function getLayoutSectionGroups(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeLayoutSectionGroupConfig[]>;
@@ -17,3 +17,4 @@ export declare function removeCircularReferences(value: any): any;
17
17
  export declare function dehydrateSwellRefsInStorefrontResources(obj: any): any;
18
18
  export declare function resolveAsyncResources(response: any, resolveStorefrontResources?: boolean, resolveWithResourceMetadata?: boolean): Promise<any>;
19
19
  export declare function stringifyQueryParams(queryParams: SwellData): string;
20
+ export declare function scopeCustomCSS(custom_css: string, sectionID: string): string;
@@ -112,8 +112,8 @@ export type ShopifyObjectResourceMap = Array<ShopifyObject>;
112
112
  export interface ShopifyForm {
113
113
  type: string;
114
114
  shopifyType?: string;
115
- clientParams?(scope: SwellData, arg?: unknown): SwellData;
116
- clientHtml?(scope: SwellData, arg?: unknown): string;
115
+ clientParams?(scope: SwellData, arg?: unknown): SwellData | undefined;
116
+ clientHtml?(scope: SwellData, arg?: unknown): string | undefined;
117
117
  serverParams?(context: SwellData): SwellData;
118
118
  serverResponse?(context: SwellData): SwellData;
119
119
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@swell/apps-sdk",
3
3
  "type": "module",
4
- "version": "1.0.28",
4
+ "version": "1.0.30",
5
5
  "description": "Swell SDK for building isomorphic apps.",
6
6
  "author": "Swell",
7
7
  "license": "MIT",