@gem-sdk/core 1.40.0-staging.0 → 1.40.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.
@@ -228,11 +228,6 @@ const appendAnimation = (props, liquid)=>{
228
228
  tablet: getInitOpacity('tablet'),
229
229
  mobile: getInitOpacity('mobile')
230
230
  };
231
- const inheritParentStyle = {
232
- all: tag === 'Section' ? '' : 'inherit',
233
- position: 'static',
234
- transform: 'unset'
235
- };
236
231
  return render.template`
237
232
  <gp-animation
238
233
  gp-data='${JSON.stringify({
@@ -241,11 +236,12 @@ const appendAnimation = (props, liquid)=>{
241
236
  opacity
242
237
  })}'
243
238
  style="${{
244
- ...inheritParentStyle
239
+ display: 'contents'
245
240
  }}"
246
241
  >
247
242
  <div style="${{
248
- ...makeStyle.makeStyleResponsive('op', opacityObject)
243
+ ...makeStyle.makeStyleResponsive('op', opacityObject),
244
+ display: 'contents'
249
245
  }}">${liquid}</div>
250
246
  </gp-animation>
251
247
  ${render.RenderIf(convert.isLocalEnv, `<script src="{{ 'gp-animation.js' | asset_url }}" defer="defer"></script>`, `<script src="${convert.baseAssetURL}/assets-v2/gp-animation.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
@@ -52,6 +52,18 @@ const useFormatMoney = (amount, withCurrency)=>{
52
52
  case 'amount_no_decimals_with_comma_separator':
53
53
  value = formatWithDelimiters(cents, 0, '.', ',');
54
54
  break;
55
+ case 'amount_with_apostrophe_separator':
56
+ value = formatWithDelimiters(cents, 2, "'", '.');
57
+ break;
58
+ case 'amount_no_decimals_with_space_separator':
59
+ value = formatWithDelimiters(cents, 0, ' ');
60
+ break;
61
+ case 'amount_with_space_separator':
62
+ value = formatWithDelimiters(cents, 2, ' ', ',');
63
+ break;
64
+ case 'amount_with_period_and_space_separator':
65
+ value = formatWithDelimiters(cents, 2, ' ', '.');
66
+ break;
55
67
  }
56
68
  return formatString.replace(placeholderRegex, value);
57
69
  };
@@ -224,11 +224,6 @@ const appendAnimation = (props, liquid)=>{
224
224
  tablet: getInitOpacity('tablet'),
225
225
  mobile: getInitOpacity('mobile')
226
226
  };
227
- const inheritParentStyle = {
228
- all: tag === 'Section' ? '' : 'inherit',
229
- position: 'static',
230
- transform: 'unset'
231
- };
232
227
  return template`
233
228
  <gp-animation
234
229
  gp-data='${JSON.stringify({
@@ -237,11 +232,12 @@ const appendAnimation = (props, liquid)=>{
237
232
  opacity
238
233
  })}'
239
234
  style="${{
240
- ...inheritParentStyle
235
+ display: 'contents'
241
236
  }}"
242
237
  >
243
238
  <div style="${{
244
- ...makeStyleResponsive('op', opacityObject)
239
+ ...makeStyleResponsive('op', opacityObject),
240
+ display: 'contents'
245
241
  }}">${liquid}</div>
246
242
  </gp-animation>
247
243
  ${RenderIf(isLocalEnv, `<script src="{{ 'gp-animation.js' | asset_url }}" defer="defer"></script>`, `<script src="${baseAssetURL}/assets-v2/gp-animation.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
@@ -50,6 +50,18 @@ const useFormatMoney = (amount, withCurrency)=>{
50
50
  case 'amount_no_decimals_with_comma_separator':
51
51
  value = formatWithDelimiters(cents, 0, '.', ',');
52
52
  break;
53
+ case 'amount_with_apostrophe_separator':
54
+ value = formatWithDelimiters(cents, 2, "'", '.');
55
+ break;
56
+ case 'amount_no_decimals_with_space_separator':
57
+ value = formatWithDelimiters(cents, 0, ' ');
58
+ break;
59
+ case 'amount_with_space_separator':
60
+ value = formatWithDelimiters(cents, 2, ' ', ',');
61
+ break;
62
+ case 'amount_with_period_and_space_separator':
63
+ value = formatWithDelimiters(cents, 2, ' ', '.');
64
+ break;
53
65
  }
54
66
  return formatString.replace(placeholderRegex, value);
55
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.40.0-staging.0",
3
+ "version": "1.40.1",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -27,8 +27,8 @@
27
27
  "type-check": "yarn tsc --noEmit"
28
28
  },
29
29
  "devDependencies": {
30
- "@gem-sdk/adapter-shopify": "1.40.0-staging.0",
31
- "@gem-sdk/styles": "1.40.0-staging.0"
30
+ "@gem-sdk/adapter-shopify": "1.40.0",
31
+ "@gem-sdk/styles": "1.40.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-error-boundary": "4.0.10",