sfc-utils 1.3.55 → 1.3.57

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.
@@ -17,7 +17,10 @@ const Topper2 = ({ settings, wcmData, lazyloader }) => {
17
17
  return [topperStyles.headerDekStacked, " mw-lg mt-lg mb-md"];
18
18
  case "full-screen":
19
19
  // apply margin offsets from spreadsheet
20
- calculatefullScreenOffsets();
20
+ if (typeof window != "undefined") {
21
+ calculatefullScreenOffsets();
22
+ }
23
+
21
24
  return [
22
25
  topperStyles.headerDekFullScreen, fullScreenHorizontalCss(),
23
26
  ... (HeaderDek_Vertical_Position === "top") ? [topperStyles.headerDekTop] : [topperStyles.headerDekBottom],
@@ -17,7 +17,7 @@ const ImageHTML = ({fullPath, imageRez, alt, isFullScreenTopper}) => {
17
17
  )
18
18
  }
19
19
 
20
- const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFullScreenTopper }) => {
20
+ const WCMImage = ({ wcm, alt, ratio, wcmData, lazyloader, isFullScreenTopper }) => {
21
21
  // When the wrapping div is rendered, we're going to figure out the best size for this image to be
22
22
  let picRef = useRef(null)
23
23
  let [imageRez, setImageRez] = useState(0)
@@ -56,7 +56,11 @@ const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFul
56
56
 
57
57
  // This calculation is not used for the topper impl, but keeping it here just in case
58
58
  // it is needed for the general WCMImage utils migration
59
- let r = document.querySelector(':root');
59
+ let r = null;
60
+ if (typeof window != "undefined") {
61
+ r = document.querySelector(':root');
62
+ }
63
+
60
64
  let photoRatio = "56.25%"; // Default to 16/9
61
65
  let fullPath = `https://s.hdnux.com/photos/0/0/0/${wcm}/0/`;
62
66
  if (!ratio){
@@ -69,7 +73,9 @@ const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFul
69
73
  if (matchedPhoto){
70
74
  // Set ratio of the actual photo like a legit hacker
71
75
  photoRatio = (matchedPhoto.photo.ratio*100)+"%";
72
- r.style.setProperty('--img-bottom-padding-ratio', photoRatio);
76
+ if (r) {
77
+ r.style.setProperty('--img-bottom-padding-ratio', photoRatio);
78
+ }
73
79
 
74
80
  fullPath = matchedPhoto.photo.full_path;
75
81
  } else {
@@ -79,7 +85,9 @@ const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFul
79
85
  } else {
80
86
  // If an override is being passed in, use that
81
87
  photoRatio = ratio
82
- r.style.setProperty('--img-bottom-padding-ratio', photoRatio);
88
+ if (r) {
89
+ r.style.setProperty('--img-bottom-padding-ratio', photoRatio);
90
+ }
83
91
  }
84
92
 
85
93
  // Get serious about alt tags
@@ -92,12 +100,9 @@ const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFul
92
100
 
93
101
  return (
94
102
  <div ref={picRef}>
95
- {!isNotLazyloaded && (
96
103
  <LazyLoaderHTML>
97
104
  <ImageHTML fullPath={fullPath} imageRez={imageRez} alt={alt} isFullScreenTopper={isFullScreenTopper}/>
98
105
  </LazyLoaderHTML>
99
- )}
100
- {isNotLazyloaded && <ImageHTML fullPath={fullPath} imageRez={imageRez} alt={alt} isFullScreenTopper={isFullScreenTopper}/>}
101
106
  </div>
102
107
  )
103
108
  }
@@ -105,7 +110,6 @@ const WCMImage = ({ wcm, alt, isNotLazyloaded, ratio, wcmData, lazyloader, isFul
105
110
  WCMImage.propTypes = {
106
111
  wcm: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
107
112
  alt: PropTypes.string.isRequired,
108
- isLazyloaded: PropTypes.bool,
109
113
  ratio: PropTypes.string,
110
114
  lazyloader: PropTypes.element
111
115
  }
package/copy/c2p_sheet.js CHANGED
@@ -63,7 +63,7 @@ let createSheet = (auth, fallback, configData) => {
63
63
 
64
64
  const drive = google.drive({ version: "v3", auth });
65
65
  const body = { title: "New C2P sheet" };
66
- const templateId = "1juVrba9UNHVZV13e23o0gcwOw8YzX_1b7uxTI_jv7_4";
66
+ const templateId = "1DUvYnFdxtBv1AXcDI9X00s_opUSu4uHJmd5LNemCN9E";
67
67
  drive.files.copy(
68
68
  {
69
69
  fileId: templateId, // Base template
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.3.55",
3
+ "version": "1.3.57",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",
@@ -29,7 +29,7 @@
29
29
 
30
30
  //widths
31
31
  @xs: 320px;
32
- @sm: 400px;
32
+ @sm: 480px;
33
33
  @md: 672px;
34
34
  @lg: 928px;
35
35
  @xl: 1200px;
@@ -140,4 +140,4 @@
140
140
  @purple-75: #AC84A5;
141
141
  @purple-50: #C1A3BC;
142
142
  @purple-25: #D6C1D3;
143
- @purple-0: #EBE0E9;
143
+ @purple-0: #EBE0E9;