@multiplatform.one/theme 7.83.1 → 7.84.0
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/dist/cjs/audit/constraintAudit.cjs +567 -0
- package/dist/cjs/audit/constraintAudit.native.js +948 -0
- package/dist/cjs/audit/constraintAudit.native.js.map +1 -0
- package/dist/cjs/audit/designTokens.cjs +53 -0
- package/dist/cjs/audit/designTokens.native.js +80 -0
- package/dist/cjs/audit/designTokens.native.js.map +1 -0
- package/dist/cjs/audit/diffReport.cjs +255 -0
- package/dist/cjs/audit/diffReport.native.js +519 -0
- package/dist/cjs/audit/diffReport.native.js.map +1 -0
- package/dist/cjs/audit/index.cjs +41 -0
- package/dist/cjs/audit/index.native.js +44 -0
- package/dist/cjs/audit/index.native.js.map +1 -0
- package/dist/cjs/audit/themeMatrix.cjs +924 -0
- package/dist/cjs/audit/themeMatrix.native.js +1552 -0
- package/dist/cjs/audit/themeMatrix.native.js.map +1 -0
- package/dist/cjs/dates.cjs +261 -0
- package/dist/cjs/dates.native.js +289 -0
- package/dist/cjs/dates.native.js.map +1 -0
- package/dist/cjs/devWarn.cjs +163 -0
- package/dist/cjs/devWarn.native.js +191 -0
- package/dist/cjs/devWarn.native.js.map +1 -0
- package/dist/cjs/expo.cjs +89 -0
- package/dist/cjs/expo.native.js +97 -0
- package/dist/cjs/expo.native.js.map +1 -0
- package/dist/cjs/figma/figmaTokens.cjs +350 -0
- package/dist/cjs/figma/figmaTokens.native.js +637 -0
- package/dist/cjs/figma/figmaTokens.native.js.map +1 -0
- package/dist/cjs/font.cjs +65 -0
- package/dist/cjs/font.native.js +74 -0
- package/dist/cjs/font.native.js.map +1 -0
- package/dist/cjs/fonts/createFontLoader.cjs +32 -0
- package/dist/cjs/fonts/createFontLoader.native.js +70 -0
- package/dist/cjs/fonts/createFontLoader.native.js.map +1 -0
- package/dist/cjs/fonts/index.cjs +22 -0
- package/dist/cjs/fonts/index.native.js +25 -0
- package/dist/cjs/fonts/index.native.js.map +1 -0
- package/dist/cjs/fonts/interFaces.cjs +38 -0
- package/dist/cjs/fonts/interFaces.native.js +41 -0
- package/dist/cjs/fonts/interFaces.native.js.map +1 -0
- package/dist/cjs/fonts/types.cjs +18 -0
- package/dist/cjs/fonts/types.native.js +21 -0
- package/dist/cjs/fonts/types.native.js.map +1 -0
- package/dist/cjs/index.cjs +39 -0
- package/dist/cjs/index.native.js +42 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/keyboardFocusRing.cjs +111 -0
- package/dist/cjs/keyboardFocusRing.native.js +116 -0
- package/dist/cjs/keyboardFocusRing.native.js.map +1 -0
- package/dist/cjs/menuRow.cjs +80 -0
- package/dist/cjs/menuRow.native.js +86 -0
- package/dist/cjs/menuRow.native.js.map +1 -0
- package/dist/cjs/numbers.cjs +161 -0
- package/dist/cjs/numbers.native.js +173 -0
- package/dist/cjs/numbers.native.js.map +1 -0
- package/dist/cjs/theme/FontKnobStyles.cjs +161 -0
- package/dist/cjs/theme/FontKnobStyles.native.js +41 -0
- package/dist/cjs/theme/FontKnobStyles.native.js.map +1 -0
- package/dist/cjs/theme/Heading.cjs +174 -0
- package/dist/cjs/theme/Heading.native.js +186 -0
- package/dist/cjs/theme/Heading.native.js.map +1 -0
- package/dist/cjs/theme/IconSlot.cjs +67 -0
- package/dist/cjs/theme/IconSlot.native.js +78 -0
- package/dist/cjs/theme/IconSlot.native.js.map +1 -0
- package/dist/cjs/theme/Intent.cjs +44 -0
- package/dist/cjs/theme/Intent.native.js +48 -0
- package/dist/cjs/theme/Intent.native.js.map +1 -0
- package/dist/cjs/theme/Preset.cjs +150 -0
- package/dist/cjs/theme/Preset.native.js +156 -0
- package/dist/cjs/theme/Preset.native.js.map +1 -0
- package/dist/cjs/theme/PresetContext.cjs +38 -0
- package/dist/cjs/theme/PresetContext.native.js +42 -0
- package/dist/cjs/theme/PresetContext.native.js.map +1 -0
- package/dist/cjs/theme/Surface.cjs +115 -0
- package/dist/cjs/theme/Surface.native.js +126 -0
- package/dist/cjs/theme/Surface.native.js.map +1 -0
- package/dist/cjs/theme/Text.cjs +147 -0
- package/dist/cjs/theme/Text.native.js +155 -0
- package/dist/cjs/theme/Text.native.js.map +1 -0
- package/dist/cjs/theme/Tint.cjs +55 -0
- package/dist/cjs/theme/Tint.native.js +59 -0
- package/dist/cjs/theme/Tint.native.js.map +1 -0
- package/dist/cjs/theme/activateThemeConfig.cjs +42 -0
- package/dist/cjs/theme/activateThemeConfig.native.js +45 -0
- package/dist/cjs/theme/activateThemeConfig.native.js.map +1 -0
- package/dist/cjs/theme/animations/css.cjs +36 -0
- package/dist/cjs/theme/animations/css.native.js +39 -0
- package/dist/cjs/theme/animations/css.native.js.map +1 -0
- package/dist/cjs/theme/animations/index.cjs +20 -0
- package/dist/cjs/theme/animations/index.native.js +23 -0
- package/dist/cjs/theme/animations/index.native.js.map +1 -0
- package/dist/cjs/theme/animations/reactNative.cjs +158 -0
- package/dist/cjs/theme/animations/reactNative.native.js +161 -0
- package/dist/cjs/theme/animations/reactNative.native.js.map +1 -0
- package/dist/cjs/theme/chartPalette.cjs +229 -0
- package/dist/cjs/theme/chartPalette.native.js +297 -0
- package/dist/cjs/theme/chartPalette.native.js.map +1 -0
- package/dist/cjs/theme/colorRules.cjs +323 -0
- package/dist/cjs/theme/colorRules.native.js +359 -0
- package/dist/cjs/theme/colorRules.native.js.map +1 -0
- package/dist/cjs/theme/controlTiers.cjs +67 -0
- package/dist/cjs/theme/controlTiers.native.js +72 -0
- package/dist/cjs/theme/controlTiers.native.js.map +1 -0
- package/dist/cjs/theme/cookies.cjs +183 -0
- package/dist/cjs/theme/cookies.native.js +309 -0
- package/dist/cjs/theme/cookies.native.js.map +1 -0
- package/dist/cjs/theme/cornerSmoothing.cjs +111 -0
- package/dist/cjs/theme/cornerSmoothing.native.js +71 -0
- package/dist/cjs/theme/cornerSmoothing.native.js.map +1 -0
- package/dist/cjs/theme/createDefaultThemeConfig.cjs +130 -0
- package/dist/cjs/theme/createDefaultThemeConfig.native.js +176 -0
- package/dist/cjs/theme/createDefaultThemeConfig.native.js.map +1 -0
- package/dist/cjs/theme/createThemes.cjs +737 -0
- package/dist/cjs/theme/createThemes.native.js +1183 -0
- package/dist/cjs/theme/createThemes.native.js.map +1 -0
- package/dist/cjs/theme/dedupeInherited.cjs +83 -0
- package/dist/cjs/theme/dedupeInherited.native.js +194 -0
- package/dist/cjs/theme/dedupeInherited.native.js.map +1 -0
- package/dist/cjs/theme/defaults/accent.cjs +32 -0
- package/dist/cjs/theme/defaults/accent.native.js +35 -0
- package/dist/cjs/theme/defaults/accent.native.js.map +1 -0
- package/dist/cjs/theme/defaults/base.cjs +48 -0
- package/dist/cjs/theme/defaults/base.native.js +51 -0
- package/dist/cjs/theme/defaults/base.native.js.map +1 -0
- package/dist/cjs/theme/defaults/builderOptions.cjs +192 -0
- package/dist/cjs/theme/defaults/builderOptions.native.js +263 -0
- package/dist/cjs/theme/defaults/builderOptions.native.js.map +1 -0
- package/dist/cjs/theme/defaults/categoryFonts.cjs +50 -0
- package/dist/cjs/theme/defaults/categoryFonts.native.js +53 -0
- package/dist/cjs/theme/defaults/categoryFonts.native.js.map +1 -0
- package/dist/cjs/theme/defaults/fonts.cjs +288 -0
- package/dist/cjs/theme/defaults/fonts.native.js +380 -0
- package/dist/cjs/theme/defaults/fonts.native.js.map +1 -0
- package/dist/cjs/theme/defaults/house.cjs +39 -0
- package/dist/cjs/theme/defaults/house.native.js +46 -0
- package/dist/cjs/theme/defaults/house.native.js.map +1 -0
- package/dist/cjs/theme/defaults/index.cjs +25 -0
- package/dist/cjs/theme/defaults/index.native.js +28 -0
- package/dist/cjs/theme/defaults/index.native.js.map +1 -0
- package/dist/cjs/theme/devtools/ColorLineVisualizer.cjs +243 -0
- package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js +269 -0
- package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js.map +1 -0
- package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.cjs +1350 -0
- package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js +1814 -0
- package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -0
- package/dist/cjs/theme/devtools/animationOptions.cjs +36 -0
- package/dist/cjs/theme/devtools/animationOptions.native.js +46 -0
- package/dist/cjs/theme/devtools/animationOptions.native.js.map +1 -0
- package/dist/cjs/theme/devtools/buildSnapshot.cjs +92 -0
- package/dist/cjs/theme/devtools/buildSnapshot.native.js +174 -0
- package/dist/cjs/theme/devtools/buildSnapshot.native.js.map +1 -0
- package/dist/cjs/theme/devtools/knobIcons.cjs +498 -0
- package/dist/cjs/theme/devtools/knobIcons.native.js +520 -0
- package/dist/cjs/theme/devtools/knobIcons.native.js.map +1 -0
- package/dist/cjs/theme/devtools/vizConstants.cjs +54 -0
- package/dist/cjs/theme/devtools/vizConstants.native.js +57 -0
- package/dist/cjs/theme/devtools/vizConstants.native.js.map +1 -0
- package/dist/cjs/theme/dynamicType.cjs +52 -0
- package/dist/cjs/theme/dynamicType.native.js +55 -0
- package/dist/cjs/theme/dynamicType.native.js.map +1 -0
- package/dist/cjs/theme/fieldFocus.cjs +56 -0
- package/dist/cjs/theme/fieldFocus.native.js +62 -0
- package/dist/cjs/theme/fieldFocus.native.js.map +1 -0
- package/dist/cjs/theme/fillContrast.cjs +130 -0
- package/dist/cjs/theme/fillContrast.native.js +163 -0
- package/dist/cjs/theme/fillContrast.native.js.map +1 -0
- package/dist/cjs/theme/focusState.cjs +120 -0
- package/dist/cjs/theme/focusState.native.js +123 -0
- package/dist/cjs/theme/focusState.native.js.map +1 -0
- package/dist/cjs/theme/fontCategoryMetrics.cjs +91 -0
- package/dist/cjs/theme/fontCategoryMetrics.native.js +94 -0
- package/dist/cjs/theme/fontCategoryMetrics.native.js.map +1 -0
- package/dist/cjs/theme/fontCategoryStacks.cjs +40 -0
- package/dist/cjs/theme/fontCategoryStacks.native.js +43 -0
- package/dist/cjs/theme/fontCategoryStacks.native.js.map +1 -0
- package/dist/cjs/theme/glyphPaint.cjs +55 -0
- package/dist/cjs/theme/glyphPaint.native.js +81 -0
- package/dist/cjs/theme/glyphPaint.native.js.map +1 -0
- package/dist/cjs/theme/glyphTint.cjs +90 -0
- package/dist/cjs/theme/glyphTint.native.js +96 -0
- package/dist/cjs/theme/glyphTint.native.js.map +1 -0
- package/dist/cjs/theme/groupGeometry.cjs +67 -0
- package/dist/cjs/theme/groupGeometry.native.js +72 -0
- package/dist/cjs/theme/groupGeometry.native.js.map +1 -0
- package/dist/cjs/theme/hairline.cjs +119 -0
- package/dist/cjs/theme/hairline.native.js +73 -0
- package/dist/cjs/theme/hairline.native.js.map +1 -0
- package/dist/cjs/theme/index.cjs +95 -0
- package/dist/cjs/theme/index.native.js +98 -0
- package/dist/cjs/theme/index.native.js.map +1 -0
- package/dist/cjs/theme/intents.cjs +62 -0
- package/dist/cjs/theme/intents.native.js +65 -0
- package/dist/cjs/theme/intents.native.js.map +1 -0
- package/dist/cjs/theme/knobs.cjs +172 -0
- package/dist/cjs/theme/knobs.native.js +175 -0
- package/dist/cjs/theme/knobs.native.js.map +1 -0
- package/dist/cjs/theme/layoutTokens.cjs +172 -0
- package/dist/cjs/theme/layoutTokens.native.js +222 -0
- package/dist/cjs/theme/layoutTokens.native.js.map +1 -0
- package/dist/cjs/theme/listRows.cjs +44 -0
- package/dist/cjs/theme/listRows.native.js +49 -0
- package/dist/cjs/theme/listRows.native.js.map +1 -0
- package/dist/cjs/theme/mergedTokens.cjs +39 -0
- package/dist/cjs/theme/mergedTokens.native.js +61 -0
- package/dist/cjs/theme/mergedTokens.native.js.map +1 -0
- package/dist/cjs/theme/motion.cjs +72 -0
- package/dist/cjs/theme/motion.native.js +82 -0
- package/dist/cjs/theme/motion.native.js.map +1 -0
- package/dist/cjs/theme/motionStops.cjs +28 -0
- package/dist/cjs/theme/motionStops.native.js +31 -0
- package/dist/cjs/theme/motionStops.native.js.map +1 -0
- package/dist/cjs/theme/motionTiming.cjs +79 -0
- package/dist/cjs/theme/motionTiming.native.js +85 -0
- package/dist/cjs/theme/motionTiming.native.js.map +1 -0
- package/dist/cjs/theme/nativeFontFamily.cjs +30 -0
- package/dist/cjs/theme/nativeFontFamily.native.js +37 -0
- package/dist/cjs/theme/nativeFontFamily.native.js.map +1 -0
- package/dist/cjs/theme/nativeMonoFamily.cjs +44 -0
- package/dist/cjs/theme/nativeMonoFamily.native.js +47 -0
- package/dist/cjs/theme/nativeMonoFamily.native.js.map +1 -0
- package/dist/cjs/theme/overlaySurfaces.cjs +327 -0
- package/dist/cjs/theme/overlaySurfaces.native.js +351 -0
- package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -0
- package/dist/cjs/theme/pageGutter.cjs +85 -0
- package/dist/cjs/theme/pageGutter.native.js +92 -0
- package/dist/cjs/theme/pageGutter.native.js.map +1 -0
- package/dist/cjs/theme/preset.types.cjs +18 -0
- package/dist/cjs/theme/preset.types.native.js +21 -0
- package/dist/cjs/theme/preset.types.native.js.map +1 -0
- package/dist/cjs/theme/presetPreview.cjs +42 -0
- package/dist/cjs/theme/presetPreview.native.js +46 -0
- package/dist/cjs/theme/presetPreview.native.js.map +1 -0
- package/dist/cjs/theme/presetStore.cjs +288 -0
- package/dist/cjs/theme/presetStore.native.js +344 -0
- package/dist/cjs/theme/presetStore.native.js.map +1 -0
- package/dist/cjs/theme/presetUserSync.cjs +70 -0
- package/dist/cjs/theme/presetUserSync.native.js +75 -0
- package/dist/cjs/theme/presetUserSync.native.js.map +1 -0
- package/dist/cjs/theme/presets.cjs +128 -0
- package/dist/cjs/theme/presets.native.js +131 -0
- package/dist/cjs/theme/presets.native.js.map +1 -0
- package/dist/cjs/theme/radiusClass.cjs +128 -0
- package/dist/cjs/theme/radiusClass.native.js +137 -0
- package/dist/cjs/theme/radiusClass.native.js.map +1 -0
- package/dist/cjs/theme/radiusClassTable.generated.cjs +164 -0
- package/dist/cjs/theme/radiusClassTable.generated.native.js +167 -0
- package/dist/cjs/theme/radiusClassTable.generated.native.js.map +1 -0
- package/dist/cjs/theme/ramps.cjs +75 -0
- package/dist/cjs/theme/ramps.native.js +79 -0
- package/dist/cjs/theme/ramps.native.js.map +1 -0
- package/dist/cjs/theme/readableColor.cjs +284 -0
- package/dist/cjs/theme/readableColor.native.js +393 -0
- package/dist/cjs/theme/readableColor.native.js.map +1 -0
- package/dist/cjs/theme/recipeInputs.cjs +352 -0
- package/dist/cjs/theme/recipeInputs.native.js +470 -0
- package/dist/cjs/theme/recipeInputs.native.js.map +1 -0
- package/dist/cjs/theme/recipes.cjs +18 -0
- package/dist/cjs/theme/recipes.native.js +21 -0
- package/dist/cjs/theme/recipes.native.js.map +1 -0
- package/dist/cjs/theme/resolveKnobs.cjs +866 -0
- package/dist/cjs/theme/resolveKnobs.native.js +884 -0
- package/dist/cjs/theme/resolveKnobs.native.js.map +1 -0
- package/dist/cjs/theme/scale/ScaleStyles.cjs +57 -0
- package/dist/cjs/theme/scale/ScaleStyles.native.js +41 -0
- package/dist/cjs/theme/scale/ScaleStyles.native.js.map +1 -0
- package/dist/cjs/theme/scale/activeScale.cjs +56 -0
- package/dist/cjs/theme/scale/activeScale.native.js +84 -0
- package/dist/cjs/theme/scale/activeScale.native.js.map +1 -0
- package/dist/cjs/theme/scale/deriveRecipeInputs.cjs +111 -0
- package/dist/cjs/theme/scale/deriveRecipeInputs.native.js +154 -0
- package/dist/cjs/theme/scale/deriveRecipeInputs.native.js.map +1 -0
- package/dist/cjs/theme/scale/generateScale.cjs +114 -0
- package/dist/cjs/theme/scale/generateScale.native.js +200 -0
- package/dist/cjs/theme/scale/generateScale.native.js.map +1 -0
- package/dist/cjs/theme/scale/index.cjs +78 -0
- package/dist/cjs/theme/scale/index.native.js +81 -0
- package/dist/cjs/theme/scale/index.native.js.map +1 -0
- package/dist/cjs/theme/scale/installScaleConfig.cjs +31 -0
- package/dist/cjs/theme/scale/installScaleConfig.native.js +65 -0
- package/dist/cjs/theme/scale/installScaleConfig.native.js.map +1 -0
- package/dist/cjs/theme/scale/scaleAttribute.cjs +39 -0
- package/dist/cjs/theme/scale/scaleAttribute.native.js +42 -0
- package/dist/cjs/theme/scale/scaleAttribute.native.js.map +1 -0
- package/dist/cjs/theme/scale/scaleCss.cjs +89 -0
- package/dist/cjs/theme/scale/scaleCss.native.js +201 -0
- package/dist/cjs/theme/scale/scaleCss.native.js.map +1 -0
- package/dist/cjs/theme/scale/scaleFonts.cjs +86 -0
- package/dist/cjs/theme/scale/scaleFonts.native.js +155 -0
- package/dist/cjs/theme/scale/scaleFonts.native.js.map +1 -0
- package/dist/cjs/theme/scale/scaleInputs.cjs +232 -0
- package/dist/cjs/theme/scale/scaleInputs.native.js +237 -0
- package/dist/cjs/theme/scale/scaleInputs.native.js.map +1 -0
- package/dist/cjs/theme/scale/themeScales.cjs +136 -0
- package/dist/cjs/theme/scale/themeScales.native.js +185 -0
- package/dist/cjs/theme/scale/themeScales.native.js.map +1 -0
- package/dist/cjs/theme/scale/useActiveScale.cjs +78 -0
- package/dist/cjs/theme/scale/useActiveScale.native.js +87 -0
- package/dist/cjs/theme/scale/useActiveScale.native.js.map +1 -0
- package/dist/cjs/theme/schemeStore.cjs +87 -0
- package/dist/cjs/theme/schemeStore.native.js +104 -0
- package/dist/cjs/theme/schemeStore.native.js.map +1 -0
- package/dist/cjs/theme/shared.cjs +125 -0
- package/dist/cjs/theme/shared.native.js +168 -0
- package/dist/cjs/theme/shared.native.js.map +1 -0
- package/dist/cjs/theme/sizeRecipes.cjs +176 -0
- package/dist/cjs/theme/sizeRecipes.native.js +251 -0
- package/dist/cjs/theme/sizeRecipes.native.js.map +1 -0
- package/dist/cjs/theme/subsetThemes.cjs +46 -0
- package/dist/cjs/theme/subsetThemes.native.js +76 -0
- package/dist/cjs/theme/subsetThemes.native.js.map +1 -0
- package/dist/cjs/theme/theme.cjs +189 -0
- package/dist/cjs/theme/theme.native.js +115 -0
- package/dist/cjs/theme/theme.native.js.map +1 -0
- package/dist/cjs/theme/themeValue.cjs +51 -0
- package/dist/cjs/theme/themeValue.native.js +73 -0
- package/dist/cjs/theme/themeValue.native.js.map +1 -0
- package/dist/cjs/theme/tileSizes.cjs +202 -0
- package/dist/cjs/theme/tileSizes.native.js +230 -0
- package/dist/cjs/theme/tileSizes.native.js.map +1 -0
- package/dist/cjs/theme/touchManipulation.cjs +33 -0
- package/dist/cjs/theme/touchManipulation.native.js +36 -0
- package/dist/cjs/theme/touchManipulation.native.js.map +1 -0
- package/dist/cjs/theme/transitionProps.cjs +50 -0
- package/dist/cjs/theme/transitionProps.native.js +81 -0
- package/dist/cjs/theme/transitionProps.native.js.map +1 -0
- package/dist/cjs/theme/useColorScale.cjs +47 -0
- package/dist/cjs/theme/useColorScale.native.js +33 -0
- package/dist/cjs/theme/useColorScale.native.js.map +1 -0
- package/dist/cjs/theme/usePresetSwitch.cjs +70 -0
- package/dist/cjs/theme/usePresetSwitch.native.js +50 -0
- package/dist/cjs/theme/usePresetSwitch.native.js.map +1 -0
- package/dist/cjs/theme/useResolvedKnobs.cjs +140 -0
- package/dist/cjs/theme/useResolvedKnobs.native.js +177 -0
- package/dist/cjs/theme/useResolvedKnobs.native.js.map +1 -0
- package/dist/cjs/theme/useSchemePreference.cjs +49 -0
- package/dist/cjs/theme/useSchemePreference.native.js +80 -0
- package/dist/cjs/theme/useSchemePreference.native.js.map +1 -0
- package/dist/cjs/theme/useTheme.cjs +152 -0
- package/dist/cjs/theme/useTheme.native.js +94 -0
- package/dist/cjs/theme/useTheme.native.js.map +1 -0
- package/dist/cjs/theme/useTouchSurface.cjs +33 -0
- package/dist/cjs/theme/useTouchSurface.native.js +36 -0
- package/dist/cjs/theme/useTouchSurface.native.js.map +1 -0
- package/dist/cjs/theme/v3TokenRoles.cjs +64 -0
- package/dist/cjs/theme/v3TokenRoles.native.js +67 -0
- package/dist/cjs/theme/v3TokenRoles.native.js.map +1 -0
- package/dist/esm/audit/constraintAudit.mjs +540 -0
- package/dist/esm/audit/constraintAudit.mjs.map +1 -0
- package/dist/esm/audit/constraintAudit.native.js +918 -0
- package/dist/esm/audit/constraintAudit.native.js.map +1 -0
- package/dist/esm/audit/designTokens.mjs +28 -0
- package/dist/esm/audit/designTokens.mjs.map +1 -0
- package/dist/esm/audit/designTokens.native.js +52 -0
- package/dist/esm/audit/designTokens.native.js.map +1 -0
- package/dist/esm/audit/diffReport.mjs +229 -0
- package/dist/esm/audit/diffReport.mjs.map +1 -0
- package/dist/esm/audit/diffReport.native.js +490 -0
- package/dist/esm/audit/diffReport.native.js.map +1 -0
- package/dist/esm/audit/index.mjs +5 -0
- package/dist/esm/audit/index.mjs.map +1 -0
- package/dist/esm/audit/index.native.js +5 -0
- package/dist/esm/audit/index.native.js.map +1 -0
- package/dist/esm/audit/themeMatrix.mjs +890 -0
- package/dist/esm/audit/themeMatrix.mjs.map +1 -0
- package/dist/esm/audit/themeMatrix.native.js +1515 -0
- package/dist/esm/audit/themeMatrix.native.js.map +1 -0
- package/dist/esm/dates.mjs +224 -0
- package/dist/esm/dates.mjs.map +1 -0
- package/dist/esm/dates.native.js +249 -0
- package/dist/esm/dates.native.js.map +1 -0
- package/dist/esm/devWarn.mjs +123 -0
- package/dist/esm/devWarn.mjs.map +1 -0
- package/dist/esm/devWarn.native.js +148 -0
- package/dist/esm/devWarn.native.js.map +1 -0
- package/dist/esm/expo.mjs +59 -0
- package/dist/esm/expo.mjs.map +1 -0
- package/dist/esm/expo.native.js +64 -0
- package/dist/esm/expo.native.js.map +1 -0
- package/dist/esm/figma/figmaTokens.mjs +322 -0
- package/dist/esm/figma/figmaTokens.mjs.map +1 -0
- package/dist/esm/figma/figmaTokens.native.js +606 -0
- package/dist/esm/figma/figmaTokens.native.js.map +1 -0
- package/dist/esm/font.mjs +40 -0
- package/dist/esm/font.mjs.map +1 -0
- package/dist/esm/font.native.js +46 -0
- package/dist/esm/font.native.js.map +1 -0
- package/dist/esm/fonts/createFontLoader.mjs +7 -0
- package/dist/esm/fonts/createFontLoader.mjs.map +1 -0
- package/dist/esm/fonts/createFontLoader.native.js +42 -0
- package/dist/esm/fonts/createFontLoader.native.js.map +1 -0
- package/dist/esm/fonts/index.mjs +4 -0
- package/dist/esm/fonts/index.mjs.map +1 -0
- package/dist/esm/fonts/index.native.js +4 -0
- package/dist/esm/fonts/index.native.js.map +1 -0
- package/dist/esm/fonts/interFaces.mjs +12 -0
- package/dist/esm/fonts/interFaces.mjs.map +1 -0
- package/dist/esm/fonts/interFaces.native.js +12 -0
- package/dist/esm/fonts/interFaces.native.js.map +1 -0
- package/dist/esm/fonts/types.mjs +2 -0
- package/dist/esm/fonts/types.mjs.map +1 -0
- package/dist/esm/fonts/types.native.js +2 -0
- package/dist/esm/fonts/types.native.js.map +1 -0
- package/dist/esm/index.mjs +11 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +11 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/keyboardFocusRing.mjs +81 -0
- package/dist/esm/keyboardFocusRing.mjs.map +1 -0
- package/dist/esm/keyboardFocusRing.native.js +83 -0
- package/dist/esm/keyboardFocusRing.native.js.map +1 -0
- package/dist/esm/menuRow.mjs +49 -0
- package/dist/esm/menuRow.mjs.map +1 -0
- package/dist/esm/menuRow.native.js +52 -0
- package/dist/esm/menuRow.native.js.map +1 -0
- package/dist/esm/numbers.mjs +132 -0
- package/dist/esm/numbers.mjs.map +1 -0
- package/dist/esm/numbers.native.js +141 -0
- package/dist/esm/numbers.native.js.map +1 -0
- package/dist/esm/theme/FontKnobStyles.mjs +131 -0
- package/dist/esm/theme/FontKnobStyles.mjs.map +1 -0
- package/dist/esm/theme/FontKnobStyles.native.js +11 -0
- package/dist/esm/theme/FontKnobStyles.native.js.map +1 -0
- package/dist/esm/theme/Heading.mjs +143 -0
- package/dist/esm/theme/Heading.mjs.map +1 -0
- package/dist/esm/theme/Heading.native.js +152 -0
- package/dist/esm/theme/Heading.native.js.map +1 -0
- package/dist/esm/theme/IconSlot.mjs +42 -0
- package/dist/esm/theme/IconSlot.mjs.map +1 -0
- package/dist/esm/theme/IconSlot.native.js +50 -0
- package/dist/esm/theme/IconSlot.native.js.map +1 -0
- package/dist/esm/theme/Intent.mjs +19 -0
- package/dist/esm/theme/Intent.mjs.map +1 -0
- package/dist/esm/theme/Intent.native.js +20 -0
- package/dist/esm/theme/Intent.native.js.map +1 -0
- package/dist/esm/theme/Preset.mjs +124 -0
- package/dist/esm/theme/Preset.mjs.map +1 -0
- package/dist/esm/theme/Preset.native.js +127 -0
- package/dist/esm/theme/Preset.native.js.map +1 -0
- package/dist/esm/theme/PresetContext.mjs +11 -0
- package/dist/esm/theme/PresetContext.mjs.map +1 -0
- package/dist/esm/theme/PresetContext.native.js +12 -0
- package/dist/esm/theme/PresetContext.native.js.map +1 -0
- package/dist/esm/theme/Surface.mjs +80 -0
- package/dist/esm/theme/Surface.mjs.map +1 -0
- package/dist/esm/theme/Surface.native.js +88 -0
- package/dist/esm/theme/Surface.native.js.map +1 -0
- package/dist/esm/theme/Text.mjs +119 -0
- package/dist/esm/theme/Text.mjs.map +1 -0
- package/dist/esm/theme/Text.native.js +124 -0
- package/dist/esm/theme/Text.native.js.map +1 -0
- package/dist/esm/theme/Tint.mjs +29 -0
- package/dist/esm/theme/Tint.mjs.map +1 -0
- package/dist/esm/theme/Tint.native.js +30 -0
- package/dist/esm/theme/Tint.native.js.map +1 -0
- package/dist/esm/theme/activateThemeConfig.mjs +17 -0
- package/dist/esm/theme/activateThemeConfig.mjs.map +1 -0
- package/dist/esm/theme/activateThemeConfig.native.js +17 -0
- package/dist/esm/theme/activateThemeConfig.native.js.map +1 -0
- package/dist/esm/theme/animations/css.mjs +7 -0
- package/dist/esm/theme/animations/css.mjs.map +1 -0
- package/dist/esm/theme/animations/css.native.js +7 -0
- package/dist/esm/theme/animations/css.native.js.map +1 -0
- package/dist/esm/theme/animations/index.mjs +2 -0
- package/dist/esm/theme/animations/index.mjs.map +1 -0
- package/dist/esm/theme/animations/index.native.js +2 -0
- package/dist/esm/theme/animations/index.native.js.map +1 -0
- package/dist/esm/theme/animations/reactNative.mjs +131 -0
- package/dist/esm/theme/animations/reactNative.mjs.map +1 -0
- package/dist/esm/theme/animations/reactNative.native.js +131 -0
- package/dist/esm/theme/animations/reactNative.native.js.map +1 -0
- package/dist/esm/theme/chartPalette.mjs +191 -0
- package/dist/esm/theme/chartPalette.mjs.map +1 -0
- package/dist/esm/theme/chartPalette.native.js +256 -0
- package/dist/esm/theme/chartPalette.native.js.map +1 -0
- package/dist/esm/theme/colorRules.mjs +273 -0
- package/dist/esm/theme/colorRules.mjs.map +1 -0
- package/dist/esm/theme/colorRules.native.js +306 -0
- package/dist/esm/theme/colorRules.native.js.map +1 -0
- package/dist/esm/theme/controlTiers.mjs +39 -0
- package/dist/esm/theme/controlTiers.mjs.map +1 -0
- package/dist/esm/theme/controlTiers.native.js +41 -0
- package/dist/esm/theme/controlTiers.native.js.map +1 -0
- package/dist/esm/theme/cookies.mjs +145 -0
- package/dist/esm/theme/cookies.mjs.map +1 -0
- package/dist/esm/theme/cookies.native.js +268 -0
- package/dist/esm/theme/cookies.native.js.map +1 -0
- package/dist/esm/theme/cornerSmoothing.mjs +71 -0
- package/dist/esm/theme/cornerSmoothing.mjs.map +1 -0
- package/dist/esm/theme/cornerSmoothing.native.js +28 -0
- package/dist/esm/theme/cornerSmoothing.native.js.map +1 -0
- package/dist/esm/theme/createDefaultThemeConfig.mjs +102 -0
- package/dist/esm/theme/createDefaultThemeConfig.mjs.map +1 -0
- package/dist/esm/theme/createDefaultThemeConfig.native.js +145 -0
- package/dist/esm/theme/createDefaultThemeConfig.native.js.map +1 -0
- package/dist/esm/theme/createThemes.mjs +697 -0
- package/dist/esm/theme/createThemes.mjs.map +1 -0
- package/dist/esm/theme/createThemes.native.js +1140 -0
- package/dist/esm/theme/createThemes.native.js.map +1 -0
- package/dist/esm/theme/dedupeInherited.mjs +55 -0
- package/dist/esm/theme/dedupeInherited.mjs.map +1 -0
- package/dist/esm/theme/dedupeInherited.native.js +163 -0
- package/dist/esm/theme/dedupeInherited.native.js.map +1 -0
- package/dist/esm/theme/defaults/accent.mjs +7 -0
- package/dist/esm/theme/defaults/accent.mjs.map +1 -0
- package/dist/esm/theme/defaults/accent.native.js +7 -0
- package/dist/esm/theme/defaults/accent.native.js.map +1 -0
- package/dist/esm/theme/defaults/base.mjs +23 -0
- package/dist/esm/theme/defaults/base.mjs.map +1 -0
- package/dist/esm/theme/defaults/base.native.js +23 -0
- package/dist/esm/theme/defaults/base.native.js.map +1 -0
- package/dist/esm/theme/defaults/builderOptions.mjs +165 -0
- package/dist/esm/theme/defaults/builderOptions.mjs.map +1 -0
- package/dist/esm/theme/defaults/builderOptions.native.js +233 -0
- package/dist/esm/theme/defaults/builderOptions.native.js.map +1 -0
- package/dist/esm/theme/defaults/categoryFonts.mjs +25 -0
- package/dist/esm/theme/defaults/categoryFonts.mjs.map +1 -0
- package/dist/esm/theme/defaults/categoryFonts.native.js +25 -0
- package/dist/esm/theme/defaults/categoryFonts.native.js.map +1 -0
- package/dist/esm/theme/defaults/fonts.mjs +227 -0
- package/dist/esm/theme/defaults/fonts.mjs.map +1 -0
- package/dist/esm/theme/defaults/fonts.native.js +316 -0
- package/dist/esm/theme/defaults/fonts.native.js.map +1 -0
- package/dist/esm/theme/defaults/house.mjs +13 -0
- package/dist/esm/theme/defaults/house.mjs.map +1 -0
- package/dist/esm/theme/defaults/house.native.js +17 -0
- package/dist/esm/theme/defaults/house.native.js.map +1 -0
- package/dist/esm/theme/defaults/index.mjs +7 -0
- package/dist/esm/theme/defaults/index.mjs.map +1 -0
- package/dist/esm/theme/defaults/index.native.js +7 -0
- package/dist/esm/theme/defaults/index.native.js.map +1 -0
- package/dist/esm/theme/devtools/ColorLineVisualizer.mjs +218 -0
- package/dist/esm/theme/devtools/ColorLineVisualizer.mjs.map +1 -0
- package/dist/esm/theme/devtools/ColorLineVisualizer.native.js +230 -0
- package/dist/esm/theme/devtools/ColorLineVisualizer.native.js.map +1 -0
- package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs +1325 -0
- package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs.map +1 -0
- package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js +1786 -0
- package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -0
- package/dist/esm/theme/devtools/animationOptions.mjs +11 -0
- package/dist/esm/theme/devtools/animationOptions.mjs.map +1 -0
- package/dist/esm/theme/devtools/animationOptions.native.js +18 -0
- package/dist/esm/theme/devtools/animationOptions.native.js.map +1 -0
- package/dist/esm/theme/devtools/buildSnapshot.mjs +67 -0
- package/dist/esm/theme/devtools/buildSnapshot.mjs.map +1 -0
- package/dist/esm/theme/devtools/buildSnapshot.native.js +146 -0
- package/dist/esm/theme/devtools/buildSnapshot.native.js.map +1 -0
- package/dist/esm/theme/devtools/knobIcons.mjs +456 -0
- package/dist/esm/theme/devtools/knobIcons.mjs.map +1 -0
- package/dist/esm/theme/devtools/knobIcons.native.js +464 -0
- package/dist/esm/theme/devtools/knobIcons.native.js.map +1 -0
- package/dist/esm/theme/devtools/vizConstants.mjs +26 -0
- package/dist/esm/theme/devtools/vizConstants.mjs.map +1 -0
- package/dist/esm/theme/devtools/vizConstants.native.js +26 -0
- package/dist/esm/theme/devtools/vizConstants.native.js.map +1 -0
- package/dist/esm/theme/dynamicType.mjs +24 -0
- package/dist/esm/theme/dynamicType.mjs.map +1 -0
- package/dist/esm/theme/dynamicType.native.js +24 -0
- package/dist/esm/theme/dynamicType.native.js.map +1 -0
- package/dist/esm/theme/fieldFocus.mjs +27 -0
- package/dist/esm/theme/fieldFocus.mjs.map +1 -0
- package/dist/esm/theme/fieldFocus.native.js +30 -0
- package/dist/esm/theme/fieldFocus.native.js.map +1 -0
- package/dist/esm/theme/fillContrast.mjs +98 -0
- package/dist/esm/theme/fillContrast.mjs.map +1 -0
- package/dist/esm/theme/fillContrast.native.js +128 -0
- package/dist/esm/theme/fillContrast.native.js.map +1 -0
- package/dist/esm/theme/focusState.mjs +81 -0
- package/dist/esm/theme/focusState.mjs.map +1 -0
- package/dist/esm/theme/focusState.native.js +81 -0
- package/dist/esm/theme/focusState.native.js.map +1 -0
- package/dist/esm/theme/fontCategoryMetrics.mjs +65 -0
- package/dist/esm/theme/fontCategoryMetrics.mjs.map +1 -0
- package/dist/esm/theme/fontCategoryMetrics.native.js +65 -0
- package/dist/esm/theme/fontCategoryMetrics.native.js.map +1 -0
- package/dist/esm/theme/fontCategoryStacks.mjs +15 -0
- package/dist/esm/theme/fontCategoryStacks.mjs.map +1 -0
- package/dist/esm/theme/fontCategoryStacks.native.js +15 -0
- package/dist/esm/theme/fontCategoryStacks.native.js.map +1 -0
- package/dist/esm/theme/glyphPaint.mjs +29 -0
- package/dist/esm/theme/glyphPaint.mjs.map +1 -0
- package/dist/esm/theme/glyphPaint.native.js +52 -0
- package/dist/esm/theme/glyphPaint.native.js.map +1 -0
- package/dist/esm/theme/glyphTint.mjs +60 -0
- package/dist/esm/theme/glyphTint.mjs.map +1 -0
- package/dist/esm/theme/glyphTint.native.js +63 -0
- package/dist/esm/theme/glyphTint.native.js.map +1 -0
- package/dist/esm/theme/groupGeometry.mjs +38 -0
- package/dist/esm/theme/groupGeometry.mjs.map +1 -0
- package/dist/esm/theme/groupGeometry.native.js +40 -0
- package/dist/esm/theme/groupGeometry.native.js.map +1 -0
- package/dist/esm/theme/hairline.mjs +89 -0
- package/dist/esm/theme/hairline.mjs.map +1 -0
- package/dist/esm/theme/hairline.native.js +41 -0
- package/dist/esm/theme/hairline.native.js.map +1 -0
- package/dist/esm/theme/index.mjs +66 -0
- package/dist/esm/theme/index.mjs.map +1 -0
- package/dist/esm/theme/index.native.js +66 -0
- package/dist/esm/theme/index.native.js.map +1 -0
- package/dist/esm/theme/intents.mjs +37 -0
- package/dist/esm/theme/intents.mjs.map +1 -0
- package/dist/esm/theme/intents.native.js +37 -0
- package/dist/esm/theme/intents.native.js.map +1 -0
- package/dist/esm/theme/knobs.mjs +125 -0
- package/dist/esm/theme/knobs.mjs.map +1 -0
- package/dist/esm/theme/knobs.native.js +125 -0
- package/dist/esm/theme/knobs.native.js.map +1 -0
- package/dist/esm/theme/layoutTokens.mjs +124 -0
- package/dist/esm/theme/layoutTokens.mjs.map +1 -0
- package/dist/esm/theme/layoutTokens.native.js +171 -0
- package/dist/esm/theme/layoutTokens.native.js.map +1 -0
- package/dist/esm/theme/listRows.mjs +17 -0
- package/dist/esm/theme/listRows.mjs.map +1 -0
- package/dist/esm/theme/listRows.native.js +19 -0
- package/dist/esm/theme/listRows.native.js.map +1 -0
- package/dist/esm/theme/mergedTokens.mjs +14 -0
- package/dist/esm/theme/mergedTokens.mjs.map +1 -0
- package/dist/esm/theme/mergedTokens.native.js +33 -0
- package/dist/esm/theme/mergedTokens.native.js.map +1 -0
- package/dist/esm/theme/motion.mjs +41 -0
- package/dist/esm/theme/motion.mjs.map +1 -0
- package/dist/esm/theme/motion.native.js +48 -0
- package/dist/esm/theme/motion.native.js.map +1 -0
- package/dist/esm/theme/motionStops.mjs +3 -0
- package/dist/esm/theme/motionStops.mjs.map +1 -0
- package/dist/esm/theme/motionStops.native.js +3 -0
- package/dist/esm/theme/motionStops.native.js.map +1 -0
- package/dist/esm/theme/motionTiming.mjs +48 -0
- package/dist/esm/theme/motionTiming.mjs.map +1 -0
- package/dist/esm/theme/motionTiming.native.js +51 -0
- package/dist/esm/theme/motionTiming.native.js.map +1 -0
- package/dist/esm/theme/nativeFontFamily.mjs +5 -0
- package/dist/esm/theme/nativeFontFamily.mjs.map +1 -0
- package/dist/esm/theme/nativeFontFamily.native.js +9 -0
- package/dist/esm/theme/nativeFontFamily.native.js.map +1 -0
- package/dist/esm/theme/nativeMonoFamily.mjs +18 -0
- package/dist/esm/theme/nativeMonoFamily.mjs.map +1 -0
- package/dist/esm/theme/nativeMonoFamily.native.js +18 -0
- package/dist/esm/theme/nativeMonoFamily.native.js.map +1 -0
- package/dist/esm/theme/overlaySurfaces.mjs +290 -0
- package/dist/esm/theme/overlaySurfaces.mjs.map +1 -0
- package/dist/esm/theme/overlaySurfaces.native.js +311 -0
- package/dist/esm/theme/overlaySurfaces.native.js.map +1 -0
- package/dist/esm/theme/pageGutter.mjs +55 -0
- package/dist/esm/theme/pageGutter.mjs.map +1 -0
- package/dist/esm/theme/pageGutter.native.js +59 -0
- package/dist/esm/theme/pageGutter.native.js.map +1 -0
- package/dist/esm/theme/preset.types.mjs +2 -0
- package/dist/esm/theme/preset.types.mjs.map +1 -0
- package/dist/esm/theme/preset.types.native.js +2 -0
- package/dist/esm/theme/preset.types.native.js.map +1 -0
- package/dist/esm/theme/presetPreview.mjs +17 -0
- package/dist/esm/theme/presetPreview.mjs.map +1 -0
- package/dist/esm/theme/presetPreview.native.js +18 -0
- package/dist/esm/theme/presetPreview.native.js.map +1 -0
- package/dist/esm/theme/presetStore.mjs +251 -0
- package/dist/esm/theme/presetStore.mjs.map +1 -0
- package/dist/esm/theme/presetStore.native.js +304 -0
- package/dist/esm/theme/presetStore.native.js.map +1 -0
- package/dist/esm/theme/presetUserSync.mjs +44 -0
- package/dist/esm/theme/presetUserSync.mjs.map +1 -0
- package/dist/esm/theme/presetUserSync.native.js +46 -0
- package/dist/esm/theme/presetUserSync.native.js.map +1 -0
- package/dist/esm/theme/presets.mjs +97 -0
- package/dist/esm/theme/presets.mjs.map +1 -0
- package/dist/esm/theme/presets.native.js +97 -0
- package/dist/esm/theme/presets.native.js.map +1 -0
- package/dist/esm/theme/radiusClass.mjs +99 -0
- package/dist/esm/theme/radiusClass.mjs.map +1 -0
- package/dist/esm/theme/radiusClass.native.js +105 -0
- package/dist/esm/theme/radiusClass.native.js.map +1 -0
- package/dist/esm/theme/radiusClassTable.generated.mjs +135 -0
- package/dist/esm/theme/radiusClassTable.generated.mjs.map +1 -0
- package/dist/esm/theme/radiusClassTable.generated.native.js +135 -0
- package/dist/esm/theme/radiusClassTable.generated.native.js.map +1 -0
- package/dist/esm/theme/ramps.mjs +48 -0
- package/dist/esm/theme/ramps.mjs.map +1 -0
- package/dist/esm/theme/ramps.native.js +49 -0
- package/dist/esm/theme/ramps.native.js.map +1 -0
- package/dist/esm/theme/readableColor.mjs +248 -0
- package/dist/esm/theme/readableColor.mjs.map +1 -0
- package/dist/esm/theme/readableColor.native.js +354 -0
- package/dist/esm/theme/readableColor.native.js.map +1 -0
- package/dist/esm/theme/recipeInputs.mjs +309 -0
- package/dist/esm/theme/recipeInputs.mjs.map +1 -0
- package/dist/esm/theme/recipeInputs.native.js +424 -0
- package/dist/esm/theme/recipeInputs.native.js.map +1 -0
- package/dist/esm/theme/recipes.mjs +2 -0
- package/dist/esm/theme/recipes.mjs.map +1 -0
- package/dist/esm/theme/recipes.native.js +2 -0
- package/dist/esm/theme/recipes.native.js.map +1 -0
- package/dist/esm/theme/resolveKnobs.mjs +818 -0
- package/dist/esm/theme/resolveKnobs.mjs.map +1 -0
- package/dist/esm/theme/resolveKnobs.native.js +833 -0
- package/dist/esm/theme/resolveKnobs.native.js.map +1 -0
- package/dist/esm/theme/scale/ScaleStyles.mjs +30 -0
- package/dist/esm/theme/scale/ScaleStyles.mjs.map +1 -0
- package/dist/esm/theme/scale/ScaleStyles.native.js +11 -0
- package/dist/esm/theme/scale/ScaleStyles.native.js.map +1 -0
- package/dist/esm/theme/scale/activeScale.mjs +28 -0
- package/dist/esm/theme/scale/activeScale.mjs.map +1 -0
- package/dist/esm/theme/scale/activeScale.native.js +53 -0
- package/dist/esm/theme/scale/activeScale.native.js.map +1 -0
- package/dist/esm/theme/scale/deriveRecipeInputs.mjs +86 -0
- package/dist/esm/theme/scale/deriveRecipeInputs.mjs.map +1 -0
- package/dist/esm/theme/scale/deriveRecipeInputs.native.js +126 -0
- package/dist/esm/theme/scale/deriveRecipeInputs.native.js.map +1 -0
- package/dist/esm/theme/scale/generateScale.mjs +85 -0
- package/dist/esm/theme/scale/generateScale.mjs.map +1 -0
- package/dist/esm/theme/scale/generateScale.native.js +168 -0
- package/dist/esm/theme/scale/generateScale.native.js.map +1 -0
- package/dist/esm/theme/scale/index.mjs +12 -0
- package/dist/esm/theme/scale/index.mjs.map +1 -0
- package/dist/esm/theme/scale/index.native.js +12 -0
- package/dist/esm/theme/scale/index.native.js.map +1 -0
- package/dist/esm/theme/scale/installScaleConfig.mjs +6 -0
- package/dist/esm/theme/scale/installScaleConfig.mjs.map +1 -0
- package/dist/esm/theme/scale/installScaleConfig.native.js +36 -0
- package/dist/esm/theme/scale/installScaleConfig.native.js.map +1 -0
- package/dist/esm/theme/scale/scaleAttribute.mjs +11 -0
- package/dist/esm/theme/scale/scaleAttribute.mjs.map +1 -0
- package/dist/esm/theme/scale/scaleAttribute.native.js +11 -0
- package/dist/esm/theme/scale/scaleAttribute.native.js.map +1 -0
- package/dist/esm/theme/scale/scaleCss.mjs +62 -0
- package/dist/esm/theme/scale/scaleCss.mjs.map +1 -0
- package/dist/esm/theme/scale/scaleCss.native.js +171 -0
- package/dist/esm/theme/scale/scaleCss.native.js.map +1 -0
- package/dist/esm/theme/scale/scaleFonts.mjs +60 -0
- package/dist/esm/theme/scale/scaleFonts.mjs.map +1 -0
- package/dist/esm/theme/scale/scaleFonts.native.js +126 -0
- package/dist/esm/theme/scale/scaleFonts.native.js.map +1 -0
- package/dist/esm/theme/scale/scaleInputs.mjs +189 -0
- package/dist/esm/theme/scale/scaleInputs.mjs.map +1 -0
- package/dist/esm/theme/scale/scaleInputs.native.js +191 -0
- package/dist/esm/theme/scale/scaleInputs.native.js.map +1 -0
- package/dist/esm/theme/scale/themeScales.mjs +109 -0
- package/dist/esm/theme/scale/themeScales.mjs.map +1 -0
- package/dist/esm/theme/scale/themeScales.native.js +155 -0
- package/dist/esm/theme/scale/themeScales.native.js.map +1 -0
- package/dist/esm/theme/scale/useActiveScale.mjs +51 -0
- package/dist/esm/theme/scale/useActiveScale.mjs.map +1 -0
- package/dist/esm/theme/scale/useActiveScale.native.js +57 -0
- package/dist/esm/theme/scale/useActiveScale.native.js.map +1 -0
- package/dist/esm/theme/schemeStore.mjs +59 -0
- package/dist/esm/theme/schemeStore.mjs.map +1 -0
- package/dist/esm/theme/schemeStore.native.js +73 -0
- package/dist/esm/theme/schemeStore.native.js.map +1 -0
- package/dist/esm/theme/shared.mjs +95 -0
- package/dist/esm/theme/shared.mjs.map +1 -0
- package/dist/esm/theme/shared.native.js +135 -0
- package/dist/esm/theme/shared.native.js.map +1 -0
- package/dist/esm/theme/sizeRecipes.mjs +112 -0
- package/dist/esm/theme/sizeRecipes.mjs.map +1 -0
- package/dist/esm/theme/sizeRecipes.native.js +184 -0
- package/dist/esm/theme/sizeRecipes.native.js.map +1 -0
- package/dist/esm/theme/subsetThemes.mjs +21 -0
- package/dist/esm/theme/subsetThemes.mjs.map +1 -0
- package/dist/esm/theme/subsetThemes.native.js +48 -0
- package/dist/esm/theme/subsetThemes.native.js.map +1 -0
- package/dist/esm/theme/theme.mjs +163 -0
- package/dist/esm/theme/theme.mjs.map +1 -0
- package/dist/esm/theme/theme.native.js +87 -0
- package/dist/esm/theme/theme.native.js.map +1 -0
- package/dist/esm/theme/themeValue.mjs +25 -0
- package/dist/esm/theme/themeValue.mjs.map +1 -0
- package/dist/esm/theme/themeValue.native.js +44 -0
- package/dist/esm/theme/themeValue.native.js.map +1 -0
- package/dist/esm/theme/tileSizes.mjs +167 -0
- package/dist/esm/theme/tileSizes.mjs.map +1 -0
- package/dist/esm/theme/tileSizes.native.js +192 -0
- package/dist/esm/theme/tileSizes.native.js.map +1 -0
- package/dist/esm/theme/touchManipulation.mjs +7 -0
- package/dist/esm/theme/touchManipulation.mjs.map +1 -0
- package/dist/esm/theme/touchManipulation.native.js +7 -0
- package/dist/esm/theme/touchManipulation.native.js.map +1 -0
- package/dist/esm/theme/transitionProps.mjs +25 -0
- package/dist/esm/theme/transitionProps.mjs.map +1 -0
- package/dist/esm/theme/transitionProps.native.js +53 -0
- package/dist/esm/theme/transitionProps.native.js.map +1 -0
- package/dist/esm/theme/useColorScale.mjs +22 -0
- package/dist/esm/theme/useColorScale.mjs.map +1 -0
- package/dist/esm/theme/useColorScale.native.js +5 -0
- package/dist/esm/theme/useColorScale.native.js.map +1 -0
- package/dist/esm/theme/usePresetSwitch.mjs +45 -0
- package/dist/esm/theme/usePresetSwitch.mjs.map +1 -0
- package/dist/esm/theme/usePresetSwitch.native.js +22 -0
- package/dist/esm/theme/usePresetSwitch.native.js.map +1 -0
- package/dist/esm/theme/useResolvedKnobs.mjs +111 -0
- package/dist/esm/theme/useResolvedKnobs.mjs.map +1 -0
- package/dist/esm/theme/useResolvedKnobs.native.js +145 -0
- package/dist/esm/theme/useResolvedKnobs.native.js.map +1 -0
- package/dist/esm/theme/useSchemePreference.mjs +24 -0
- package/dist/esm/theme/useSchemePreference.mjs.map +1 -0
- package/dist/esm/theme/useSchemePreference.native.js +52 -0
- package/dist/esm/theme/useSchemePreference.native.js.map +1 -0
- package/dist/esm/theme/useTheme.mjs +127 -0
- package/dist/esm/theme/useTheme.mjs.map +1 -0
- package/dist/esm/theme/useTheme.native.js +66 -0
- package/dist/esm/theme/useTheme.native.js.map +1 -0
- package/dist/esm/theme/useTouchSurface.mjs +8 -0
- package/dist/esm/theme/useTouchSurface.mjs.map +1 -0
- package/dist/esm/theme/useTouchSurface.native.js +8 -0
- package/dist/esm/theme/useTouchSurface.native.js.map +1 -0
- package/dist/esm/theme/v3TokenRoles.mjs +39 -0
- package/dist/esm/theme/v3TokenRoles.mjs.map +1 -0
- package/dist/esm/theme/v3TokenRoles.native.js +39 -0
- package/dist/esm/theme/v3TokenRoles.native.js.map +1 -0
- package/package.json +56 -12
- package/src/expo.ts +20 -0
- package/src/fonts/createFontLoader.ts +8 -4
- package/src/fonts/index.ts +1 -0
- package/src/fonts/interFaces.spec.ts +87 -0
- package/src/fonts/interFaces.ts +26 -0
- package/src/theme/accentButtonLabel.spec.ts +116 -0
- package/src/theme/colorRules.ts +41 -0
- package/src/theme/controlTiers.ts +6 -4
- package/src/theme/defaults/fonts.spec.ts +9 -2
- package/src/theme/defaults/fonts.ts +5 -8
- package/src/theme/glyphTint.spec.ts +30 -2
- package/src/theme/glyphTint.ts +1 -47
- package/src/theme/hairline.spec.ts +60 -3
- package/src/theme/hairline.ts +35 -5
- package/src/theme/readableColor.ts +49 -0
- package/src/theme/resolveKnobs.ts +172 -101
- package/src/theme/scale/activeScale.spec.ts +33 -0
- package/src/theme/scale/activeScale.ts +19 -0
- package/src/theme/scale/index.ts +6 -1
- package/src/theme/subsetThemes.spec.ts +81 -0
- package/src/theme/subsetThemes.ts +13 -1
- package/types/expo.d.ts +10 -0
- package/types/expo.d.ts.map +1 -1
- package/types/fonts/createFontLoader.d.ts.map +1 -1
- package/types/fonts/index.d.ts +1 -0
- package/types/fonts/index.d.ts.map +1 -1
- package/types/fonts/interFaces.d.ts +23 -0
- package/types/fonts/interFaces.d.ts.map +1 -0
- package/types/theme/colorRules.d.ts +6 -0
- package/types/theme/colorRules.d.ts.map +1 -1
- package/types/theme/controlTiers.d.ts +5 -3
- package/types/theme/controlTiers.d.ts.map +1 -1
- package/types/theme/defaults/fonts.d.ts +30 -30
- package/types/theme/defaults/fonts.d.ts.map +1 -1
- package/types/theme/glyphTint.d.ts +0 -6
- package/types/theme/glyphTint.d.ts.map +1 -1
- package/types/theme/hairline.d.ts +14 -3
- package/types/theme/hairline.d.ts.map +1 -1
- package/types/theme/readableColor.d.ts +19 -0
- package/types/theme/readableColor.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts.map +1 -1
- package/types/theme/scale/activeScale.d.ts +8 -0
- package/types/theme/scale/activeScale.d.ts.map +1 -1
- package/types/theme/scale/index.d.ts +1 -1
- package/types/theme/scale/index.d.ts.map +1 -1
- package/types/theme/subsetThemes.d.ts +10 -1
- package/types/theme/subsetThemes.d.ts.map +1 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var colorRules_exports = {};
|
|
24
|
+
__export(colorRules_exports, {
|
|
25
|
+
$color: () => $color,
|
|
26
|
+
aaTextContrastRatio: () => aaTextContrastRatio,
|
|
27
|
+
apcaContrast: () => apcaContrast,
|
|
28
|
+
assertContrast: () => assertContrast,
|
|
29
|
+
buttonColors: () => buttonColors,
|
|
30
|
+
contrastRatio: () => contrastRatio,
|
|
31
|
+
fillLabelLc: () => fillLabelLc,
|
|
32
|
+
findReadableStep: () => findReadableStep,
|
|
33
|
+
holdHueToFloor: () => holdHueToFloor,
|
|
34
|
+
holdInkFloor: () => holdInkFloor,
|
|
35
|
+
inSwitchOffBand: () => inSwitchOffBand,
|
|
36
|
+
inputColors: () => inputColors,
|
|
37
|
+
isLightGround: () => isLightGround,
|
|
38
|
+
measureContrast: () => measureContrast,
|
|
39
|
+
minContrastRatio: () => minContrastRatio,
|
|
40
|
+
normalizeColorScale: () => normalizeColorScale,
|
|
41
|
+
normalizeToHex: () => normalizeToHex,
|
|
42
|
+
pickReadableForeground: () => pickReadableForeground,
|
|
43
|
+
plateContrastRatio: () => plateContrastRatio,
|
|
44
|
+
relativeLuminance: () => relativeLuminance,
|
|
45
|
+
resolveThemeContrast: () => resolveThemeContrast,
|
|
46
|
+
semanticGroups: () => semanticGroups,
|
|
47
|
+
switchOffFillAlpha: () => switchOffFillAlpha,
|
|
48
|
+
switchOffFillBand: () => switchOffFillBand,
|
|
49
|
+
systemFillHex: () => systemFillHex,
|
|
50
|
+
systemFillLuminance: () => systemFillLuminance
|
|
51
|
+
});
|
|
52
|
+
module.exports = __toCommonJS(colorRules_exports);
|
|
53
|
+
function parseChannel(hex, offset) {
|
|
54
|
+
return Number.parseInt(hex.slice(offset, offset + 2), 16) / 255;
|
|
55
|
+
}
|
|
56
|
+
function linearize(c) {
|
|
57
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
58
|
+
}
|
|
59
|
+
function normalizeToHex(raw) {
|
|
60
|
+
const s = raw.trim().toLowerCase();
|
|
61
|
+
if (s === "white" || s === "#fff" || s === "#ffffff") return "#ffffff";
|
|
62
|
+
if (s === "black" || s === "#000" || s === "#000000") return "#000000";
|
|
63
|
+
if (s.startsWith("#") && (s.length === 7 || s.length === 4)) {
|
|
64
|
+
if (s.length === 4) return `#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`;
|
|
65
|
+
return s;
|
|
66
|
+
}
|
|
67
|
+
const hslMatch = s.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);
|
|
68
|
+
if (hslMatch) {
|
|
69
|
+
if (hslMatch[4] !== void 0 && Number(hslMatch[4]) < 0.999) return null;
|
|
70
|
+
const h = Number(hslMatch[1]);
|
|
71
|
+
const sat = Number(hslMatch[2]) / 100;
|
|
72
|
+
const l = Number(hslMatch[3]) / 100;
|
|
73
|
+
const a = sat * Math.min(l, 1 - l);
|
|
74
|
+
const f = n => {
|
|
75
|
+
const k = (n + h / 30) % 12;
|
|
76
|
+
const c = l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));
|
|
77
|
+
return Math.round(c * 255).toString(16).padStart(2, "0");
|
|
78
|
+
};
|
|
79
|
+
return `#${f(0)}${f(8)}${f(4)}`;
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
function relativeLuminance(hex) {
|
|
84
|
+
return 0.2126 * linearize(parseChannel(hex, 1)) + 0.7152 * linearize(parseChannel(hex, 3)) + 0.0722 * linearize(parseChannel(hex, 5));
|
|
85
|
+
}
|
|
86
|
+
function contrastRatio(l1, l2) {
|
|
87
|
+
const [lighter, darker] = l1 > l2 ? [l1, l2] : [l2, l1];
|
|
88
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
89
|
+
}
|
|
90
|
+
function apcaY(hex) {
|
|
91
|
+
const [r, g, b] = [1, 3, 5].map(offset => parseChannel(hex, offset));
|
|
92
|
+
const y = 0.2126729 * r ** 2.4 + 0.7151522 * g ** 2.4 + 0.072175 * b ** 2.4;
|
|
93
|
+
return y < 0.022 ? y + (0.022 - y) ** 1.414 : y;
|
|
94
|
+
}
|
|
95
|
+
function apcaContrast(text, background) {
|
|
96
|
+
const textHex = normalizeToHex(text);
|
|
97
|
+
const backgroundHex = normalizeToHex(background);
|
|
98
|
+
if (!textHex || !backgroundHex) return 0;
|
|
99
|
+
const yText = apcaY(textHex);
|
|
100
|
+
const yBackground = apcaY(backgroundHex);
|
|
101
|
+
if (Math.abs(yBackground - yText) < 5e-4) return 0;
|
|
102
|
+
if (yBackground > yText) {
|
|
103
|
+
const sapc2 = (yBackground ** 0.56 - yText ** 0.57) * 1.14;
|
|
104
|
+
return sapc2 < 0.1 ? 0 : (sapc2 - 0.027) * 100;
|
|
105
|
+
}
|
|
106
|
+
const sapc = (yBackground ** 0.65 - yText ** 0.62) * 1.14;
|
|
107
|
+
return sapc > -0.1 ? 0 : (sapc + 0.027) * 100;
|
|
108
|
+
}
|
|
109
|
+
const fillLabelLc = 60;
|
|
110
|
+
const switchOffFillAlpha = {
|
|
111
|
+
light: 0.16,
|
|
112
|
+
dark: 0.32
|
|
113
|
+
};
|
|
114
|
+
const switchOffFillBand = {
|
|
115
|
+
light: [0.08, 0.24],
|
|
116
|
+
dark: [0.18, 0.4]
|
|
117
|
+
};
|
|
118
|
+
function isLightGround(ground) {
|
|
119
|
+
const hex = normalizeToHex(ground);
|
|
120
|
+
return hex !== null && relativeLuminance(hex) > 0.5;
|
|
121
|
+
}
|
|
122
|
+
function systemFillHex(ground, alpha) {
|
|
123
|
+
const hex = normalizeToHex(ground);
|
|
124
|
+
if (!hex) return null;
|
|
125
|
+
const mixed = [120, 120, 128].map((fill, index) => {
|
|
126
|
+
const under = Number.parseInt(hex.slice(1 + index * 2, 3 + index * 2), 16);
|
|
127
|
+
return Math.round(fill * alpha + under * (1 - alpha)).toString(16).padStart(2, "0");
|
|
128
|
+
}).join("");
|
|
129
|
+
return `#${mixed}`;
|
|
130
|
+
}
|
|
131
|
+
function systemFillLuminance(ground, alpha) {
|
|
132
|
+
const hex = systemFillHex(ground, alpha);
|
|
133
|
+
return hex ? relativeLuminance(hex) : null;
|
|
134
|
+
}
|
|
135
|
+
const plateContrastRatio = 1.1;
|
|
136
|
+
function inSwitchOffBand(track, ground) {
|
|
137
|
+
const hex = normalizeToHex(track);
|
|
138
|
+
if (!hex) return false;
|
|
139
|
+
const [low, high] = switchOffFillBand[isLightGround(ground) ? "light" : "dark"];
|
|
140
|
+
const a = systemFillLuminance(ground, low);
|
|
141
|
+
const b = systemFillLuminance(ground, high);
|
|
142
|
+
if (a === null || b === null) return false;
|
|
143
|
+
const lum = relativeLuminance(hex);
|
|
144
|
+
return lum >= Math.min(a, b) && lum <= Math.max(a, b);
|
|
145
|
+
}
|
|
146
|
+
const minContrastRatio = 3;
|
|
147
|
+
const aaTextContrastRatio = 4.5;
|
|
148
|
+
function measureContrast(pair) {
|
|
149
|
+
const floor = pair.floor ?? aaTextContrastRatio;
|
|
150
|
+
const label = pair.label ?? `${pair.foreground} on ${pair.background}`;
|
|
151
|
+
const foreground = normalizeToHex(pair.foreground);
|
|
152
|
+
if (!foreground) {
|
|
153
|
+
throw new Error(`${label}: foreground is not an opaque color: ${pair.foreground}`);
|
|
154
|
+
}
|
|
155
|
+
const background = normalizeToHex(pair.background);
|
|
156
|
+
if (!background) {
|
|
157
|
+
throw new Error(`${label}: background is not an opaque color: ${pair.background}`);
|
|
158
|
+
}
|
|
159
|
+
const ratio = contrastRatio(relativeLuminance(foreground), relativeLuminance(background));
|
|
160
|
+
return {
|
|
161
|
+
label,
|
|
162
|
+
foreground,
|
|
163
|
+
background,
|
|
164
|
+
ratio,
|
|
165
|
+
floor,
|
|
166
|
+
pass: ratio >= floor
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function assertContrast(pairs) {
|
|
170
|
+
const reports = (Array.isArray(pairs) ? pairs : [pairs]).map(measureContrast);
|
|
171
|
+
const misses = reports.filter(report => !report.pass);
|
|
172
|
+
if (misses.length > 0) {
|
|
173
|
+
const lines = misses.map(report => `${report.label}: ${report.foreground} on ${report.background} = ${report.ratio}:1 \u2014 under the ${report.floor}:1 floor`);
|
|
174
|
+
throw new Error(`contrast floor missed (${misses.length} of ${reports.length} pairs):
|
|
175
|
+
${lines.join("\n")}`);
|
|
176
|
+
}
|
|
177
|
+
return reports;
|
|
178
|
+
}
|
|
179
|
+
function resolveThemeContrast(themes, pair) {
|
|
180
|
+
const theme = themes[pair.theme];
|
|
181
|
+
if (!theme) throw new Error(`no such theme: ${pair.theme}`);
|
|
182
|
+
const foreground = theme[pair.foreground];
|
|
183
|
+
if (!foreground) throw new Error(`${pair.theme} has no ${pair.foreground}`);
|
|
184
|
+
const background = theme[pair.background];
|
|
185
|
+
if (!background) throw new Error(`${pair.theme} has no ${pair.background}`);
|
|
186
|
+
return {
|
|
187
|
+
foreground,
|
|
188
|
+
background,
|
|
189
|
+
floor: pair.floor,
|
|
190
|
+
label: `${pair.theme}: ${pair.foreground} on ${pair.background}`
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function pickReadableForeground(fill, candidateA, candidateB) {
|
|
194
|
+
const fillHex = normalizeToHex(fill);
|
|
195
|
+
const aHex = normalizeToHex(candidateA);
|
|
196
|
+
const bHex = normalizeToHex(candidateB);
|
|
197
|
+
if (!fillHex || !aHex || !bHex) return candidateA;
|
|
198
|
+
const fillLum = relativeLuminance(fillHex);
|
|
199
|
+
return contrastRatio(relativeLuminance(aHex), fillLum) >= contrastRatio(relativeLuminance(bHex), fillLum) ? candidateA : candidateB;
|
|
200
|
+
}
|
|
201
|
+
function holdInkFloor(fill, ink, floor = aaTextContrastRatio) {
|
|
202
|
+
const fillHex = normalizeToHex(fill);
|
|
203
|
+
const inkHex = normalizeToHex(ink);
|
|
204
|
+
if (!fillHex || !inkHex) return ink;
|
|
205
|
+
const fillLum = relativeLuminance(fillHex);
|
|
206
|
+
const inkRatio = contrastRatio(relativeLuminance(inkHex), fillLum);
|
|
207
|
+
if (inkRatio >= floor) return ink;
|
|
208
|
+
const onWhite = contrastRatio(1, fillLum);
|
|
209
|
+
const onBlack = contrastRatio(0, fillLum);
|
|
210
|
+
const poleRatio = Math.max(onWhite, onBlack);
|
|
211
|
+
if (poleRatio <= inkRatio) return ink;
|
|
212
|
+
return onWhite >= onBlack ? "#ffffff" : "#000000";
|
|
213
|
+
}
|
|
214
|
+
function mix(hex, pole, share) {
|
|
215
|
+
return `#${[1, 3, 5].map(offset => {
|
|
216
|
+
const channel = parseInt(hex.slice(offset, offset + 2), 16);
|
|
217
|
+
return Math.round(channel + (pole - channel) * share).toString(16).padStart(2, "0");
|
|
218
|
+
}).join("")}`;
|
|
219
|
+
}
|
|
220
|
+
function holdHueToFloor(hue, surfaces, dark, floor) {
|
|
221
|
+
const hueHex = normalizeToHex(hue);
|
|
222
|
+
const lums = surfaces.map(surface => surface ? normalizeToHex(surface) : null).filter(hex => hex != null).map(relativeLuminance);
|
|
223
|
+
if (!hueHex || lums.length === 0) return hue;
|
|
224
|
+
const clears = hex => {
|
|
225
|
+
const lum = relativeLuminance(hex);
|
|
226
|
+
return lums.every(surface => contrastRatio(lum, surface) >= floor);
|
|
227
|
+
};
|
|
228
|
+
if (clears(hueHex)) return hue;
|
|
229
|
+
const pole = dark ? 255 : 0;
|
|
230
|
+
for (let step = 1; step <= 50; step++) {
|
|
231
|
+
const candidate = mix(hueHex, pole, step * 0.02);
|
|
232
|
+
if (clears(candidate)) return candidate;
|
|
233
|
+
}
|
|
234
|
+
return dark ? "#ffffff" : "#000000";
|
|
235
|
+
}
|
|
236
|
+
function findReadableStep(scale, bgStep, startStep, preferredDir) {
|
|
237
|
+
const bgLum = relativeLuminance(scale[bgStep - 1]);
|
|
238
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[startStep - 1])) >= minContrastRatio) {
|
|
239
|
+
return startStep;
|
|
240
|
+
}
|
|
241
|
+
for (let s = startStep + preferredDir; s >= 1 && s <= 12; s += preferredDir) {
|
|
242
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[s - 1])) >= minContrastRatio) return s;
|
|
243
|
+
}
|
|
244
|
+
for (let s = startStep - preferredDir; s >= 1 && s <= 12; s -= preferredDir) {
|
|
245
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[s - 1])) >= minContrastRatio) return s;
|
|
246
|
+
}
|
|
247
|
+
const l1 = relativeLuminance(scale[0]);
|
|
248
|
+
const l12 = relativeLuminance(scale[11]);
|
|
249
|
+
return contrastRatio(bgLum, l1) >= contrastRatio(bgLum, l12) ? 1 : 12;
|
|
250
|
+
}
|
|
251
|
+
const buttonColors = {
|
|
252
|
+
bg: {
|
|
253
|
+
base: 5,
|
|
254
|
+
hover: 4,
|
|
255
|
+
active: 6
|
|
256
|
+
},
|
|
257
|
+
border: {
|
|
258
|
+
base: 7,
|
|
259
|
+
hover: 6,
|
|
260
|
+
active: 8
|
|
261
|
+
},
|
|
262
|
+
textLow: {
|
|
263
|
+
base: 7,
|
|
264
|
+
hover: 6,
|
|
265
|
+
active: 10
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const inputColors = {
|
|
269
|
+
bg: {
|
|
270
|
+
base: 4,
|
|
271
|
+
hover: 3,
|
|
272
|
+
active: 5
|
|
273
|
+
},
|
|
274
|
+
border: {
|
|
275
|
+
base: 7,
|
|
276
|
+
hover: 6,
|
|
277
|
+
active: 8
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
function $color(step) {
|
|
281
|
+
return `$color${step}`;
|
|
282
|
+
}
|
|
283
|
+
const semanticGroups = [{
|
|
284
|
+
key: "background",
|
|
285
|
+
label: "Background",
|
|
286
|
+
from: 1,
|
|
287
|
+
to: 2,
|
|
288
|
+
color: "#6ec"
|
|
289
|
+
}, {
|
|
290
|
+
key: "ui",
|
|
291
|
+
label: "UI Background",
|
|
292
|
+
from: 3,
|
|
293
|
+
to: 5,
|
|
294
|
+
color: "#b89af5"
|
|
295
|
+
}, {
|
|
296
|
+
key: "border",
|
|
297
|
+
label: "Border",
|
|
298
|
+
from: 6,
|
|
299
|
+
to: 8,
|
|
300
|
+
color: "#ea8"
|
|
301
|
+
}, {
|
|
302
|
+
key: "primary",
|
|
303
|
+
label: "Primary",
|
|
304
|
+
from: 9,
|
|
305
|
+
to: 10,
|
|
306
|
+
color: "#f66"
|
|
307
|
+
}, {
|
|
308
|
+
key: "text",
|
|
309
|
+
label: "Text",
|
|
310
|
+
from: 11,
|
|
311
|
+
to: 12,
|
|
312
|
+
color: "#5af"
|
|
313
|
+
}];
|
|
314
|
+
function normalizeColorScale(raw) {
|
|
315
|
+
if (raw.length !== 12) return null;
|
|
316
|
+
const out = [];
|
|
317
|
+
for (const c of raw) {
|
|
318
|
+
const hex = normalizeToHex(c);
|
|
319
|
+
if (!hex) return null;
|
|
320
|
+
out.push(hex);
|
|
321
|
+
}
|
|
322
|
+
return out;
|
|
323
|
+
}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var colorRules_exports = {};
|
|
26
|
+
__export(colorRules_exports, {
|
|
27
|
+
$color: () => $color,
|
|
28
|
+
aaTextContrastRatio: () => aaTextContrastRatio,
|
|
29
|
+
apcaContrast: () => apcaContrast,
|
|
30
|
+
assertContrast: () => assertContrast,
|
|
31
|
+
buttonColors: () => buttonColors,
|
|
32
|
+
contrastRatio: () => contrastRatio,
|
|
33
|
+
fillLabelLc: () => fillLabelLc,
|
|
34
|
+
findReadableStep: () => findReadableStep,
|
|
35
|
+
holdHueToFloor: () => holdHueToFloor,
|
|
36
|
+
holdInkFloor: () => holdInkFloor,
|
|
37
|
+
inSwitchOffBand: () => inSwitchOffBand,
|
|
38
|
+
inputColors: () => inputColors,
|
|
39
|
+
isLightGround: () => isLightGround,
|
|
40
|
+
measureContrast: () => measureContrast,
|
|
41
|
+
minContrastRatio: () => minContrastRatio,
|
|
42
|
+
normalizeColorScale: () => normalizeColorScale,
|
|
43
|
+
normalizeToHex: () => normalizeToHex,
|
|
44
|
+
pickReadableForeground: () => pickReadableForeground,
|
|
45
|
+
plateContrastRatio: () => plateContrastRatio,
|
|
46
|
+
relativeLuminance: () => relativeLuminance,
|
|
47
|
+
resolveThemeContrast: () => resolveThemeContrast,
|
|
48
|
+
semanticGroups: () => semanticGroups,
|
|
49
|
+
switchOffFillAlpha: () => switchOffFillAlpha,
|
|
50
|
+
switchOffFillBand: () => switchOffFillBand,
|
|
51
|
+
systemFillHex: () => systemFillHex,
|
|
52
|
+
systemFillLuminance: () => systemFillLuminance
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(colorRules_exports);
|
|
55
|
+
function parseChannel(hex, offset) {
|
|
56
|
+
return Number.parseInt(hex.slice(offset, offset + 2), 16) / 255;
|
|
57
|
+
}
|
|
58
|
+
function linearize(c) {
|
|
59
|
+
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
60
|
+
}
|
|
61
|
+
function normalizeToHex(raw) {
|
|
62
|
+
var s = raw.trim().toLowerCase();
|
|
63
|
+
if (s === "white" || s === "#fff" || s === "#ffffff") return "#ffffff";
|
|
64
|
+
if (s === "black" || s === "#000" || s === "#000000") return "#000000";
|
|
65
|
+
if (s.startsWith("#") && (s.length === 7 || s.length === 4)) {
|
|
66
|
+
if (s.length === 4) return `#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`;
|
|
67
|
+
return s;
|
|
68
|
+
}
|
|
69
|
+
var hslMatch = s.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);
|
|
70
|
+
if (hslMatch) {
|
|
71
|
+
if (hslMatch[4] !== void 0 && Number(hslMatch[4]) < 0.999) return null;
|
|
72
|
+
var h = Number(hslMatch[1]);
|
|
73
|
+
var sat = Number(hslMatch[2]) / 100;
|
|
74
|
+
var l = Number(hslMatch[3]) / 100;
|
|
75
|
+
var a = sat * Math.min(l, 1 - l);
|
|
76
|
+
var f = function f2(n) {
|
|
77
|
+
var k = (n + h / 30) % 12;
|
|
78
|
+
var c = l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));
|
|
79
|
+
return Math.round(c * 255).toString(16).padStart(2, "0");
|
|
80
|
+
};
|
|
81
|
+
return `#${f(0)}${f(8)}${f(4)}`;
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function relativeLuminance(hex) {
|
|
86
|
+
return 0.2126 * linearize(parseChannel(hex, 1)) + 0.7152 * linearize(parseChannel(hex, 3)) + 0.0722 * linearize(parseChannel(hex, 5));
|
|
87
|
+
}
|
|
88
|
+
function contrastRatio(l1, l2) {
|
|
89
|
+
var [lighter, darker] = l1 > l2 ? [l1, l2] : [l2, l1];
|
|
90
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
91
|
+
}
|
|
92
|
+
function apcaY(hex) {
|
|
93
|
+
var [r, g, b] = [1, 3, 5].map(function (offset) {
|
|
94
|
+
return parseChannel(hex, offset);
|
|
95
|
+
});
|
|
96
|
+
var y = 0.2126729 * Math.pow(r, 2.4) + 0.7151522 * Math.pow(g, 2.4) + 0.072175 * Math.pow(b, 2.4);
|
|
97
|
+
return y < 0.022 ? y + Math.pow(0.022 - y, 1.414) : y;
|
|
98
|
+
}
|
|
99
|
+
function apcaContrast(text, background) {
|
|
100
|
+
var textHex = normalizeToHex(text);
|
|
101
|
+
var backgroundHex = normalizeToHex(background);
|
|
102
|
+
if (!textHex || !backgroundHex) return 0;
|
|
103
|
+
var yText = apcaY(textHex);
|
|
104
|
+
var yBackground = apcaY(backgroundHex);
|
|
105
|
+
if (Math.abs(yBackground - yText) < 5e-4) return 0;
|
|
106
|
+
if (yBackground > yText) {
|
|
107
|
+
var sapc = (Math.pow(yBackground, 0.56) - Math.pow(yText, 0.57)) * 1.14;
|
|
108
|
+
return sapc < 0.1 ? 0 : (sapc - 0.027) * 100;
|
|
109
|
+
}
|
|
110
|
+
var sapc1 = (Math.pow(yBackground, 0.65) - Math.pow(yText, 0.62)) * 1.14;
|
|
111
|
+
return sapc1 > -0.1 ? 0 : (sapc1 + 0.027) * 100;
|
|
112
|
+
}
|
|
113
|
+
var fillLabelLc = 60;
|
|
114
|
+
var switchOffFillAlpha = {
|
|
115
|
+
light: 0.16,
|
|
116
|
+
dark: 0.32
|
|
117
|
+
};
|
|
118
|
+
var switchOffFillBand = {
|
|
119
|
+
light: [0.08, 0.24],
|
|
120
|
+
dark: [0.18, 0.4]
|
|
121
|
+
};
|
|
122
|
+
function isLightGround(ground) {
|
|
123
|
+
var hex = normalizeToHex(ground);
|
|
124
|
+
return hex !== null && relativeLuminance(hex) > 0.5;
|
|
125
|
+
}
|
|
126
|
+
function systemFillHex(ground, alpha) {
|
|
127
|
+
var hex = normalizeToHex(ground);
|
|
128
|
+
if (!hex) return null;
|
|
129
|
+
var mixed = [120, 120, 128].map(function (fill, index) {
|
|
130
|
+
var under = Number.parseInt(hex.slice(1 + index * 2, 3 + index * 2), 16);
|
|
131
|
+
return Math.round(fill * alpha + under * (1 - alpha)).toString(16).padStart(2, "0");
|
|
132
|
+
}).join("");
|
|
133
|
+
return `#${mixed}`;
|
|
134
|
+
}
|
|
135
|
+
function systemFillLuminance(ground, alpha) {
|
|
136
|
+
var hex = systemFillHex(ground, alpha);
|
|
137
|
+
return hex ? relativeLuminance(hex) : null;
|
|
138
|
+
}
|
|
139
|
+
var plateContrastRatio = 1.1;
|
|
140
|
+
function inSwitchOffBand(track, ground) {
|
|
141
|
+
var hex = normalizeToHex(track);
|
|
142
|
+
if (!hex) return false;
|
|
143
|
+
var [low, high] = switchOffFillBand[isLightGround(ground) ? "light" : "dark"];
|
|
144
|
+
var a = systemFillLuminance(ground, low);
|
|
145
|
+
var b = systemFillLuminance(ground, high);
|
|
146
|
+
if (a === null || b === null) return false;
|
|
147
|
+
var lum = relativeLuminance(hex);
|
|
148
|
+
return lum >= Math.min(a, b) && lum <= Math.max(a, b);
|
|
149
|
+
}
|
|
150
|
+
var minContrastRatio = 3;
|
|
151
|
+
var aaTextContrastRatio = 4.5;
|
|
152
|
+
function measureContrast(pair) {
|
|
153
|
+
var _pair_floor, _pair_label;
|
|
154
|
+
var floor = (_pair_floor = pair.floor) !== null && _pair_floor !== void 0 ? _pair_floor : aaTextContrastRatio;
|
|
155
|
+
var label = (_pair_label = pair.label) !== null && _pair_label !== void 0 ? _pair_label : `${pair.foreground} on ${pair.background}`;
|
|
156
|
+
var foreground = normalizeToHex(pair.foreground);
|
|
157
|
+
if (!foreground) {
|
|
158
|
+
throw new Error(`${label}: foreground is not an opaque color: ${pair.foreground}`);
|
|
159
|
+
}
|
|
160
|
+
var background = normalizeToHex(pair.background);
|
|
161
|
+
if (!background) {
|
|
162
|
+
throw new Error(`${label}: background is not an opaque color: ${pair.background}`);
|
|
163
|
+
}
|
|
164
|
+
var ratio = contrastRatio(relativeLuminance(foreground), relativeLuminance(background));
|
|
165
|
+
return {
|
|
166
|
+
label,
|
|
167
|
+
foreground,
|
|
168
|
+
background,
|
|
169
|
+
ratio,
|
|
170
|
+
floor,
|
|
171
|
+
pass: ratio >= floor
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function assertContrast(pairs) {
|
|
175
|
+
var reports = (Array.isArray(pairs) ? pairs : [pairs]).map(measureContrast);
|
|
176
|
+
var misses = reports.filter(function (report) {
|
|
177
|
+
return !report.pass;
|
|
178
|
+
});
|
|
179
|
+
if (misses.length > 0) {
|
|
180
|
+
var lines = misses.map(function (report) {
|
|
181
|
+
return `${report.label}: ${report.foreground} on ${report.background} = ${report.ratio}:1 \u2014 under the ${report.floor}:1 floor`;
|
|
182
|
+
});
|
|
183
|
+
throw new Error(`contrast floor missed (${misses.length} of ${reports.length} pairs):
|
|
184
|
+
${lines.join("\n")}`);
|
|
185
|
+
}
|
|
186
|
+
return reports;
|
|
187
|
+
}
|
|
188
|
+
function resolveThemeContrast(themes, pair) {
|
|
189
|
+
var theme = themes[pair.theme];
|
|
190
|
+
if (!theme) throw new Error(`no such theme: ${pair.theme}`);
|
|
191
|
+
var foreground = theme[pair.foreground];
|
|
192
|
+
if (!foreground) throw new Error(`${pair.theme} has no ${pair.foreground}`);
|
|
193
|
+
var background = theme[pair.background];
|
|
194
|
+
if (!background) throw new Error(`${pair.theme} has no ${pair.background}`);
|
|
195
|
+
return {
|
|
196
|
+
foreground,
|
|
197
|
+
background,
|
|
198
|
+
floor: pair.floor,
|
|
199
|
+
label: `${pair.theme}: ${pair.foreground} on ${pair.background}`
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function pickReadableForeground(fill, candidateA, candidateB) {
|
|
203
|
+
var fillHex = normalizeToHex(fill);
|
|
204
|
+
var aHex = normalizeToHex(candidateA);
|
|
205
|
+
var bHex = normalizeToHex(candidateB);
|
|
206
|
+
if (!fillHex || !aHex || !bHex) return candidateA;
|
|
207
|
+
var fillLum = relativeLuminance(fillHex);
|
|
208
|
+
return contrastRatio(relativeLuminance(aHex), fillLum) >= contrastRatio(relativeLuminance(bHex), fillLum) ? candidateA : candidateB;
|
|
209
|
+
}
|
|
210
|
+
function holdInkFloor(fill, ink) {
|
|
211
|
+
var floor = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : aaTextContrastRatio;
|
|
212
|
+
var fillHex = normalizeToHex(fill);
|
|
213
|
+
var inkHex = normalizeToHex(ink);
|
|
214
|
+
if (!fillHex || !inkHex) return ink;
|
|
215
|
+
var fillLum = relativeLuminance(fillHex);
|
|
216
|
+
var inkRatio = contrastRatio(relativeLuminance(inkHex), fillLum);
|
|
217
|
+
if (inkRatio >= floor) return ink;
|
|
218
|
+
var onWhite = contrastRatio(1, fillLum);
|
|
219
|
+
var onBlack = contrastRatio(0, fillLum);
|
|
220
|
+
var poleRatio = Math.max(onWhite, onBlack);
|
|
221
|
+
if (poleRatio <= inkRatio) return ink;
|
|
222
|
+
return onWhite >= onBlack ? "#ffffff" : "#000000";
|
|
223
|
+
}
|
|
224
|
+
function mix(hex, pole, share) {
|
|
225
|
+
return `#${[1, 3, 5].map(function (offset) {
|
|
226
|
+
var channel = parseInt(hex.slice(offset, offset + 2), 16);
|
|
227
|
+
return Math.round(channel + (pole - channel) * share).toString(16).padStart(2, "0");
|
|
228
|
+
}).join("")}`;
|
|
229
|
+
}
|
|
230
|
+
function holdHueToFloor(hue, surfaces, dark, floor) {
|
|
231
|
+
var hueHex = normalizeToHex(hue);
|
|
232
|
+
var lums = surfaces.map(function (surface) {
|
|
233
|
+
return surface ? normalizeToHex(surface) : null;
|
|
234
|
+
}).filter(function (hex) {
|
|
235
|
+
return hex != null;
|
|
236
|
+
}).map(relativeLuminance);
|
|
237
|
+
if (!hueHex || lums.length === 0) return hue;
|
|
238
|
+
var clears = function clears2(hex) {
|
|
239
|
+
var lum = relativeLuminance(hex);
|
|
240
|
+
return lums.every(function (surface) {
|
|
241
|
+
return contrastRatio(lum, surface) >= floor;
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
if (clears(hueHex)) return hue;
|
|
245
|
+
var pole = dark ? 255 : 0;
|
|
246
|
+
for (var step = 1; step <= 50; step++) {
|
|
247
|
+
var candidate = mix(hueHex, pole, step * 0.02);
|
|
248
|
+
if (clears(candidate)) return candidate;
|
|
249
|
+
}
|
|
250
|
+
return dark ? "#ffffff" : "#000000";
|
|
251
|
+
}
|
|
252
|
+
function findReadableStep(scale, bgStep, startStep, preferredDir) {
|
|
253
|
+
var bgLum = relativeLuminance(scale[bgStep - 1]);
|
|
254
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[startStep - 1])) >= minContrastRatio) {
|
|
255
|
+
return startStep;
|
|
256
|
+
}
|
|
257
|
+
for (var s = startStep + preferredDir; s >= 1 && s <= 12; s += preferredDir) {
|
|
258
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[s - 1])) >= minContrastRatio) return s;
|
|
259
|
+
}
|
|
260
|
+
for (var s1 = startStep - preferredDir; s1 >= 1 && s1 <= 12; s1 -= preferredDir) {
|
|
261
|
+
if (contrastRatio(bgLum, relativeLuminance(scale[s1 - 1])) >= minContrastRatio) return s1;
|
|
262
|
+
}
|
|
263
|
+
var l1 = relativeLuminance(scale[0]);
|
|
264
|
+
var l12 = relativeLuminance(scale[11]);
|
|
265
|
+
return contrastRatio(bgLum, l1) >= contrastRatio(bgLum, l12) ? 1 : 12;
|
|
266
|
+
}
|
|
267
|
+
var buttonColors = {
|
|
268
|
+
bg: {
|
|
269
|
+
base: 5,
|
|
270
|
+
hover: 4,
|
|
271
|
+
active: 6
|
|
272
|
+
},
|
|
273
|
+
border: {
|
|
274
|
+
base: 7,
|
|
275
|
+
hover: 6,
|
|
276
|
+
active: 8
|
|
277
|
+
},
|
|
278
|
+
textLow: {
|
|
279
|
+
base: 7,
|
|
280
|
+
hover: 6,
|
|
281
|
+
active: 10
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
var inputColors = {
|
|
285
|
+
bg: {
|
|
286
|
+
base: 4,
|
|
287
|
+
hover: 3,
|
|
288
|
+
active: 5
|
|
289
|
+
},
|
|
290
|
+
border: {
|
|
291
|
+
base: 7,
|
|
292
|
+
hover: 6,
|
|
293
|
+
active: 8
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
function $color(step) {
|
|
297
|
+
return `$color${step}`;
|
|
298
|
+
}
|
|
299
|
+
var semanticGroups = [{
|
|
300
|
+
key: "background",
|
|
301
|
+
label: "Background",
|
|
302
|
+
from: 1,
|
|
303
|
+
to: 2,
|
|
304
|
+
color: "#6ec"
|
|
305
|
+
}, {
|
|
306
|
+
key: "ui",
|
|
307
|
+
label: "UI Background",
|
|
308
|
+
from: 3,
|
|
309
|
+
to: 5,
|
|
310
|
+
color: "#b89af5"
|
|
311
|
+
}, {
|
|
312
|
+
key: "border",
|
|
313
|
+
label: "Border",
|
|
314
|
+
from: 6,
|
|
315
|
+
to: 8,
|
|
316
|
+
color: "#ea8"
|
|
317
|
+
}, {
|
|
318
|
+
key: "primary",
|
|
319
|
+
label: "Primary",
|
|
320
|
+
from: 9,
|
|
321
|
+
to: 10,
|
|
322
|
+
color: "#f66"
|
|
323
|
+
}, {
|
|
324
|
+
key: "text",
|
|
325
|
+
label: "Text",
|
|
326
|
+
from: 11,
|
|
327
|
+
to: 12,
|
|
328
|
+
color: "#5af"
|
|
329
|
+
}];
|
|
330
|
+
function normalizeColorScale(raw) {
|
|
331
|
+
if (raw.length !== 12) return null;
|
|
332
|
+
var out = [];
|
|
333
|
+
var _iteratorNormalCompletion = true,
|
|
334
|
+
_didIteratorError = false,
|
|
335
|
+
_iteratorError = void 0;
|
|
336
|
+
try {
|
|
337
|
+
for (var _iterator = raw[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
338
|
+
var c = _step.value;
|
|
339
|
+
var hex = normalizeToHex(c);
|
|
340
|
+
if (!hex) return null;
|
|
341
|
+
out.push(hex);
|
|
342
|
+
}
|
|
343
|
+
} catch (err) {
|
|
344
|
+
_didIteratorError = true;
|
|
345
|
+
_iteratorError = err;
|
|
346
|
+
} finally {
|
|
347
|
+
try {
|
|
348
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
349
|
+
_iterator.return();
|
|
350
|
+
}
|
|
351
|
+
} finally {
|
|
352
|
+
if (_didIteratorError) {
|
|
353
|
+
throw _iteratorError;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return out;
|
|
358
|
+
}
|
|
359
|
+
//# sourceMappingURL=colorRules.native.js.map
|