@gem-sdk/core 1.8.22 → 1.8.27

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,6 +2,7 @@
2
2
 
3
3
  const disableWrap = [
4
4
  'Col',
5
+ 'CollectionBanner',
5
6
  'Row',
6
7
  'Section',
7
8
  'Image',
@@ -5,8 +5,13 @@ var react = require('react');
5
5
  var zustand = require('zustand');
6
6
 
7
7
  const CollectionContext = /*#__PURE__*/ react.createContext(null);
8
- const createCollectionProvider = (data)=>zustand.createStore(()=>({
9
- ...data
8
+ const createCollectionProvider = (data)=>zustand.createStore((set)=>({
9
+ ...data,
10
+ changeCollectionStore: ({ collection })=>{
11
+ set({
12
+ collection: collection
13
+ });
14
+ }
10
15
  }));
11
16
  const CollectionProvider = ({ collection , children })=>{
12
17
  const store = react.useMemo(()=>{
@@ -139,6 +139,13 @@ function composeAdvanceStyle(data, tag) {
139
139
  });
140
140
  } else {
141
141
  styles[`--${attr}`] = getAttrValue(attr, value, tag);
142
+ if (attr === 'hasBoxShadow' && data.boxShadow) {
143
+ Object.assign(styles, shadow.getStyleShadow({
144
+ value: data.boxShadow,
145
+ styleAppliedFor: 'box-shadow',
146
+ isEnableShadow: data.hasBoxShadow
147
+ }));
148
+ }
142
149
  }
143
150
  });
144
151
  return styles;
@@ -1,5 +1,6 @@
1
1
  const disableWrap = [
2
2
  'Col',
3
+ 'CollectionBanner',
3
4
  'Row',
4
5
  'Section',
5
6
  'Image',
@@ -3,8 +3,13 @@ import { useMemo, useContext, createContext } from 'react';
3
3
  import { useStore, createStore } from 'zustand';
4
4
 
5
5
  const CollectionContext = /*#__PURE__*/ createContext(null);
6
- const createCollectionProvider = (data)=>createStore(()=>({
7
- ...data
6
+ const createCollectionProvider = (data)=>createStore((set)=>({
7
+ ...data,
8
+ changeCollectionStore: ({ collection })=>{
9
+ set({
10
+ collection: collection
11
+ });
12
+ }
8
13
  }));
9
14
  const CollectionProvider = ({ collection , children })=>{
10
15
  const store = useMemo(()=>{
@@ -137,6 +137,13 @@ function composeAdvanceStyle(data, tag) {
137
137
  });
138
138
  } else {
139
139
  styles[`--${attr}`] = getAttrValue(attr, value, tag);
140
+ if (attr === 'hasBoxShadow' && data.boxShadow) {
141
+ Object.assign(styles, getStyleShadow({
142
+ value: data.boxShadow,
143
+ styleAppliedFor: 'box-shadow',
144
+ isEnableShadow: data.hasBoxShadow
145
+ }));
146
+ }
140
147
  }
141
148
  });
142
149
  return styles;
@@ -7036,6 +7036,9 @@ type CollectionSelectFragment = Pick<Collection, 'id' | 'createdAt' | 'updatedAt
7036
7036
 
7037
7037
  type CollectionContextProps = {
7038
7038
  collection?: CollectionSelectFragment;
7039
+ changeCollectionStore: (args: {
7040
+ collection?: CollectionSelectFragment;
7041
+ }) => void;
7039
7042
  };
7040
7043
  type CollectionProviderProps = Pick<CollectionContextProps, 'collection'> & {
7041
7044
  initialVariantId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.8.22",
3
+ "version": "1.8.27",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",