@swell/apps-sdk 1.0.190 → 2.0.0-alpha.1

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.
Files changed (235) hide show
  1. package/README.md +188 -254
  2. package/dist/backend.d.cts +81 -0
  3. package/dist/backend.d.ts +81 -0
  4. package/dist/backend.js +154 -0
  5. package/dist/browser-refusal.d.cts +1 -0
  6. package/dist/browser-refusal.d.ts +1 -0
  7. package/dist/browser-refusal.js +2 -0
  8. package/dist/context.d.cts +7 -0
  9. package/dist/context.d.ts +7 -0
  10. package/dist/context.js +29 -0
  11. package/dist/error.d.cts +23 -0
  12. package/dist/error.d.ts +23 -0
  13. package/dist/error.js +30 -0
  14. package/dist/guard.d.cts +1 -0
  15. package/dist/guard.d.ts +1 -0
  16. package/dist/guard.js +4 -0
  17. package/dist/index.d.cts +11 -0
  18. package/dist/index.d.ts +11 -0
  19. package/dist/index.js +6 -20299
  20. package/dist/jwks.d.cts +1 -0
  21. package/dist/jwks.d.ts +1 -0
  22. package/dist/jwks.js +70 -0
  23. package/dist/request-context.d.cts +37 -0
  24. package/dist/request-context.d.ts +37 -0
  25. package/dist/request-context.js +99 -0
  26. package/dist/staff.d.cts +7 -0
  27. package/dist/staff.d.ts +7 -0
  28. package/dist/staff.js +7 -0
  29. package/dist/storefront.d.cts +28 -0
  30. package/dist/storefront.d.ts +28 -0
  31. package/dist/storefront.js +44 -0
  32. package/dist/version.d.cts +1 -0
  33. package/dist/version.d.ts +1 -0
  34. package/dist/version.js +2 -0
  35. package/dist/workflow.d.cts +1 -0
  36. package/dist/workflow.d.ts +1 -0
  37. package/dist/workflow.js +35 -0
  38. package/package.json +48 -63
  39. package/dist/index.cjs +0 -20547
  40. package/dist/index.cjs.map +0 -7
  41. package/dist/index.js.map +0 -7
  42. package/dist/index.mjs +0 -20404
  43. package/dist/index.mjs.map +0 -7
  44. package/dist/src/api.d.ts +0 -96
  45. package/dist/src/cache/cache.d.ts +0 -41
  46. package/dist/src/cache/cf-worker-kv-keyv-adapter.d.ts +0 -18
  47. package/dist/src/cache/constants.d.ts +0 -7
  48. package/dist/src/cache/content-cache.d.ts +0 -21
  49. package/dist/src/cache/html-cache/html-cache-backend.d.ts +0 -64
  50. package/dist/src/cache/html-cache/html-cache-factory.d.ts +0 -9
  51. package/dist/src/cache/html-cache/html-cache-kv.d.ts +0 -38
  52. package/dist/src/cache/html-cache/html-cache-worker.d.ts +0 -8
  53. package/dist/src/cache/html-cache/html-cache.d.ts +0 -120
  54. package/dist/src/cache/html-cache/index.d.ts +0 -4
  55. package/dist/src/cache/index.d.ts +0 -9
  56. package/dist/src/cache/kv-variety.d.ts +0 -10
  57. package/dist/src/cache/request-cache.d.ts +0 -4
  58. package/dist/src/cache/resource-cache.d.ts +0 -4
  59. package/dist/src/cache/theme-cache.d.ts +0 -4
  60. package/dist/src/cache/theme-file-cache.d.ts +0 -87
  61. package/dist/src/compatibility/drops/all_products.d.ts +0 -10
  62. package/dist/src/compatibility/drops/articles.d.ts +0 -10
  63. package/dist/src/compatibility/drops/blogs.d.ts +0 -10
  64. package/dist/src/compatibility/drops/collections.d.ts +0 -19
  65. package/dist/src/compatibility/drops/image-src.d.ts +0 -15
  66. package/dist/src/compatibility/drops/image.d.ts +0 -29
  67. package/dist/src/compatibility/drops/images.d.ts +0 -9
  68. package/dist/src/compatibility/drops/money.d.ts +0 -10
  69. package/dist/src/compatibility/drops/object-handles.d.ts +0 -6
  70. package/dist/src/compatibility/drops/pages.d.ts +0 -17
  71. package/dist/src/compatibility/drops/robots-rule.d.ts +0 -9
  72. package/dist/src/compatibility/drops/template.d.ts +0 -9
  73. package/dist/src/compatibility/shopify-configs.d.ts +0 -8
  74. package/dist/src/compatibility/shopify-fonts.d.ts +0 -1
  75. package/dist/src/compatibility/shopify-objects/address.d.ts +0 -7
  76. package/dist/src/compatibility/shopify-objects/article.d.ts +0 -7
  77. package/dist/src/compatibility/shopify-objects/blog.d.ts +0 -6
  78. package/dist/src/compatibility/shopify-objects/cart.d.ts +0 -6
  79. package/dist/src/compatibility/shopify-objects/collection.d.ts +0 -7
  80. package/dist/src/compatibility/shopify-objects/collections.d.ts +0 -6
  81. package/dist/src/compatibility/shopify-objects/content.d.ts +0 -12
  82. package/dist/src/compatibility/shopify-objects/currency.d.ts +0 -5
  83. package/dist/src/compatibility/shopify-objects/customer.d.ts +0 -6
  84. package/dist/src/compatibility/shopify-objects/filter.d.ts +0 -6
  85. package/dist/src/compatibility/shopify-objects/font.d.ts +0 -5
  86. package/dist/src/compatibility/shopify-objects/form.d.ts +0 -29
  87. package/dist/src/compatibility/shopify-objects/image.d.ts +0 -10
  88. package/dist/src/compatibility/shopify-objects/index.d.ts +0 -27
  89. package/dist/src/compatibility/shopify-objects/line_item.d.ts +0 -7
  90. package/dist/src/compatibility/shopify-objects/link.d.ts +0 -5
  91. package/dist/src/compatibility/shopify-objects/localization.d.ts +0 -5
  92. package/dist/src/compatibility/shopify-objects/media.d.ts +0 -9
  93. package/dist/src/compatibility/shopify-objects/money.d.ts +0 -3
  94. package/dist/src/compatibility/shopify-objects/order.d.ts +0 -11
  95. package/dist/src/compatibility/shopify-objects/page.d.ts +0 -5
  96. package/dist/src/compatibility/shopify-objects/paginate.d.ts +0 -5
  97. package/dist/src/compatibility/shopify-objects/predictive_search.d.ts +0 -5
  98. package/dist/src/compatibility/shopify-objects/product.d.ts +0 -9
  99. package/dist/src/compatibility/shopify-objects/recommendations.d.ts +0 -5
  100. package/dist/src/compatibility/shopify-objects/resource.d.ts +0 -27
  101. package/dist/src/compatibility/shopify-objects/search.d.ts +0 -5
  102. package/dist/src/compatibility/shopify-objects/shop.d.ts +0 -5
  103. package/dist/src/compatibility/shopify-objects/template.d.ts +0 -4
  104. package/dist/src/compatibility/shopify-objects/variant.d.ts +0 -6
  105. package/dist/src/compatibility/shopify.d.ts +0 -134
  106. package/dist/src/constants.d.ts +0 -598
  107. package/dist/src/content.d.ts +0 -8
  108. package/dist/src/easyblocks/config.d.ts +0 -152
  109. package/dist/src/easyblocks/index.d.ts +0 -2
  110. package/dist/src/easyblocks/utils.d.ts +0 -23
  111. package/dist/src/editor/resources.d.ts +0 -9
  112. package/dist/src/fonts.d.ts +0 -6
  113. package/dist/src/globals.d.ts +0 -7
  114. package/dist/src/index.d.ts +0 -16
  115. package/dist/src/liquid/color.d.ts +0 -33
  116. package/dist/src/liquid/drops/render.d.ts +0 -10
  117. package/dist/src/liquid/filters/asset_url.d.ts +0 -3
  118. package/dist/src/liquid/filters/brightness_difference.d.ts +0 -2
  119. package/dist/src/liquid/filters/color_brightness.d.ts +0 -2
  120. package/dist/src/liquid/filters/color_contrast.d.ts +0 -2
  121. package/dist/src/liquid/filters/color_darken.d.ts +0 -2
  122. package/dist/src/liquid/filters/color_desaturate.d.ts +0 -2
  123. package/dist/src/liquid/filters/color_difference.d.ts +0 -2
  124. package/dist/src/liquid/filters/color_extract.d.ts +0 -4
  125. package/dist/src/liquid/filters/color_lighten.d.ts +0 -2
  126. package/dist/src/liquid/filters/color_mix.d.ts +0 -2
  127. package/dist/src/liquid/filters/color_modify.d.ts +0 -3
  128. package/dist/src/liquid/filters/color_saturate.d.ts +0 -2
  129. package/dist/src/liquid/filters/color_to_hex.d.ts +0 -2
  130. package/dist/src/liquid/filters/color_to_hsl.d.ts +0 -2
  131. package/dist/src/liquid/filters/color_to_rgb.d.ts +0 -2
  132. package/dist/src/liquid/filters/date.d.ts +0 -7
  133. package/dist/src/liquid/filters/date_next_interval.d.ts +0 -3
  134. package/dist/src/liquid/filters/default_errors.d.ts +0 -3
  135. package/dist/src/liquid/filters/divided_by.d.ts +0 -2
  136. package/dist/src/liquid/filters/embedded_content.d.ts +0 -2
  137. package/dist/src/liquid/filters/escape.d.ts +0 -3
  138. package/dist/src/liquid/filters/font_face.d.ts +0 -2
  139. package/dist/src/liquid/filters/font_modify.d.ts +0 -3
  140. package/dist/src/liquid/filters/font_url.d.ts +0 -2
  141. package/dist/src/liquid/filters/format_address.d.ts +0 -6
  142. package/dist/src/liquid/filters/handleize.d.ts +0 -3
  143. package/dist/src/liquid/filters/image_tag.d.ts +0 -3
  144. package/dist/src/liquid/filters/image_url.d.ts +0 -8
  145. package/dist/src/liquid/filters/index.d.ts +0 -120
  146. package/dist/src/liquid/filters/inline_asset_content.d.ts +0 -2
  147. package/dist/src/liquid/filters/inline_editable.d.ts +0 -4
  148. package/dist/src/liquid/filters/json.d.ts +0 -3
  149. package/dist/src/liquid/filters/json_pretty.d.ts +0 -3
  150. package/dist/src/liquid/filters/locale_flag.d.ts +0 -2
  151. package/dist/src/liquid/filters/minus.d.ts +0 -2
  152. package/dist/src/liquid/filters/money.d.ts +0 -4
  153. package/dist/src/liquid/filters/money_with_currency.d.ts +0 -3
  154. package/dist/src/liquid/filters/money_without_currency.d.ts +0 -3
  155. package/dist/src/liquid/filters/money_without_trailing_zeros.d.ts +0 -3
  156. package/dist/src/liquid/filters/preload_tag.d.ts +0 -3
  157. package/dist/src/liquid/filters/script_tag.d.ts +0 -3
  158. package/dist/src/liquid/filters/shopify/asset_img_url.d.ts +0 -3
  159. package/dist/src/liquid/filters/shopify/default_pagination.d.ts +0 -3
  160. package/dist/src/liquid/filters/shopify/hex_to_rgba.d.ts +0 -2
  161. package/dist/src/liquid/filters/shopify/img_url.d.ts +0 -3
  162. package/dist/src/liquid/filters/shopify/item_count_for_variant.d.ts +0 -6
  163. package/dist/src/liquid/filters/shopify/payment_button.d.ts +0 -2
  164. package/dist/src/liquid/filters/shopify/payment_terms.d.ts +0 -2
  165. package/dist/src/liquid/filters/shopify/placeholder-svgs/index.d.ts +0 -5
  166. package/dist/src/liquid/filters/shopify/placeholder_svg_tag.d.ts +0 -3
  167. package/dist/src/liquid/filters/shopify/shopify_asset_url.d.ts +0 -3
  168. package/dist/src/liquid/filters/shopify/structured_data.d.ts +0 -3
  169. package/dist/src/liquid/filters/stylesheet_tag.d.ts +0 -3
  170. package/dist/src/liquid/filters/time_tag.d.ts +0 -2
  171. package/dist/src/liquid/filters/translate.d.ts +0 -3
  172. package/dist/src/liquid/filters/where.d.ts +0 -3
  173. package/dist/src/liquid/font.d.ts +0 -51
  174. package/dist/src/liquid/form.d.ts +0 -17
  175. package/dist/src/liquid/hash.d.ts +0 -5
  176. package/dist/src/liquid/index.d.ts +0 -52
  177. package/dist/src/liquid/operators.d.ts +0 -10
  178. package/dist/src/liquid/tags/assign.d.ts +0 -3
  179. package/dist/src/liquid/tags/case.d.ts +0 -3
  180. package/dist/src/liquid/tags/comment.d.ts +0 -3
  181. package/dist/src/liquid/tags/content_for.d.ts +0 -3
  182. package/dist/src/liquid/tags/doc.d.ts +0 -2
  183. package/dist/src/liquid/tags/for.d.ts +0 -3
  184. package/dist/src/liquid/tags/form.d.ts +0 -3
  185. package/dist/src/liquid/tags/if.d.ts +0 -4
  186. package/dist/src/liquid/tags/index.d.ts +0 -42
  187. package/dist/src/liquid/tags/inline_editable.d.ts +0 -3
  188. package/dist/src/liquid/tags/javascript.d.ts +0 -3
  189. package/dist/src/liquid/tags/layout.d.ts +0 -3
  190. package/dist/src/liquid/tags/paginate.d.ts +0 -3
  191. package/dist/src/liquid/tags/render.d.ts +0 -6
  192. package/dist/src/liquid/tags/section.d.ts +0 -3
  193. package/dist/src/liquid/tags/sections.d.ts +0 -3
  194. package/dist/src/liquid/tags/shopify/include.d.ts +0 -3
  195. package/dist/src/liquid/tags/shopify/schema.d.ts +0 -3
  196. package/dist/src/liquid/tags/style.d.ts +0 -3
  197. package/dist/src/liquid/tags/stylesheet.d.ts +0 -3
  198. package/dist/src/liquid/test-helpers.d.ts +0 -8
  199. package/dist/src/liquid/tokens/identifier-token.d.ts +0 -9
  200. package/dist/src/liquid/tokens/index.d.ts +0 -2
  201. package/dist/src/liquid/tokienizer.d.ts +0 -5
  202. package/dist/src/liquid/utils.d.ts +0 -45
  203. package/dist/src/menus.d.ts +0 -25
  204. package/dist/src/resources/account.d.ts +0 -6
  205. package/dist/src/resources/addresses.d.ts +0 -7
  206. package/dist/src/resources/blog.d.ts +0 -7
  207. package/dist/src/resources/blog_category.d.ts +0 -7
  208. package/dist/src/resources/cart.d.ts +0 -6
  209. package/dist/src/resources/categories.d.ts +0 -7
  210. package/dist/src/resources/category.d.ts +0 -7
  211. package/dist/src/resources/index.d.ts +0 -48
  212. package/dist/src/resources/order.d.ts +0 -7
  213. package/dist/src/resources/orders.d.ts +0 -7
  214. package/dist/src/resources/page.d.ts +0 -7
  215. package/dist/src/resources/predictive_search.d.ts +0 -6
  216. package/dist/src/resources/product.d.ts +0 -7
  217. package/dist/src/resources/product_helpers.d.ts +0 -21
  218. package/dist/src/resources/search.d.ts +0 -6
  219. package/dist/src/resources/subscription.d.ts +0 -7
  220. package/dist/src/resources/subscriptions.d.ts +0 -7
  221. package/dist/src/resources/swell_types.d.ts +0 -163
  222. package/dist/src/resources/variant.d.ts +0 -9
  223. package/dist/src/resources.d.ts +0 -113
  224. package/dist/src/theme/theme-loader.d.ts +0 -110
  225. package/dist/src/theme.d.ts +0 -204
  226. package/dist/src/utils/escape.d.ts +0 -1
  227. package/dist/src/utils/index.d.ts +0 -34
  228. package/dist/src/utils/kv-flavor.d.ts +0 -7
  229. package/dist/src/utils/logger.d.ts +0 -21
  230. package/dist/src/utils/md5.d.ts +0 -1
  231. package/dist/types/cloudflare.d.ts +0 -61
  232. package/dist/types/shopify.d.ts +0 -1035
  233. package/dist/types/swell.d.ts +0 -576
  234. package/types/index.d.ts +0 -4
  235. package/types/svg.d.ts +0 -4
