@symbo.ls/scratch 2.11.523 → 3.0.2

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/src/system/svg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { document } from '@domql/globals'
3
+ import { document } from '@domql/utils'
4
4
  import { generateSprite, convertSvgToSymbol } from '../utils'
5
5
  import { getActiveConfig } from '../factory.js'
6
6
 
@@ -139,8 +139,15 @@ export const transformSize = (propertyName, val, props = {}, opts = {}) => {
139
139
  }
140
140
  }
141
141
 
142
- export const transformSizeRatio = (propertyName, props) => {
143
- return transformSize(propertyName, null, props, {
142
+ export const transformSizeRatio = (propertyName, val = null, props) => {
143
+ return transformSize(propertyName, val, props, {
144
144
  ratio: true
145
145
  })
146
146
  }
147
+
148
+ export const transformBorderRadius = (radius, props, propertyName) => {
149
+ if (!isString(radius)) return
150
+ return {
151
+ borderRadius: radius.split(' ').map((v, k) => getSpacingBasedOnRatio(props, propertyName, v)[propertyName]).join(' ')
152
+ }
153
+ }
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { document, window } from '@domql/globals'
4
- import { isString, isNumber } from '@domql/utils'
3
+ import { document, window, isString, isNumber } from '@domql/utils'
5
4
  const ENV = process.env.NODE_ENV
6
5
 
7
6
  export const colorStringToRgbaArray = color => {
@@ -170,7 +170,7 @@ export const generateSequence = (sequenceProps) => {
170
170
 
171
171
  export const generateSequencePosition = (sequenceProps, position = 0) => {
172
172
  const { type, base, ratio, subSequence } = sequenceProps
173
- const letterKey = isString(position) ? position : numToLetterMap[position]
173
+ const letterKey = this.call("isString", position) ? position : numToLetterMap[position]
174
174
 
175
175
  if (!letterKey) {
176
176
  console.warn(`Position ${position} is out of range in numToLetterMap`)