@symbo.ls/scratch 0.7.7 → 0.7.8

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "0.7.7",
5
+ "version": "0.7.8",
6
6
  "files": [
7
7
  "src"
8
8
  ],
@@ -150,7 +150,7 @@ export const getSequenceValue = (value = 'A', sequenceProps) => {
150
150
  }
151
151
 
152
152
  // if subsequence is not set but value is applied
153
- if (absValue.length === 2) {
153
+ if (!sequence[absValue] && absValue.length === 2) {
154
154
  if (CONFIG.verbose) console.warn(absValue, '- value is not found because `subSequence` is set to false')
155
155
  absValue = absValue.slice(0, 1)
156
156
  }
@@ -179,10 +179,12 @@ export const getSequenceValuePropertyPair = (value, propertyName, sequenceProps)
179
179
  return { [propertyName]: getSequenceValue(value, sequenceProps) }
180
180
  }
181
181
 
182
+ export const findHeadingLetter = (h1Matches, index) => numToLetterMap[h1Matches - index]
183
+
182
184
  export const findHeadings = propertyNames => {
183
185
  const { h1Matches, sequence } = propertyNames
184
186
  return new Array(6).fill(null).map((_, i) => {
185
- const findLetter = numToLetterMap[h1Matches - i]
187
+ const findLetter = findHeadingLetter(h1Matches, i)
186
188
  return sequence[findLetter]
187
189
  })
188
190
  }