@gem-sdk/pages 1.9.36 → 1.9.44

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.
@@ -54,18 +54,20 @@ const Toolbox = ()=>{
54
54
  return value;
55
55
  });
56
56
  const fontUrl = googleFonts.createFontUrl(font);
57
- if (!fontUrl) return;
58
57
  const globalStyle = document.getElementById(globalStyleId);
59
58
  const googleFont = document.getElementById(globalFontId);
60
- if (googleFont) {
61
- googleFont.getAttribute('href') !== fontUrl && googleFont.setAttribute('href', fontUrl);
62
- //
63
- } else {
64
- const link = document.createElement('link');
65
- link.id = globalFontId;
66
- link.href = fontUrl;
67
- link.rel = 'stylesheet';
68
- document.head.appendChild(link);
59
+ if (fontUrl) {
60
+ if (googleFont) {
61
+ if (googleFont.getAttribute('href') !== fontUrl) {
62
+ googleFont.setAttribute('href', fontUrl);
63
+ }
64
+ } else {
65
+ const link = document.createElement('link');
66
+ link.id = globalFontId;
67
+ link.href = fontUrl;
68
+ link.rel = 'stylesheet';
69
+ document.head.appendChild(link);
70
+ }
69
71
  }
70
72
  if (globalStyle) {
71
73
  globalStyle.innerHTML = themeStyle;
@@ -19,7 +19,7 @@ const CollectionGlobalProvider = ({ children })=>{
19
19
  isSample: false
20
20
  }
21
21
  });
22
- const { data: collections , isValidating , error } = core.useCollectionsQuery(variables);
22
+ const { data: collections , isLoading , error } = core.useCollectionsQuery(variables);
23
23
  const collection = collections?.collections?.edges?.[0]?.node;
24
24
  const onChangeCollectionInfo = react.useCallback((e)=>{
25
25
  const detail = e.detail;
@@ -42,7 +42,7 @@ const CollectionGlobalProvider = ({ children })=>{
42
42
  onChangeCollectionInfo
43
43
  ]);
44
44
  return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
45
- children: isValidating ? /*#__PURE__*/ jsxRuntime.jsx("div", {
45
+ children: isLoading ? /*#__PURE__*/ jsxRuntime.jsx("div", {
46
46
  children: "Loading..."
47
47
  }) : error ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
48
48
  children: [
@@ -50,18 +50,20 @@ const Toolbox = ()=>{
50
50
  return value;
51
51
  });
52
52
  const fontUrl = createFontUrl(font);
53
- if (!fontUrl) return;
54
53
  const globalStyle = document.getElementById(globalStyleId);
55
54
  const googleFont = document.getElementById(globalFontId);
56
- if (googleFont) {
57
- googleFont.getAttribute('href') !== fontUrl && googleFont.setAttribute('href', fontUrl);
58
- //
59
- } else {
60
- const link = document.createElement('link');
61
- link.id = globalFontId;
62
- link.href = fontUrl;
63
- link.rel = 'stylesheet';
64
- document.head.appendChild(link);
55
+ if (fontUrl) {
56
+ if (googleFont) {
57
+ if (googleFont.getAttribute('href') !== fontUrl) {
58
+ googleFont.setAttribute('href', fontUrl);
59
+ }
60
+ } else {
61
+ const link = document.createElement('link');
62
+ link.id = globalFontId;
63
+ link.href = fontUrl;
64
+ link.rel = 'stylesheet';
65
+ document.head.appendChild(link);
66
+ }
65
67
  }
66
68
  if (globalStyle) {
67
69
  globalStyle.innerHTML = themeStyle;
@@ -15,7 +15,7 @@ const CollectionGlobalProvider = ({ children })=>{
15
15
  isSample: false
16
16
  }
17
17
  });
18
- const { data: collections , isValidating , error } = useCollectionsQuery(variables);
18
+ const { data: collections , isLoading , error } = useCollectionsQuery(variables);
19
19
  const collection = collections?.collections?.edges?.[0]?.node;
20
20
  const onChangeCollectionInfo = useCallback((e)=>{
21
21
  const detail = e.detail;
@@ -38,7 +38,7 @@ const CollectionGlobalProvider = ({ children })=>{
38
38
  onChangeCollectionInfo
39
39
  ]);
40
40
  return /*#__PURE__*/ jsx(Fragment, {
41
- children: isValidating ? /*#__PURE__*/ jsx("div", {
41
+ children: isLoading ? /*#__PURE__*/ jsx("div", {
42
42
  children: "Loading..."
43
43
  }) : error ? /*#__PURE__*/ jsxs("div", {
44
44
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "1.9.36",
3
+ "version": "1.9.44",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",