@@ -1,5 +0,0 @@
1
- interface SvgImage {
2
- src: string;
3
- }
4
- declare const svgs: Record<string, SvgImage | string | undefined>;
5
- export default svgs;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '../..';
2
- import type { FilterHandler } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,3 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '../..';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,3 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '../..';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,3 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (dateValue: string, ...params: any[]) => string;
@@ -1,3 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(liquidSwell: LiquidSwell): FilterHandler;
@@ -1,3 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,51 +0,0 @@
1
- import type { ThemeFontConfig, ThemeFontVariant, ThemeFontVariantSetting } from '../../types/swell';
2
- export declare class ThemeFont {
3
- id: string;
4
- family: string;
5
- weight: number;
6
- style: string;
7
- fallback_families?: string;
8
- system: boolean;
9
- variant: ThemeFontVariant;
10
- variants: ThemeFont[];
11
- definition?: ThemeFontConfig;
12
- constructor(fontSetting: ThemeFontVariantSetting | string);
13
- static get(value: string | ThemeFont): ThemeFont;
14
- static clone(value: string | ThemeFont): ThemeFont;
15
- static findByFamily(family: string): ThemeFontConfig | undefined;
16
- static stringToSetting(fontSetting: string): {
17
- family: string;
18
- weight: number;
19
- style: string;
20
- variant: {
21
- wght: number;
22
- wdth: number | undefined;
23
- slnt: number | undefined;
24
- opsz: number | undefined;
25
- ital: number | undefined;
26
- };
27
- };
28
- static settingToString(setting: ThemeFontVariantSetting): string;
29
- static variantToString(variant: ThemeFontVariant): string;
30
- static resolveSetting(setting: ThemeFontVariantSetting): {
31
- family: string;
32
- weight: number | undefined;
33
- style: string;
34
- variant: {
35
- wght: number | undefined;
36
- wdth: number | undefined;
37
- slnt: number | undefined;
38
- opsz: number | undefined;
39
- ital: number | undefined;
40
- };
41
- };
42
- static combinedGoogleFontUrl(fontSettings: string[]): string;
43
- toString(): string;
44
- googleFamily(): string;
45
- url(): string;
46
- face(options?: {
47
- font_display?: string;
48
- }): string;
49
- modify(prop: string, value: string): ThemeFont | null;
50
- resolveValidProperty(prop: string, value: string | number): ThemeFontVariant | "italic" | "oblique" | null;
51
- }
@@ -1,17 +0,0 @@
1
- import type { SwellData, ThemeFormErrorMessages } from 'types/swell';
2
- export declare class ThemeForm {
3
- id: string;
4
- success: boolean;
5
- errors: ThemeFormErrors | null;
6
- constructor(id: string);
7
- setSuccess(success?: boolean): void;
8
- setParams(params: SwellData): void;
9
- setErrors(errors: ThemeFormErrorMessages): void;
10
- clearErrors(): void;
11
- }
12
- export declare class ThemeFormErrors {
13
- private errors;
14
- constructor(errors?: ThemeFormErrorMessages);
15
- [Symbol.iterator](): Generator<import("types/swell").ThemeFormErrorMessage, void, unknown>;
16
- some(callbackFn: (code?: string) => boolean, thisArg?: unknown): boolean;
17
- }
@@ -1,5 +0,0 @@
1
- import { Hash, Context, Tokenizer } from 'liquidjs';
2
- export default class HashSwell extends Hash {
3
- constructor(input: string | Tokenizer, jekyllStyle?: boolean | string);
4
- render(ctx: Context): Generator<unknown, Record<string, unknown>, unknown>;
5
- }
@@ -1,52 +0,0 @@
1
- import { Liquid } from 'liquidjs';
2
- import { SwellTheme } from '../theme';
3
- import type { GetAssetUrl, GetThemeConfig, GetThemeTemplateConfigByType, RenderCurrency, RenderTemplate, RenderPageSections, RenderTemplateString, RenderTranslation, ThemeSectionSchema } from 'types/swell';
4
- export * from './color';
5
- export * from './form';
6
- export * from './font';
7
- interface LiquidSwellOptions {
8
- theme: SwellTheme;
9
- getThemeConfig?: GetThemeConfig;
10
- getThemeTemplateConfigByType?: GetThemeTemplateConfigByType;
11
- getAssetUrl?: GetAssetUrl;
12
- renderTemplate?: RenderTemplate;
13
- renderTemplateString?: RenderTemplateString;
14
- renderPageSections?: RenderPageSections;
15
- renderTranslation?: RenderTranslation;
16
- renderCurrency?: RenderCurrency;
17
- isEditor: boolean;
18
- locale?: string;
19
- currency?: string;
20
- layoutName?: string;
21
- extName?: string;
22
- componentsDir?: string;
23
- sectionsDir?: string;
24
- blocksDir?: string;
25
- }
26
- export declare class LiquidSwell extends Liquid {
27
- theme: SwellTheme;
28
- getThemeConfig: GetThemeConfig;
29
- getThemeTemplateConfigByType: GetThemeTemplateConfigByType;
30
- getAssetUrl: GetAssetUrl;
31
- renderTemplate: RenderTemplate;
32
- renderTemplateString: RenderTemplateString;
33
- renderPageSections: RenderPageSections;
34
- renderTranslation: RenderTranslation;
35
- renderCurrency: RenderCurrency;
36
- isEditor: boolean;
37
- locale: string;
38
- currency: string;
39
- layoutName: string;
40
- extName: string;
41
- componentsDir: string;
42
- sectionsDir: string;
43
- blocksDir: string;
44
- lastSchema: ThemeSectionSchema | undefined;
45
- constructor({ theme, getThemeConfig, getThemeTemplateConfigByType, getAssetUrl, renderTemplate, renderTemplateString, renderPageSections, renderTranslation, renderCurrency, isEditor, locale, currency, layoutName, extName, componentsDir, sectionsDir, blocksDir, }: LiquidSwellOptions);
46
- parseAndRender(template: string, data?: object): Promise<string>;
47
- resolveFilePathByType(type: string, name: string): Promise<string | undefined>;
48
- getComponentPath(componentName: string): Promise<string>;
49
- getSectionPath(sectionName: string): Promise<string>;
50
- getSectionGroupPath(sectionName: string): Promise<string>;
51
- getThemeBlockPath(blockName: string): Promise<string>;
52
- }
@@ -1,10 +0,0 @@
1
- import type { Context } from 'liquidjs';
2
- type UnaryOperatorHandler = (operand: any, ctx: Context) => boolean;
3
- type BinaryOperatorHandler = (lhs: any, rhs: any, ctx: Context) => boolean;
4
- type CustomOperatorHandler = (lhs: any, rhs: any, ctx: Context) => any;
5
- type OperatorHandler = UnaryOperatorHandler | BinaryOperatorHandler | CustomOperatorHandler;
6
- type Operators = Record<string, OperatorHandler>;
7
- export declare const swellOperators: Operators;
8
- export declare function equal(lhs: unknown, rhs: unknown): boolean;
9
- export declare function arrayEqual(lhs: unknown[], rhs: unknown[]): boolean;
10
- export {};
@@ -1,3 +0,0 @@
1
- import type { TagClass } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { TagClass } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,2 +0,0 @@
1
- import type { TagClass } from 'liquidjs/dist/template';
2
- export default function bind(): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,4 +0,0 @@
1
- import type { TagClass } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
4
- export declare function assertEmpty<T>(predicate: T | null | undefined, message?: string): void;
@@ -1,42 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import assignTag from './assign';
3
- import caseTag from './case';
4
- import comment from './comment';
5
- import contentFor from './content_for';
6
- import doc from './doc';
7
- import forTag from './for';
8
- import form from './form';
9
- import ifTag from './if';
10
- import javascript from './javascript';
11
- import layout from './layout';
12
- import paginate from './paginate';
13
- import render from './render';
14
- import section from './section';
15
- import sections from './sections';
16
- import style from './style';
17
- import stylesheet from './stylesheet';
18
- import include from './shopify/include';
19
- import schema from './shopify/schema';
20
- import inline_editable from './inline_editable';
21
- export declare const tags: {
22
- assign: typeof assignTag;
23
- case: typeof caseTag;
24
- comment: typeof comment;
25
- content_for: typeof contentFor;
26
- doc: typeof doc;
27
- for: typeof forTag;
28
- form: typeof form;
29
- if: typeof ifTag;
30
- javascript: typeof javascript;
31
- layout: typeof layout;
32
- paginate: typeof paginate;
33
- render: typeof render;
34
- section: typeof section;
35
- sections: typeof sections;
36
- style: typeof style;
37
- include: typeof include;
38
- schema: typeof schema;
39
- stylesheet: typeof stylesheet;
40
- inline_editable: typeof inline_editable;
41
- };
42
- export declare function bindTags(liquidSwell: LiquidSwell): void;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,6 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { Context, Liquid } from 'liquidjs';
3
- import type { TagClass } from 'liquidjs/dist/template';
4
- import type { ParsedFileName } from 'liquidjs/dist/tags/render';
5
- export default function bind(liquidSwell: LiquidSwell): TagClass;
6
- export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '../..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '../..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,3 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { TagClass } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): TagClass;
@@ -1,8 +0,0 @@
1
- import { LiquidSwell } from './';
2
- import type { Swell } from '@/api';
3
- type DescribeLiquidCallbackType = (render: (template: string, data?: any) => Promise<string>, liquid: LiquidSwell) => void;
4
- export declare function describeFilter(name: string, callback: DescribeLiquidCallbackType): void;
5
- export declare function describeTag(name: string, callback: DescribeLiquidCallbackType): void;
6
- export declare function removeSpaces(value: string): string;
7
- export declare function setStorefrontLocalization(swell: Swell, locale: string, currency: string): void;
8
- export {};
@@ -1,9 +0,0 @@
1
- import { Token } from 'liquidjs';
2
- export default class IdentifierToken extends Token {
3
- input: string;
4
- begin: number;
5
- end: number;
6
- file?: string | undefined;
7
- content: string;
8
- constructor(input: string, begin: number, end: number, file?: string | undefined);
9
- }
@@ -1,2 +0,0 @@
1
- import IdentifierToken from './identifier-token';
2
- export { IdentifierToken };
@@ -1,5 +0,0 @@
1
- import { Tokenizer } from 'liquidjs';
2
- import { IdentifierToken } from './tokens';
3
- export default class TokenizerSwell extends Tokenizer {
4
- readIdentifier(): IdentifierToken;
5
- }
@@ -1,45 +0,0 @@
1
- import { Context, Drop } from 'liquidjs';
2
- export declare class ForloopDrop extends Drop {
3
- i: number;
4
- length: number;
5
- name: string;
6
- test: string;
7
- index: number;
8
- index0: number;
9
- first: boolean;
10
- last: boolean;
11
- rindex: number;
12
- rindex0: number;
13
- parentloop: ForloopDrop | null;
14
- constructor(length: number, collection: string, variable: string, parent?: ForloopDrop);
15
- next(): void;
16
- valueOf(): string;
17
- }
18
- export declare function toValue(value: unknown): unknown;
19
- export declare function isString(value: unknown): value is string;
20
- export declare function isNumber(value: unknown): value is number;
21
- export declare function isFunction(value: unknown): value is (...args: unknown[]) => unknown;
22
- export declare function toLiquid(value: unknown): unknown;
23
- export declare function isNil(value: unknown): value is undefined | null;
24
- export declare function isUndefined(value: unknown): value is undefined;
25
- export declare function isArray<T>(value: unknown): value is Array<T>;
26
- export declare function isObject(value: unknown): value is Record<string, unknown>;
27
- export declare function isIterable<T>(value: unknown): value is Iterable<T>;
28
- export declare function isLikePromise(value: unknown): value is Promise<unknown>;
29
- export declare function isTruthy(val: unknown, ctx: Context): boolean;
30
- export declare function isFalsy(val: unknown, ctx: Context): boolean;
31
- export interface Comparable {
32
- equals(rhs: unknown): boolean;
33
- gt(rhs: unknown): boolean;
34
- geq(rhs: unknown): boolean;
35
- lt(rhs: unknown): boolean;
36
- leq(rhs: unknown): boolean;
37
- }
38
- export declare function isComparable(arg: unknown): arg is Comparable;
39
- export declare function toArray<T>(val: unknown): T[];
40
- export declare function toEnumerable<T>(val: unknown): T[];
41
- export declare function resolveEnumerable<T>(val: unknown): Promise<T[]>;
42
- export declare function stringify(value: unknown): string;
43
- export declare function paramsToProps(params: (string | [string, unknown])[] | Record<string, string>): Record<string, unknown>;
44
- export declare function jsonStringifyAsync(input: unknown, space?: number): Promise<string>;
45
- export declare function resolveAllKeys(value: unknown, references?: WeakSet<object>): Promise<void>;
@@ -1,25 +0,0 @@
1
- import { SwellTheme } from './theme';
2
- import { SwellStorefrontRecord, SwellStorefrontCollection } from './api';
3
- import { type SwellMenu, type SwellMenuItem } from '../types/swell';
4
- export declare function resolveMenuSettings(theme: SwellTheme, menus: SwellMenu[], options?: {
5
- currentUrl?: string;
6
- }): Promise<Record<string, SwellMenu | undefined>>;
7
- export declare function resolveMenuItems(theme: SwellTheme, menuItems: SwellMenuItem[], options?: {
8
- currentUrl?: string;
9
- }): Promise<SwellMenuItem[]>;
10
- export declare function resolveMenuItemUrlAndResource(theme: SwellTheme, item: SwellMenuItem, options?: {
11
- trailingSlash?: boolean;
12
- }): Promise<{
13
- url: string;
14
- resource?: SwellStorefrontRecord | SwellStorefrontCollection;
15
- }>;
16
- export declare function getMenuItemValueId(value: unknown): string;
17
- export declare function getMenuItemUrlAndResource(theme: SwellTheme, menuItem: SwellMenuItem): Promise<{
18
- url: string;
19
- resource?: SwellStorefrontRecord | SwellStorefrontCollection;
20
- }>;
21
- export declare function getMenuItemStorefrontUrl(theme: SwellTheme, pageId: string, slug?: string, collectionSlug?: string): string;
22
- export declare function deferMenuItemUrlAndResource(theme: SwellTheme, pageId: string, id: string, collectionSlugOrHandler?: string | ((resource: SwellStorefrontRecord) => Promise<string>)): Promise<{
23
- url: string;
24
- resource?: SwellStorefrontRecord;
25
- }>;
@@ -1,6 +0,0 @@
1
- import { SwellStorefrontSingleton } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellAccount as SwellAccountType } from './swell_types';
4
- export default class SwellAccount extends SwellStorefrontSingleton<SwellAccountType> {
5
- constructor(swell: Swell);
6
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontCollection } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellAddress } from './swell_types';
5
- export default class SwellAddresses extends SwellStorefrontCollection<SwellAddress> {
6
- constructor(swell: Swell, query?: SwellData);
7
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellBlog as SwellBlogType } from './swell_types';
5
- export default class SwellBlog extends SwellStorefrontRecord<SwellBlogType> {
6
- constructor(swell: Swell, blogId: string, categoryId?: string, query?: SwellData);
7
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellBlogCategory as SwellBlogCategoryType } from './swell_types';
5
- export default class SwellBlogCategory extends SwellStorefrontRecord<SwellBlogCategoryType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }
@@ -1,6 +0,0 @@
1
- import { SwellStorefrontSingleton } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellCart as SwellCartType } from './swell_types';
4
- export default class SwellCart extends SwellStorefrontSingleton<SwellCartType> {
5
- constructor(swell: Swell);
6
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontCollection } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellCategory } from './swell_types';
5
- export default class SwellCategories extends SwellStorefrontCollection<SwellCategory> {
6
- constructor(swell: Swell, query?: SwellData);
7
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellCategory as SwellCategoryType } from './swell_types';
5
- export default class SwellCategory extends SwellStorefrontRecord<SwellCategoryType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }
@@ -1,48 +0,0 @@
1
- import SwellAccount from './account';
2
- import SwellAddresses from './addresses';
3
- import SwellBlog from './blog';
4
- import SwellBlogCategory from './blog_category';
5
- import SwellCart from './cart';
6
- import SwellCategory from './category';
7
- import SwellCategories from './categories';
8
- import SwellOrder from './order';
9
- import SwellOrders from './orders';
10
- import SwellPage from './page';
11
- import SwellPredictiveSearch from './predictive_search';
12
- import SwellProduct from './product';
13
- import SwellSearch from './search';
14
- import SwellSubscription from './subscription';
15
- import SwellSubscriptions from './subscriptions';
16
- import SwellVariant from './variant';
17
- export declare class AccountResource extends SwellAccount {
18
- }
19
- export declare class AccountAddressesResource extends SwellAddresses {
20
- }
21
- export declare class BlogResource extends SwellBlog {
22
- }
23
- export declare class BlogCategoryResource extends SwellBlogCategory {
24
- }
25
- export declare class CartResource extends SwellCart {
26
- }
27
- export declare class CategoryResource extends SwellCategory {
28
- }
29
- export declare class CategoriesResource extends SwellCategories {
30
- }
31
- export declare class AccountOrderResource extends SwellOrder {
32
- }
33
- export declare class AccountOrdersResource extends SwellOrders {
34
- }
35
- export declare class PageResource extends SwellPage {
36
- }
37
- export declare class PredictiveSearchResource extends SwellPredictiveSearch {
38
- }
39
- export declare class ProductResource extends SwellProduct {
40
- }
41
- export declare class SearchResource extends SwellSearch {
42
- }
43
- export declare class AccountSubscriptionResource extends SwellSubscription {
44
- }
45
- export declare class AccountSubscriptionsResource extends SwellSubscriptions {
46
- }
47
- export declare class VariantResource extends SwellVariant {
48
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellOrder as SwellOrderType } from './swell_types';
4
- import type { SwellData } from 'types/swell';
5
- export default class SwellOrder extends SwellStorefrontRecord<SwellOrderType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontCollection } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellOrder } from './swell_types';
4
- import type { SwellData } from 'types/swell';
5
- export default class SwellOrders extends SwellStorefrontCollection<SwellOrder> {
6
- constructor(swell: Swell, query?: SwellData);
7
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellPage as SwellPageType } from './swell_types';
5
- export default class SwellPage extends SwellStorefrontRecord<SwellPageType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }
@@ -1,6 +0,0 @@
1
- import { StorefrontResource } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellPredictiveSearch as SwellPredictiveSearchType } from './swell_types';
4
- export default class SwellPredictiveSearch extends StorefrontResource<SwellPredictiveSearchType> {
5
- constructor(swell: Swell, query?: string);
6
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellData } from 'types/swell';
4
- import type { SwellProduct as SwellProductType } from './swell_types';
5
- export default class SwellProduct extends SwellStorefrontRecord<SwellProductType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }
@@ -1,21 +0,0 @@
1
- import type { SwellData, SwellProductFilter } from 'types/swell';
2
- import type { SwellProduct, SwellProductOption, SwellProductOptionValue, SwellProductPurchaseOptions, SwellSortOption, SwellVariant } from './swell_types';
3
- import type { Swell } from '@/api';
4
- export declare function isGiftcard(product: SwellProduct): boolean;
5
- export declare function isOptionAvailable(product: SwellProduct, option: SwellProductOption): boolean;
6
- export declare function isProductAvailable(product: SwellProduct, variant?: SwellVariant): boolean;
7
- export declare function getAvailableVariants(product: SwellProduct): SwellVariant[];
8
- export declare function isOptionValueAvailable(option: SwellProductOption, value: SwellProductOptionValue, product: SwellProduct, availableVariants?: SwellVariant[]): boolean;
9
- export declare function isOptionValueSelected(option: SwellProductOption, value: SwellProductOptionValue, product: SwellProduct, queryParams: SwellData, selectedVariant?: SwellVariant): boolean;
10
- export declare function getSelectedVariant(product: SwellProduct, queryParams: SwellData): SwellVariant | undefined;
11
- export declare function getSelectedVariantOptionValues(product: SwellProduct, queryParams: SwellData, variant?: SwellVariant): string[];
12
- export declare function getPurchaseOptions(product: SwellProduct, queryParams: SwellData): SwellProductPurchaseOptions | null;
13
- export declare function getProductFilters(swell: Swell, productQuery?: SwellData): Promise<{
14
- filter_options: SwellProductFilter[];
15
- sort: string | undefined;
16
- sort_options: SwellSortOption[];
17
- }>;
18
- export declare function productQueryWithFilters(swell: Swell, query?: SwellData): {
19
- sort: string | undefined;
20
- $filters: Record<string, unknown>;
21
- };
@@ -1,6 +0,0 @@
1
- import { StorefrontResource } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellSearch as SwellSearchType } from './swell_types';
4
- export default class SwellSearch extends StorefrontResource<SwellSearchType> {
5
- constructor(swell: Swell, query?: string);
6
- }
@@ -1,7 +0,0 @@
1
- import { SwellStorefrontRecord } from '@/resources';
2
- import type { Swell } from '@/api';
3
- import type { SwellSubscription as SwellSubscriptionType } from './swell_types';
4
- import type { SwellData } from 'types/swell';
5
- export default class SwellSubscription extends SwellStorefrontRecord<SwellSubscriptionType> {
6
- constructor(swell: Swell, id: string, query?: SwellData);
7
- }