@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,152 +0,0 @@
1
- import type { Backend, InternalTemplate, NoCodeComponentDefinition } from '@swell/easyblocks-core';
2
- import type { SwellTheme } from '../theme';
3
- import type { ThemeGlobals, ThemeLayoutSectionGroupConfig, ThemePageSectionSchema, ThemeSectionConfig } from 'types/swell';
4
- export declare function getEasyblocksPageTemplate<T>(theme: SwellTheme, pageId: string, altTemplate?: string): Promise<T | string | undefined>;
5
- export declare function getEasyblocksPagePropsWithConfigs(themeGlobals: ThemeGlobals, allSections: ThemePageSectionSchema[], pageSections: ThemeSectionConfig[], layoutSectionGroups: ThemeLayoutSectionGroupConfig[], pageId: string): {
6
- easyblocksConfig: {
7
- components: NoCodeComponentDefinition<Record<string, any>, Record<string, any>>[];
8
- templates: InternalTemplate[];
9
- backend: Backend;
10
- hideCloseButton: boolean;
11
- allowSave: boolean;
12
- readOnly: boolean;
13
- locales: {
14
- code: string;
15
- isDefault: boolean;
16
- }[];
17
- types: {
18
- swell_css: {
19
- type: string;
20
- widget: {
21
- id: string;
22
- };
23
- };
24
- swell_locale: {
25
- type: string;
26
- widget: {
27
- id: string;
28
- };
29
- };
30
- swell_boolean: {
31
- type: string;
32
- widget: {
33
- id: string;
34
- };
35
- };
36
- swell_color: {
37
- type: string;
38
- widget: {
39
- id: string;
40
- };
41
- };
42
- swell_color_scheme: {
43
- type: string;
44
- widget: {
45
- id: string;
46
- };
47
- };
48
- swell_color_scheme_group: {
49
- type: string;
50
- widget: {
51
- id: string;
52
- };
53
- };
54
- swell_font: {
55
- type: string;
56
- widget: {
57
- id: string;
58
- };
59
- };
60
- swell_header: {
61
- type: string;
62
- widget: {
63
- id: string;
64
- };
65
- };
66
- swell_icon: {
67
- type: string;
68
- widget: {
69
- id: string;
70
- };
71
- };
72
- swell_lookup: {
73
- type: string;
74
- widget: {
75
- id: string;
76
- };
77
- };
78
- swell_menu: {
79
- type: string;
80
- widget: {
81
- id: string;
82
- };
83
- };
84
- swell_url: {
85
- type: string;
86
- widget: {
87
- id: string;
88
- };
89
- };
90
- swell_number: {
91
- type: string;
92
- widget: {
93
- id: string;
94
- };
95
- };
96
- swell_select: {
97
- type: string;
98
- widget: {
99
- id: string;
100
- };
101
- };
102
- swell_radio: {
103
- type: string;
104
- widget: {
105
- id: string;
106
- };
107
- };
108
- swell_short_text: {
109
- type: string;
110
- widget: {
111
- id: string;
112
- };
113
- };
114
- swell_long_text: {
115
- type: string;
116
- widget: {
117
- id: string;
118
- };
119
- };
120
- swell_paragraph: {
121
- type: string;
122
- widget: {
123
- id: string;
124
- };
125
- };
126
- swell_editor: {
127
- type: string;
128
- widget: {
129
- id: string;
130
- };
131
- };
132
- swell_file: {
133
- type: string;
134
- widget: {
135
- id: string;
136
- };
137
- };
138
- swell_image: {
139
- type: string;
140
- widget: {
141
- id: string;
142
- };
143
- };
144
- };
145
- tokens: {
146
- colors: never[];
147
- fonts: never[];
148
- };
149
- };
150
- };
151
- export declare function getEasyblocksComponentDefinitions(allSections: ThemePageSectionSchema[], layoutSectionGroups: ThemeLayoutSectionGroupConfig[], getComponent: (type: string, data?: unknown) => React.ComponentType): Record<string, React.ComponentType>;
152
- export declare function getEasyblocksBackend(): Backend;
@@ -1,2 +0,0 @@
1
- export * from './config';
2
- export { getThemeSettingsFromProps, getSectionSettingsFromProps, toBlockId, } from './utils';
@@ -1,23 +0,0 @@
1
- import type { SwellThemeConfig, SwellLocaleProp, ThemeLayoutSectionGroupConfig, ThemeSectionBase, ThemeSectionConfig, ThemeSectionGroup, ThemeSectionSchema, ThemeSectionSchemaData, ThemeSettingFieldSchema, ThemeSettings, ThemeSettingSectionSchema } from 'types/swell';
2
- import type { SwellTheme } from '../theme';
3
- import type { CompiledComponentConfigBase, ExternalSchemaProp } from '@swell/easyblocks-core';
4
- export declare function getAllSections(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeSectionSchema[]>;
5
- export declare function getPageSections(theme: SwellTheme, sectionGroup: ThemeSectionGroup, getSectionSchemaHandler?: (theme: SwellTheme, sectionName: string) => Promise<ThemeSectionSchemaData | undefined>): Promise<ThemeSectionConfig[]>;
6
- export declare function getLayoutSectionGroups(theme: SwellTheme, themeConfigs: SwellThemeConfig[]): Promise<ThemeLayoutSectionGroupConfig[]>;
7
- type EasyblocksFieldProps = Omit<ExternalSchemaProp, 'prop' | 'label'>;
8
- export declare function schemaToEasyblocksProps(field: ThemeSettingFieldSchema): EasyblocksFieldProps;
9
- export declare function schemaToEasyblocksValue(fields: ThemeSettingFieldSchema[] | undefined, fieldId: string, value: unknown): {} | null;
10
- export declare function getThemeSettingsFromProps(props: Record<string, unknown>, editorSchema: ThemeSettingSectionSchema[]): ThemeSettings | undefined;
11
- type ReactEasyblocksCompiledComponent = React.ReactElement<{
12
- compiled: CompiledComponentConfigBase;
13
- }>;
14
- interface PageSectionComponentProps {
15
- Blocks?: ReactEasyblocksCompiledComponent[];
16
- $locale?: SwellLocaleProp;
17
- [key: string]: unknown;
18
- }
19
- export declare function getSectionSettingsFromProps(props: PageSectionComponentProps, sectionSchema?: ThemeSectionSchema): ThemeSectionBase | undefined;
20
- export declare function toEasyblocksFieldId(fieldId?: string): string;
21
- export declare function toSchemaFieldId(fieldId?: string): string;
22
- export declare function toBlockId(id: string): string;
23
- export {};
@@ -1,9 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
1
- import type { ThemeFontConfig } from '../types/swell';
2
- /**
3
- * Map of all fonts supported by Swell.
4
- */
5
- export declare const fontMap: Array<ThemeFontConfig>;
6
- export declare const systemFonts: string[];
@@ -1,7 +0,0 @@
1
- import type { ThemeGlobals, SwellSettingsGeo } from 'types/swell';
2
- import type { ShopifyRobots } from 'types/shopify';
3
- import type { SwellTheme } from './theme';
4
- export declare function getRecordGlobals(theme: SwellTheme, record: Record<string, unknown>): Partial<ThemeGlobals>;
5
- export declare const POWERED_BY_LINK = "<a target=\"_blank\" rel=\"nofollow\" href=\"https://www.swell.is/?utm_campaign=poweredby&amp;utm_medium=swell&amp;utm_source=onlinestore\">Powered by Swell</a>";
6
- export declare function getAllCountryOptionTags(geoSettings: SwellSettingsGeo): string;
7
- export declare function getRobotsGlobals(canonicalUrl: string): ShopifyRobots;
@@ -1,16 +0,0 @@
1
- export * from './api';
2
- export * from './constants';
3
- export * from './content';
4
- export * from './easyblocks';
5
- export * from './menus';
6
- export * from './resources';
7
- export * from './theme';
8
- export * from './fonts';
9
- export * from './utils';
10
- export * from './liquid';
11
- export * from './compatibility/shopify';
12
- export * from './compatibility/shopify-objects';
13
- export * from './editor/resources';
14
- export * from './cache/html-cache';
15
- export { ContentCache } from './cache';
16
- export type { ContentCacheOptions, PutFilesResult, FileWarning } from './cache';
@@ -1,33 +0,0 @@
1
- import Color from 'color';
2
- import { Drop } from 'liquidjs';
3
- export type ColorParam = Color | string | ArrayLike<number> | number | Record<string, unknown>;
4
- export declare class ThemeColor extends Drop {
5
- color: Color;
6
- colorValues: ColorParam;
7
- red: number;
8
- green: number;
9
- blue: number;
10
- constructor(value: ThemeColor | string);
11
- static get(value: string | ThemeColor): ThemeColor;
12
- static clone(value: string | ThemeColor): ThemeColor;
13
- toString(): string;
14
- valueOf(): string;
15
- lighten(percent: number): string;
16
- darken(percent: number): string;
17
- rgb(): string;
18
- rgba(alpha?: number): string;
19
- hsl(): string;
20
- hex(): string;
21
- saturate(value: number): string;
22
- desaturate(value: number): string;
23
- modify(field: string, value: number): string;
24
- extract(field: string): string;
25
- mix(color2: ThemeColor, ratio: number): string;
26
- contrast(color2: ThemeColor): string;
27
- /**
28
- * Color perceived brightness/difference algorithms from https://www.w3.org/WAI/ER/WD-AERT/#color-contrast
29
- */
30
- difference(color2: ThemeColor): number;
31
- brightness(): number;
32
- brightnessDifference(color2: ThemeColor): number;
33
- }
@@ -1,10 +0,0 @@
1
- import { Drop } from 'liquidjs';
2
- export default class RenderDrop<T> extends Drop {
3
- #private;
4
- constructor(handler: () => T | Promise<T>);
5
- /**
6
- * For `Drop` we usually use `valueOf` to convert the `object` to a `string`.
7
- * Use `then` instead of `valueOf` since `valueOf` doesn't work for `Promise`.
8
- */
9
- then(onfulfilled: (value: unknown) => void, onrejected: (err: unknown) => void): void;
10
- }
@@ -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, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color1: string | ThemeColor, color2: string | ThemeColor) => number;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from "..";
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor) => number;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color1: string | ThemeColor, color2: string | ThemeColor) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from "..";
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, percent: number) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, value: number) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color1: string | ThemeColor, color2: string | ThemeColor) => number;
@@ -1,4 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- type ColorField = 'red' | 'green' | 'blue' | 'alpha' | 'hue' | 'saturation' | 'lightness';
3
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, field: ColorField) => string;
4
- export {};
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, percent: number) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color1: string | ThemeColor, color2: string | ThemeColor, ratio: number) => string;
@@ -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,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, value: number) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from "..";
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from "..";
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, alpha?: number) => string;
@@ -1,7 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (dateValue: string, ...params: any[]) => string;
3
- export declare function ensureDate(dateValue: string | Date): Date;
4
- export declare function getDateFilterParams(params: any[]): Record<string, unknown>;
5
- export declare function applyDateFormat(type: string, date: Date): string;
6
- export declare function isCustomDateFormat(format: string): boolean;
7
- export declare function applyStrftimeFormat(format: string, date: Date): string;
@@ -1,3 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (dateValue: string, interval: string | number, intervalCount: string | number) => string;
3
- export declare function getNextIntervalDate(date: Date, interval: string | number, intervalCount: number): number | undefined;
@@ -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): (dividend: number, divisor: number, integerArithmetic: boolean) => number;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (value: string, tag?: string) => 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,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (fontSetting: any, ...params: any[]) => string | null;
@@ -1,3 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- import { ThemeFont } from '../font';
3
- export default function bind(_liquidSwell: LiquidSwell): (fontSetting: any, prop: string, value: string) => ThemeFont | null;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (fontSetting: string) => string;
@@ -1,6 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- declare const _default: {
3
- bind(_liquidSwell: LiquidSwell): (address: any) => Promise<string>;
4
- resolve: string[][];
5
- };
6
- export default _default;
@@ -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 { LiquidSwell } from '..';
2
- import type { FilterHandler } from 'liquidjs/dist/template';
3
- export default function bind(_liquidSwell: LiquidSwell): FilterHandler;
@@ -1,8 +0,0 @@
1
- import type { LiquidSwell } from '..';
2
- import type { FilterHandler } from 'liquidjs/dist/template';
3
- export declare function getImageUrlFromInput(input: unknown, liquidSwell: LiquidSwell): Promise<unknown>;
4
- declare const filterDefinition: {
5
- bind(liquidSwell: LiquidSwell): FilterHandler;
6
- resolve: string[][];
7
- };
8
- export default filterDefinition;
@@ -1,120 +0,0 @@
1
- import asset_url from './asset_url';
2
- import brightness_difference from './brightness_difference';
3
- import color_brightness from './color_brightness';
4
- import color_contrast from './color_contrast';
5
- import color_darken from './color_darken';
6
- import color_desaturate from './color_desaturate';
7
- import color_difference from './color_difference';
8
- import color_extract from './color_extract';
9
- import color_lighten from './color_lighten';
10
- import color_mix from './color_mix';
11
- import color_modify from './color_modify';
12
- import color_saturate from './color_saturate';
13
- import color_to_hex from './color_to_hex';
14
- import color_to_hsl from './color_to_hsl';
15
- import color_to_rgb from './color_to_rgb';
16
- import date_next_interval from './date_next_interval';
17
- import date from './date';
18
- import default_errors from './default_errors';
19
- import divided_by from './divided_by';
20
- import embedded_content from './embedded_content';
21
- import escape from './escape';
22
- import font_face from './font_face';
23
- import font_modify from './font_modify';
24
- import font_url from './font_url';
25
- import handleize from './handleize';
26
- import image_tag from './image_tag';
27
- import inline_asset_content from './inline_asset_content';
28
- import json from './json';
29
- import json_pretty from './json_pretty';
30
- import locale_flag from './locale_flag';
31
- import minus from './minus';
32
- import money from './money';
33
- import money_with_currency from './money_with_currency';
34
- import money_without_currency from './money_without_currency';
35
- import money_without_trailing_zeros from './money_without_trailing_zeros';
36
- import preload_tag from './preload_tag';
37
- import script_tag from './script_tag';
38
- import stylesheet_tag from './stylesheet_tag';
39
- import time_tag from './time_tag';
40
- import translate from './translate';
41
- import where from './where';
42
- import asset_img_url from './shopify/asset_img_url';
43
- import hex_to_rgba from './shopify/hex_to_rgba';
44
- import img_url from './shopify/img_url';
45
- import payment_button from './shopify/payment_button';
46
- import payment_terms from './shopify/payment_terms';
47
- import placeholder_svg_tag from './shopify/placeholder_svg_tag';
48
- import shopify_asset_url from './shopify/shopify_asset_url';
49
- import structured_data from './shopify/structured_data';
50
- import inline_editable from './inline_editable';
51
- import type { LiquidSwell } from '..';
52
- import type { FilterHandler } from 'liquidjs/dist/template';
53
- export declare const filters: {
54
- asset_url: typeof asset_url;
55
- brightness_difference: typeof brightness_difference;
56
- color_brightness: typeof color_brightness;
57
- color_contrast: typeof color_contrast;
58
- color_darken: typeof color_darken;
59
- color_desaturate: typeof color_desaturate;
60
- color_difference: typeof color_difference;
61
- color_extract: typeof color_extract;
62
- color_lighten: typeof color_lighten;
63
- color_mix: typeof color_mix;
64
- color_modify: typeof color_modify;
65
- color_saturate: typeof color_saturate;
66
- color_to_hex: typeof color_to_hex;
67
- color_to_hsl: typeof color_to_hsl;
68
- color_to_rgb: typeof color_to_rgb;
69
- date_next_interval: typeof date_next_interval;
70
- date: typeof date;
71
- default_errors: typeof default_errors;
72
- divided_by: typeof divided_by;
73
- embedded_content: typeof embedded_content;
74
- escape: typeof escape;
75
- font_face: typeof font_face;
76
- font_modify: typeof font_modify;
77
- font_url: typeof font_url;
78
- format_address: {
79
- bind(_liquidSwell: LiquidSwell): (address: any) => Promise<string>;
80
- resolve: string[][];
81
- };
82
- handle: typeof handleize;
83
- handleize: typeof handleize;
84
- image_tag: typeof image_tag;
85
- image_url: {
86
- bind(liquidSwell: LiquidSwell): FilterHandler;
87
- resolve: string[][];
88
- };
89
- inline_asset_content: typeof inline_asset_content;
90
- json: typeof json;
91
- json_pretty: typeof json_pretty;
92
- locale_flag: typeof locale_flag;
93
- minus: typeof minus;
94
- money: typeof money;
95
- money_with_currency: typeof money_with_currency;
96
- money_without_currency: typeof money_without_currency;
97
- money_without_trailing_zeros: typeof money_without_trailing_zeros;
98
- preload_tag: typeof preload_tag;
99
- script_tag: typeof script_tag;
100
- stylesheet_tag: typeof stylesheet_tag;
101
- time_tag: typeof time_tag;
102
- translate: typeof translate;
103
- t: typeof translate;
104
- where: typeof where;
105
- asset_img_url: typeof asset_img_url;
106
- hex_to_rgba: typeof hex_to_rgba;
107
- img_url: typeof img_url;
108
- item_count_for_variant: {
109
- bind(_liquidSwell: LiquidSwell): (cart: any, variantId: string) => any;
110
- resolve: string[][];
111
- };
112
- payment_button: typeof payment_button;
113
- payment_terms: typeof payment_terms;
114
- placeholder_svg_tag: typeof placeholder_svg_tag;
115
- shopify_asset_url: typeof shopify_asset_url;
116
- structured_data: typeof structured_data;
117
- inline_editable: typeof inline_editable;
118
- };
119
- export declare function bindFilters(liquidSwell: LiquidSwell): void;
120
- export declare function resolveAsyncProps(propArg: unknown, resolveProps: boolean | string[]): Promise<unknown>;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(liquidSwell: LiquidSwell): (assetPath: string) => Promise<string>;
@@ -1,4 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (value: string | {
3
- value: string;
4
- }, key?: string) => 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,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (localeCode: unknown) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '..';
2
- export default function bind(_liquidSwell: LiquidSwell): (first: number, second: number) => number;
@@ -1,4 +0,0 @@
1
- import type { FilterHandler } from 'liquidjs/dist/template';
2
- import type { LiquidSwell } from '..';
3
- export default function bind(liquidSwell: LiquidSwell): FilterHandler;
4
- export declare function getMoneyAmount(liquidSwell: LiquidSwell, value: unknown): number;
@@ -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,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,3 +0,0 @@
1
- import { SwellStorefrontPagination } from '../../../resources';
2
- import type { LiquidSwell } from '../..';
3
- export default function bind(liquidSwell: LiquidSwell): (paginate: SwellStorefrontPagination) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell, ThemeColor } from "../..";
2
- export default function bind(_liquidSwell: LiquidSwell): (color: string | ThemeColor, alpha?: number) => 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,6 +0,0 @@
1
- import { LiquidSwell } from '../..';
2
- declare const _default: {
3
- bind(_liquidSwell: LiquidSwell): (cart: any, variantId: string) => any;
4
- resolve: string[][];
5
- };
6
- export default _default;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '../..';
2
- export default function bind(_liquidSwell: LiquidSwell): (form: any) => string;
@@ -1,2 +0,0 @@
1
- import { LiquidSwell } from '../..';
2
- export default function bind(_liquidSwell: LiquidSwell): (form: any) => null;