@gem-sdk/core 1.44.0-dev.140 → 1.44.0-dev.145

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.
@@ -135,6 +135,9 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
135
135
  if (constant.disableWrap.includes(props.tag) && /*#__PURE__*/ react.isValidElement(children)) {
136
136
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
137
137
  children: [
138
+ /*#__PURE__*/ jsxRuntime.jsx(ComponentAnimation.default, {
139
+ ...props
140
+ }),
138
141
  /*#__PURE__*/ jsxRuntime.jsx(RenderCustomCode.default, {
139
142
  uid: props.uid,
140
143
  advanced: advanced
@@ -53,7 +53,7 @@ const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps
53
53
  const store = react.useMemo(()=>createShopStoreProvider(storeOption), [
54
54
  storeOption
55
55
  ]);
56
- const onUpdateLimitation = (e)=>{
56
+ const onUpdateLimitation = react.useCallback((e)=>{
57
57
  const isAllow = !!e.detail?.isAllow;
58
58
  const maxGenerateCount = e.detail?.maxGenerateCount;
59
59
  const nextQuota = e.detail?.nextQuota;
@@ -64,13 +64,17 @@ const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps
64
64
  nextQuota
65
65
  }
66
66
  });
67
- };
67
+ }, [
68
+ store
69
+ ]);
68
70
  react.useEffect(()=>{
69
71
  window.addEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
70
72
  return ()=>{
71
73
  window.removeEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
72
74
  };
73
- }, []);
75
+ }, [
76
+ onUpdateLimitation
77
+ ]);
74
78
  return /*#__PURE__*/ jsxRuntime.jsx(AddonContext.AddonProvider, {
75
79
  components: addons,
76
80
  children: /*#__PURE__*/ jsxRuntime.jsx(useSWR.SWRConfig, {
@@ -131,6 +131,9 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
131
131
  if (disableWrap.includes(props.tag) && /*#__PURE__*/ isValidElement(children)) {
132
132
  return /*#__PURE__*/ jsxs(Fragment, {
133
133
  children: [
134
+ /*#__PURE__*/ jsx(ComponentAnimation, {
135
+ ...props
136
+ }),
134
137
  /*#__PURE__*/ jsx(RenderCustomCode, {
135
138
  uid: props.uid,
136
139
  advanced: advanced
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { SWRConfig } from 'swr';
3
3
  import { useStore, createStore } from 'zustand';
4
- import { useMemo, useEffect, useContext, createContext } from 'react';
4
+ import { useMemo, useCallback, useEffect, useContext, createContext } from 'react';
5
5
  import { AddonProvider } from './AddonContext.js';
6
6
  import { ModalProvider } from './ModalContext.js';
7
7
 
@@ -51,7 +51,7 @@ const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps
51
51
  const store = useMemo(()=>createShopStoreProvider(storeOption), [
52
52
  storeOption
53
53
  ]);
54
- const onUpdateLimitation = (e)=>{
54
+ const onUpdateLimitation = useCallback((e)=>{
55
55
  const isAllow = !!e.detail?.isAllow;
56
56
  const maxGenerateCount = e.detail?.maxGenerateCount;
57
57
  const nextQuota = e.detail?.nextQuota;
@@ -62,13 +62,17 @@ const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps
62
62
  nextQuota
63
63
  }
64
64
  });
65
- };
65
+ }, [
66
+ store
67
+ ]);
66
68
  useEffect(()=>{
67
69
  window.addEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
68
70
  return ()=>{
69
71
  window.removeEventListener('editor:ai-generate-content-update-limitation', onUpdateLimitation);
70
72
  };
71
- }, []);
73
+ }, [
74
+ onUpdateLimitation
75
+ ]);
72
76
  return /*#__PURE__*/ jsx(AddonProvider, {
73
77
  components: addons,
74
78
  children: /*#__PURE__*/ jsx(SWRConfig, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.44.0-dev.140",
3
+ "version": "1.44.0-dev.145",
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.44.0-dev.136",
31
- "@gem-sdk/styles": "1.44.0-dev.136",
30
+ "@gem-sdk/adapter-shopify": "1.44.0-dev.143",
31
+ "@gem-sdk/styles": "1.44.0-dev.143",
32
32
  "@types/classnames": "^2.3.1"
33
33
  },
34
34
  "dependencies": {