MCPcopy Create free account

hub / github.com/style-dictionary/style-dictionary / functions

Functions387 in github.com/style-dictionary/style-dictionary

↓ 2 callersMethodregisterPreprocessor
* @param {Preprocessor} cfg
lib/Register.js:343
↓ 2 callersFunctionregisterValidSW
(swUrl, config)
examples/advanced/create-react-app/src/serviceWorker.js:55
↓ 2 callersMethodrender
()
examples/advanced/create-react-app/src/components/with-sass/ComponentWithSass.js:6
↓ 2 callersFunctionrenderMermaid
()
docs/src/setup.ts:27
↓ 2 callersFunctionresolveReferences
(value, tokens, opts)
lib/utils/references/resolveReferences.js:26
↓ 2 callersMethodsaveFile
()
docs/src/components/sd-playground.ts:408
↓ 2 callersFunctionsetSwiftFileProperties
(options, objectType, transformGroup)
lib/common/formatHelpers/setSwiftFileProperties.js:13
↓ 2 callersFunctionshouldExpand
* @param {DesignToken} token * @param {Config} opts * @param {PlatformConfig} [platform]
lib/utils/expandObjectTokens.js:79
↓ 2 callersMethodshouldRunExpansion
* @param {ExpandConfig} [expandCfg] * @returns
lib/StyleDictionary.js:363
↓ 2 callersFunctionswapTheme
(theme: Theme)
docs/src/setup.ts:58
↓ 2 callersFunctiontokenSetup
(token, name, path)
lib/transform/tokenSetup.js:19
↓ 2 callersFunctiontokenToType
* @param {Token} token * @param {Config} options * @returns {string}
lib/common/templates/android/resources.template.js:40
↓ 2 callersFunctiontransformConfig
(platformConfig, dictionary, platformName)
lib/transform/config.js:28
↓ 2 callersFunctiontransformMap
( tokenMap, config, options, { transformedPropRefs = new Set(), deferredPropValueTransforms = new Set(
lib/transform/map.js:22
↓ 2 callersFunctiontransformToken
(token, config, options, vol)
lib/transform/token.js:82
↓ 2 callersFunctiontypeDtcgDelegate
(tokens)
lib/utils/typeDtcgDelegate.js:13
↓ 2 callersMethodundo
A function that undoes the action.
types/Action.ts:16
↓ 2 callersFunctionvalidateBlobType
* @param {Blob} blob * @param {string} type * @param {string} [path]
lib/utils/convertToDTCG.js:155
↓ 2 callersFunctionwrapValueWith
* @param {string} character * @param {Token} token * @param {Config} options * @returns {string}
lib/common/transforms.js:263
↓ 2 callersFunctionwriteZIP
(zipEntries)
lib/utils/convertToDTCG.js:129
↓ 1 callersFunctionApp
()
examples/advanced/create-react-native-app/src/App.js:6
↓ 1 callersFunctionTRANSFORMED_TOKENS
(usesDtcg)
__tests__/common/formatHelpers/sortByReference.test.js:4
↓ 1 callersMethod__registerAction
* @param {Action} action * @param {typeof Register | Register} target
lib/Register.js:237
↓ 1 callersMethod__registerFileHeader
* @param {{name: string; fileHeader: FileHeader;}} cfg * @param {typeof Register | Register} target
lib/Register.js:402
↓ 1 callersMethod__registerFilter
* @param {Filter} filter * @param {typeof Register | Register} target
lib/Register.js:275
↓ 1 callersMethod__registerFormat
* @param {Format} format * @param {typeof Register | Register} target
lib/Register.js:197
↓ 1 callersMethod__registerParser
* @param {Parser} parser * @param {typeof Register | Register} target
lib/Register.js:315
↓ 1 callersMethod__registerPreprocessor
* @param {Preprocessor} cfg * @param {typeof Register | Register} target
lib/Register.js:360
↓ 1 callersMethod__registerTransform
* @param {Transform} transform * @param {typeof Register | Register} target
lib/Register.js:108
↓ 1 callersMethod__registerTransformGroup
* @param {{ name: string; transforms: string[]; }} transformGroup * @param {typeof Register | Register} target
lib/Register.js:153
↓ 1 callersMethod_exportPlatform
* @param {string} platform * @returns {Promise<Dictionary>}
lib/StyleDictionary.js:423
↓ 1 callersFunction_flattenTokens
* @private * @template {Token | TransformedToken} T * @template {Tokens | TransformedTokens} U * @param {U} slice - The plain object you want flat
lib/utils/flattenTokens.js:20
↓ 1 callersFunction_resolveReferences
( value, tokenMap, { usesDtcg = false, warnImmediately = true, // for internal usage ign
lib/utils/references/resolveReferencesMap.js:35
↓ 1 callersFunction_stripMeta
(obj, options)
lib/utils/stripMeta.js:10
↓ 1 callersFunction_transformTokenWrapper
* @param {Transform} transform * @param {Token} token * @param {PlatformConfig} config * @param {Config} options * @param {Volume} [vol]
lib/transform/token.js:44
↓ 1 callersFunctionanalyzeDependencies
(code: string)
docs/src/utils/analyzeDependencies.ts:6
↓ 1 callersFunctionblobToDataUrl
* @typedef {import('@types/chai')} Chai
snapshot-plugin/chai-wtr-snapshot.js:16
↓ 1 callersFunctionborderTransform
(value)
__tests__/common/transforms.test.js:2030
↓ 1 callersFunctionbuildDictionary
* * @param {TransformedTokens} slice * @param {Config & LocalOptions} options * @param {string} [indent]
lib/common/templates/ios/singleton.m.template.js:16
↓ 1 callersFunctionbuildToken
* * @param {TransformedToken} token * @param {Config & LocalOptions} options * @returns
lib/common/templates/ios/strings.m.template.js:15
↓ 1 callersFunctionchangeLang
(lang: string, ed: typeof monacoType.editor)
docs/src/monaco/monaco.ts:125
↓ 1 callersFunctioncheckValidServiceWorker
(swUrl, config)
examples/advanced/create-react-app/src/serviceWorker.js:99
↓ 1 callersFunctioncleanActions
(dictionary, platform, options, vol = fs)
lib/cleanActions.js:22
↓ 1 callersFunctioncleanConsoleOutput
(str)
__tests__/__helpers.js:7
↓ 1 callersFunctionclearSDMeta
(tokens)
__tests__/__helpers.js:72
↓ 1 callersFunctionconvertToTokenMap
* @template {Token} T * @param {Array<T>} flattenedTokens * @returns {Map<string, T>}
lib/utils/convertTokenData.js:20
↓ 1 callersFunctionconvertToTokenObject
* @param {Token[]} tokenArray * @returns
lib/utils/convertTokenData.js:32
↓ 1 callersFunctioncreateErrorMessage
* * @param {Token} token * @param {Error} error * @param {string} name * @param {boolean} usesDtcg
lib/transform/token.js:29
↓ 1 callersFunctioncreateReferenceRegex
* @param {boolean} [captureGroups] * @returns {RegExp}
lib/utils/references/createReferenceRegex.js:8
↓ 1 callersFunctioncubicBezierTransform
(token)
__tests__/common/transforms.test.js:1921
↓ 1 callersFunctiondirs
(p)
examples/advanced/matching-build-files/tokens/index.js:3
↓ 1 callersMethoddo
The action in the form of a function.
types/Action.ts:8
↓ 1 callersFunctiondownloadJSON
(stringOrBlob, filename = 'output.json')
lib/utils/downloadFile.js:29
↓ 1 callersFunctiondtcgColorToRgb
* Get the sRGB representation of a color, with gamut mapping if needed * Uses the hex property as fallback if provided and color is out of gamut * @
lib/common/transforms.js:110
↓ 1 callersFunctionensureDirectoryExists
* @param {string} filePath
__tests__/__setup.js:34
↓ 1 callersFunctionenumNodes
(enumDirectory)
docs/src/remark-enums.js:16
↓ 1 callersFunctionerrorMessage
(amount = 1)
__tests__/exportPlatform.test.js:344
↓ 1 callersFunctionescapeTildes
* @param {string} [str]
snapshot-plugin/chai-wtr-snapshot.js:60
↓ 1 callersFunctionexists
* Async method for checking if a file exists. * Since there is no promises.exists method in Node.js... * @param {Volume} vol * @param {string} file
lib/cleanFile.js:17
↓ 1 callersMethodfileSwitch
(val: 'tokens' | 'config' | 'script' | 'output')
docs/src/components/sd-playground.ts:362
↓ 1 callersFunctionfilterTokenObject
* Takes a nested object of tokens and filters them using the provided * function. * * @param {Tokens} tokens * @param {Filter['filter']} filter -
lib/filterTokens.js:35
↓ 1 callersFunctionfn
(arr)
lib/common/formatHelpers/fileHeader.js:59
↓ 1 callersFunctionfontFamilyTransform
(token)
__tests__/common/transforms.test.js:1840
↓ 1 callersFunctionformatArgs
(usesDtcg, customFile)
__tests__/formats/typeScriptEs6Declarations.test.js:61
↓ 1 callersFunctionformatArgs
(usesDtcg)
__tests__/formats/es6Constants.test.js:77
↓ 1 callersFunctionformatJS
* Prettier format JS contents * @param {string} content * @param {boolean} [ts] whether or not to use typescript
lib/common/formats.js:144
↓ 1 callersFunctiongenerateTokens
({ key, type, value, amount, refDepth = 1 })
__perf_tests__/basic.test.js:60
↓ 1 callersFunctiongetArrayType
* @param {any[]} arr An array to check each property of * @returns {String} A valid type for the passed array and it's items
lib/common/formatHelpers/getTypeScriptType.js:60
↓ 1 callersFunctiongetAssetDir
* @param {Config} config
lib/common/actions.js:18
↓ 1 callersFunctiongetAssetPath
* @param {Token} token * @param {string} imagesDir
lib/common/actions.js:26
↓ 1 callersFunctiongetBasePxFontSize
* @param {PlatformConfig} config * @returns {number}
lib/common/transforms.js:292
↓ 1 callersFunctiongetBuiltinHooks
* @return {Required<Hooks>}
lib/Register.js:25
↓ 1 callersFunctiongetColor
(token, options)
lib/common/transforms.js:162
↓ 1 callersFunctiongetFormattingCloneWithoutPrefix
* Remove prefix because the prefix option for createPropertyFormatter * is not the same as the prefix inside header comment * @param {FormattingOver
lib/common/formats.js:165
↓ 1 callersFunctiongetLang
(lang: string)
docs/src/components/sd-playground.ts:42
↓ 1 callersMethodgetMainComponentName
Returns the name of the main component registered from JavaScript. This is used to schedule rendering of the component.
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainActivity.java:27
↓ 1 callersMethodgetNodeArrayForObject
examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.kt:27
↓ 1 callersFunctiongetObjectType
* @param {Object} value An object with uknown type properties * @returns {String} A representation of the type model for the passed object
lib/common/formatHelpers/getTypeScriptType.js:46
↓ 1 callersMethodgetReactNativeHost
()
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainApplication.java:73
↓ 1 callersFunctiongetStyleDictionaryConfig
(brand, platform)
examples/advanced/multi-brand-multi-platform/build.js:8
↓ 1 callersFunctiongetTestPath
(runnable, index)
snapshot-plugin/chai-wtr-snapshot.js:21
↓ 1 callersFunctiongradientTransform
(value, platformConfig = {})
__tests__/common/transforms.test.js:2356
↓ 1 callersFunctionhandleResize
()
docs/src/setup.ts:108
↓ 1 callersFunctionhandleThemeChange
()
docs/src/setup.ts:77
↓ 1 callersFunctioniconsWithPrefix
(prefix, allTokens, options, platform)
lib/common/formatHelpers/iconsWithPrefix.js:30
↓ 1 callersFunctioninit
(elem: HTMLDivElement)
docs/src/monaco/monaco.ts:103
↓ 1 callersMethodinit
()
docs/src/components/sd-playground.ts:271
↓ 1 callersMethodinitConfig
(tokens: Record<string, unknown>)
docs/src/components/sd-playground.ts:332
↓ 1 callersMethodinitMonaco
()
docs/src/components/sd-playground.ts:278
↓ 1 callersMethodinitScript
()
docs/src/components/sd-playground.ts:300
↓ 1 callersMethodinitTokens
()
docs/src/components/sd-playground.ts:313
↓ 1 callersMethodinitializeFlipper
Loads Flipper in React Native templates. Call this in the onCreate method with something like initializeFlipper(this, getReactNativeHost().getReactIns
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainApplication.java:97
↓ 1 callersFunctionisColor
(token, options)
lib/common/transforms.js:202
↓ 1 callersFunctionisDimension
* @param {Token} token * @param {Config} options * @returns {boolean}
lib/common/transforms.js:226
↓ 1 callersFunctionisFontSize
* @param {Token} token * @param {Config} options * @returns {boolean}
lib/common/transforms.js:235
↓ 1 callersFunctionlazilyLoadCEs
(CEs: string[])
docs/src/setup.ts:91
↓ 1 callersFunctionload
()
__tests__/utils/loadFile.test.js:34
↓ 1 callersMethodloadJSON
examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.kt:18
↓ 1 callersFunctionmatchFn
(inputObj, testObj)
lib/transform/config.js:137
↓ 1 callersFunctionmatches
(matchObj)
lib/transform/config.js:148
← previousnext →101–200 of 387, ranked by callers