@multiplatform.one/theme 7.83.0 → 7.83.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/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 +82 -0
- package/dist/cjs/expo.native.js +87 -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 +69 -0
- package/dist/cjs/fonts/createFontLoader.native.js.map +1 -0
- package/dist/cjs/fonts/index.cjs +21 -0
- package/dist/cjs/fonts/index.native.js +24 -0
- package/dist/cjs/fonts/index.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 +300 -0
- package/dist/cjs/theme/colorRules.native.js +330 -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 +301 -0
- package/dist/cjs/theme/defaults/fonts.native.js +390 -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 +113 -0
- package/dist/cjs/theme/glyphTint.native.js +125 -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 +102 -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 +248 -0
- package/dist/cjs/theme/readableColor.native.js +354 -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 +778 -0
- package/dist/cjs/theme/resolveKnobs.native.js +795 -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 +53 -0
- package/dist/esm/expo.mjs.map +1 -0
- package/dist/esm/expo.native.js +55 -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 +41 -0
- package/dist/esm/fonts/createFontLoader.native.js.map +1 -0
- package/dist/esm/fonts/index.mjs +3 -0
- package/dist/esm/fonts/index.mjs.map +1 -0
- package/dist/esm/fonts/index.native.js +3 -0
- package/dist/esm/fonts/index.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 +251 -0
- package/dist/esm/theme/colorRules.mjs.map +1 -0
- package/dist/esm/theme/colorRules.native.js +278 -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 +240 -0
- package/dist/esm/theme/defaults/fonts.mjs.map +1 -0
- package/dist/esm/theme/defaults/fonts.native.js +326 -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 +82 -0
- package/dist/esm/theme/glyphTint.mjs.map +1 -0
- package/dist/esm/theme/glyphTint.native.js +91 -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 +73 -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 +214 -0
- package/dist/esm/theme/readableColor.mjs.map +1 -0
- package/dist/esm/theme/readableColor.native.js +317 -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 +730 -0
- package/dist/esm/theme/resolveKnobs.mjs.map +1 -0
- package/dist/esm/theme/resolveKnobs.native.js +744 -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/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/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 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","keyboardFocusRing_exports","__export","compositeFocusRingCss","ensureCompositeFocusRing","ensureKeyboardModalityTracking","focusOnOpen","keyboardFocusRingProps","wasKeyboardFocus","module","exports","import_focusState","require","lastInputWasKeyboard","lastPointerWasTouch","hooked","document","addEventListener","event","pointerType","isTextEntry","node","isContentEditable","tagName","type","includes","target","frame","keyboard","caret","hasAttribute","tabIndex","focus","preventScroll","focusVisible","FOCUS_VISIBLE_RING_INSET"],"sources":["../../src/keyboardFocusRing.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,yBAAA;AAAAC,QAAA,CAAAD,yBAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,wBAAA,EAAAA,CAAA,KAAAA,wBAAA;EAAAC,8BAAA,EAAAA,CAAA,KAAAA,8BAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AA2EAC,MAAA,CAAAC,OAAA,GAAAd,YAAyC,CAAAK,yBAAA;AA/DzC,IAAIU,iBAAA,GAAAC,OAAuB;AAC3B,IAAIC,oBAAA,GAAsB;AAC1B,IAAIC,mBAAS;AAON,IAAAC,MAAS;AACd,SAAIV,8BAA8BA,CAAA;EAClC,IAAAU,MAAS,WAAAC,QAAA;EACTD,MAAA,GAAS;EACTC,QAAA,CAASC,gBAAA;IACP,OAAAJ,oBAAA;EAAA,GACC;EACCG,QAAA,CAAAC,gBAAA,cAAuB,YAAAC,KAAA;IACvBL,oBAAA,QAAsB;IACxBC,mBAAA,GAAAI,KAAA,CAAAC,WAAA;EAAA,GACA;AAAA;AAEJ,SAAAX,iBAAA;EAQOH,8BAAqC;EAC1C,OAAAQ,oBAAA;AACA;AACF,SAAAO,YAAAC,IAAA;EAEA,IAAAA,IAAS,CAAAC,iBAAwC,IAAAD,IAAA,CAAAE,OAAA;EAC/C,IAAIF,IAAA,CAAKE,OAAA,cAAqB,OAAK;EACnC,IAAIC,IAAA,GAAKH,IAAA,CAAAG,IAAA;EACT,OAAM,EACN,QAAS,EACP,YACF,SACF,QAYO,OAAS,EACd,SACA,OAAM,EACN,QAAM,CACN,CAAAC,QAAM,CAAAD,IAAO;AACb;AACA,SAAKlB,WAAQA,CAAAoB,MAAA,EAAAC,KAAe,EAAM;EAClCtB,8BAAO;EACT,IAAAuB,QAAA,GAAAf,oBAAA;EAeO,IAAMgB,KAAA,GAAAH,MAAA,aAAyBN,WAAA,CAAAM,MAAA,MAAAZ,mBAAA;EACpC,IAAGO,IAAA,GAAAK,MAAA,KAAAE,QAAA,IAAAC,KAAA,IAAAH,MAAA,GAAAC,KAAA;EACL,IAAAN,IAAA,KAAAM,KAAA,KAAAA,KAAA,CAAAG,YAAA,cAAAH,KAAA,CAAAI,QAAA;EAUOV,IAAM,CAAAW,KAAA;IAAwBC,aAAA;IAAAC,YAAA,EAAAN;EAAA;EAAA,OAAAP,IAAA;AAAA;AAAA,IAAAd,sBAAA;EAAA,GAAAI,iBAAA,CAAAwB;AAAA;AAAA,IAAAhC,qBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCrC;AAGO;AACL;AACA;AACA;AACA;AACA;AACA;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 menuRow_exports = {};
|
|
24
|
+
__export(menuRow_exports, {
|
|
25
|
+
menuRowCheckGlyph: () => menuRowCheckGlyph,
|
|
26
|
+
menuRowCheckInk: () => menuRowCheckInk,
|
|
27
|
+
menuRowChecked: () => menuRowChecked,
|
|
28
|
+
menuRowFrame: () => menuRowFrame,
|
|
29
|
+
menuRowIconGlyph: () => menuRowIconGlyph,
|
|
30
|
+
resolveMenuRowCheckInk: () => resolveMenuRowCheckInk,
|
|
31
|
+
useMenuRowCheckInk: () => useMenuRowCheckInk
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(menuRow_exports);
|
|
34
|
+
var import_tamagui = require("tamagui");
|
|
35
|
+
var import_colorRules = require("./theme/colorRules.cjs");
|
|
36
|
+
const menuRowFrame = {
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
width: "100%",
|
|
40
|
+
paddingHorizontal: "$3",
|
|
41
|
+
borderRadius: 0,
|
|
42
|
+
userSelect: "none",
|
|
43
|
+
backgroundColor: "transparent"
|
|
44
|
+
};
|
|
45
|
+
function menuRowChecked(scheme) {
|
|
46
|
+
const fill = scheme === "dark" ? "$color5" : "$color3";
|
|
47
|
+
return {
|
|
48
|
+
backgroundColor: fill,
|
|
49
|
+
hoverStyle: {
|
|
50
|
+
backgroundColor: fill
|
|
51
|
+
},
|
|
52
|
+
pressStyle: {
|
|
53
|
+
backgroundColor: fill
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const menuRowCheckInk = "$accentColor";
|
|
58
|
+
const menuRowCheckGlyph = {
|
|
59
|
+
size: 14,
|
|
60
|
+
weight: "bold"
|
|
61
|
+
};
|
|
62
|
+
const menuRowIconGlyph = {
|
|
63
|
+
size: 18,
|
|
64
|
+
weight: "bold"
|
|
65
|
+
};
|
|
66
|
+
function isHueless(paint) {
|
|
67
|
+
const hex = (0, import_colorRules.normalizeToHex)(paint);
|
|
68
|
+
if (!hex) return false;
|
|
69
|
+
const rgb = [1, 3, 5].map(i => Number.parseInt(hex.slice(i, i + 2), 16));
|
|
70
|
+
return Math.max(...rgb) - Math.min(...rgb) <= 8;
|
|
71
|
+
}
|
|
72
|
+
function resolveMenuRowCheckInk(theme) {
|
|
73
|
+
const tint = theme[menuRowCheckInk.slice(1)]?.val;
|
|
74
|
+
const ink = theme.color?.val;
|
|
75
|
+
if (typeof tint === "string" && !(isHueless(tint) && typeof ink === "string")) return tint;
|
|
76
|
+
return typeof ink === "string" ? ink : "currentColor";
|
|
77
|
+
}
|
|
78
|
+
function useMenuRowCheckInk() {
|
|
79
|
+
return resolveMenuRowCheckInk((0, import_tamagui.useTheme)());
|
|
80
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 menuRow_exports = {};
|
|
26
|
+
__export(menuRow_exports, {
|
|
27
|
+
menuRowCheckGlyph: () => menuRowCheckGlyph,
|
|
28
|
+
menuRowCheckInk: () => menuRowCheckInk,
|
|
29
|
+
menuRowChecked: () => menuRowChecked,
|
|
30
|
+
menuRowFrame: () => menuRowFrame,
|
|
31
|
+
menuRowIconGlyph: () => menuRowIconGlyph,
|
|
32
|
+
resolveMenuRowCheckInk: () => resolveMenuRowCheckInk,
|
|
33
|
+
useMenuRowCheckInk: () => useMenuRowCheckInk
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(menuRow_exports);
|
|
36
|
+
var import_tamagui = require("tamagui");
|
|
37
|
+
var import_colorRules = require("./theme/colorRules.native.js");
|
|
38
|
+
var menuRowFrame = {
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
width: "100%",
|
|
42
|
+
paddingHorizontal: "$3",
|
|
43
|
+
borderRadius: 0,
|
|
44
|
+
userSelect: "none",
|
|
45
|
+
backgroundColor: "transparent"
|
|
46
|
+
};
|
|
47
|
+
function menuRowChecked(scheme) {
|
|
48
|
+
var fill = scheme === "dark" ? "$color5" : "$color3";
|
|
49
|
+
return {
|
|
50
|
+
backgroundColor: fill,
|
|
51
|
+
hoverStyle: {
|
|
52
|
+
backgroundColor: fill
|
|
53
|
+
},
|
|
54
|
+
pressStyle: {
|
|
55
|
+
backgroundColor: fill
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var menuRowCheckInk = "$accentColor";
|
|
60
|
+
var menuRowCheckGlyph = {
|
|
61
|
+
size: 14,
|
|
62
|
+
weight: "bold"
|
|
63
|
+
};
|
|
64
|
+
var menuRowIconGlyph = {
|
|
65
|
+
size: 18,
|
|
66
|
+
weight: "bold"
|
|
67
|
+
};
|
|
68
|
+
function isHueless(paint) {
|
|
69
|
+
var hex = (0, import_colorRules.normalizeToHex)(paint);
|
|
70
|
+
if (!hex) return false;
|
|
71
|
+
var rgb = [1, 3, 5].map(function (i) {
|
|
72
|
+
return Number.parseInt(hex.slice(i, i + 2), 16);
|
|
73
|
+
});
|
|
74
|
+
return Math.max(...rgb) - Math.min(...rgb) <= 8;
|
|
75
|
+
}
|
|
76
|
+
function resolveMenuRowCheckInk(theme) {
|
|
77
|
+
var _theme_menuRowCheckInk_slice, _theme_color;
|
|
78
|
+
var tint = (_theme_menuRowCheckInk_slice = theme[menuRowCheckInk.slice(1)]) === null || _theme_menuRowCheckInk_slice === void 0 ? void 0 : _theme_menuRowCheckInk_slice.val;
|
|
79
|
+
var ink = (_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.val;
|
|
80
|
+
if (typeof tint === "string" && !(isHueless(tint) && typeof ink === "string")) return tint;
|
|
81
|
+
return typeof ink === "string" ? ink : "currentColor";
|
|
82
|
+
}
|
|
83
|
+
function useMenuRowCheckInk() {
|
|
84
|
+
return resolveMenuRowCheckInk((0, import_tamagui.useTheme)());
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=menuRow.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","menuRow_exports","__export","menuRowCheckGlyph","menuRowCheckInk","menuRowChecked","menuRowFrame","menuRowIconGlyph","resolveMenuRowCheckInk","useMenuRowCheckInk","module","exports","import_tamagui","require","import_colorRules","flexDirection","alignItems","width","paddingHorizontal","borderRadius","userSelect","backgroundColor","scheme","fill","hoverStyle","pressStyle","size","weight","isHueless","paint","hex","normalizeToHex","rgb"],"sources":["../../src/menuRow.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAf,YAAyB,CAAAK,eAAA;AACzB,IAAAW,cAAA,GAAAC,OAA+B;AA6BxB,IAAAC,iBAAqB,GAAAD,OAAA;AAAA,IAC1BP,YAAA,GAAe;EACfS,aAAY;EACZC,UAAO;EACPC,KAAA;EACAC,iBAAc;EACdC,YAAY;EACZC,UAAA,QAAiB;EACnBC,eAAA;AAgBO;AACL,SAAMhB,cAAOA,CAAAiB,MAAW;EACxB,IAAAC,IAAO,GAAAD,MAAA;EAAA,OACL;IACAD,eAAc,EAAAE,IAAA;IACdC,UAAA,EAAY;MACdH,eAAA,EAAAE;IACF;IAGOE,UAAM;MAQAJ,eAAA,EAAAE;IAON;EAMP;AACE;AACA,IAAAnB,eAAiB;AACjB,IAAAD,iBAAmB,GAAG;EACtBuB,IAAA,IAAO;EACTC,MAAA;AAQO;AACL,IAAApB,gBAAa,GAAM;EACnBmB,IAAA,EAAM;EACNC,MAAI;AACJ;AACF,SAAAC,UAAAC,KAAA;EAGO,IAAAC,GAAS,OAAAhB,iBAA6B,CAAAiB,cAAA,EAAAF,KAAA;EAC3C,KAAAC,GAAO;EACT,IAAAE,GAAA,I","ignoreList":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
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 numbers_exports = {};
|
|
24
|
+
__export(numbers_exports, {
|
|
25
|
+
currencyAffix: () => currencyAffix,
|
|
26
|
+
formatCurrency: () => formatCurrency,
|
|
27
|
+
formatNumber: () => formatNumber,
|
|
28
|
+
formatPercent: () => formatPercent,
|
|
29
|
+
resolveCurrencyCode: () => resolveCurrencyCode
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(numbers_exports);
|
|
32
|
+
const CURRENCY_SYMBOL_TO_CODE = {
|
|
33
|
+
$: "USD",
|
|
34
|
+
"\u20AC": "EUR",
|
|
35
|
+
"\xA3": "GBP",
|
|
36
|
+
"\xA5": "JPY",
|
|
37
|
+
"\u20B9": "INR",
|
|
38
|
+
"\u20A9": "KRW",
|
|
39
|
+
"\u20BD": "RUB",
|
|
40
|
+
R$: "BRL"
|
|
41
|
+
};
|
|
42
|
+
function resolveCurrencyCode(symbol) {
|
|
43
|
+
if (!symbol) return void 0;
|
|
44
|
+
if (/^[A-Za-z]{3}$/.test(symbol)) return symbol.toUpperCase();
|
|
45
|
+
return CURRENCY_SYMBOL_TO_CODE[symbol];
|
|
46
|
+
}
|
|
47
|
+
function currencyAffix(currency, locale) {
|
|
48
|
+
if (!currency) return void 0;
|
|
49
|
+
const code = resolveCurrencyCode(currency);
|
|
50
|
+
if (code) {
|
|
51
|
+
try {
|
|
52
|
+
const parts = new Intl.NumberFormat(locale, {
|
|
53
|
+
style: "currency",
|
|
54
|
+
currency: code,
|
|
55
|
+
currencyDisplay: "narrowSymbol"
|
|
56
|
+
}).formatToParts(1);
|
|
57
|
+
const glyphIndex = parts.findIndex(part => part.type === "currency");
|
|
58
|
+
const amountIndex = parts.findIndex(part => part.type === "integer");
|
|
59
|
+
if (glyphIndex !== -1) {
|
|
60
|
+
return {
|
|
61
|
+
glyph: parts[glyphIndex].value,
|
|
62
|
+
position: amountIndex !== -1 && glyphIndex > amountIndex ? "trailing" : "leading"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
} catch {}
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
glyph: currency,
|
|
69
|
+
position: "leading"
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function coerceNumberInput(value) {
|
|
73
|
+
if (value == null || value === "") return null;
|
|
74
|
+
if (typeof value === "number") return Number.isFinite(value) ? {
|
|
75
|
+
num: value
|
|
76
|
+
} : null;
|
|
77
|
+
const num = Number(value);
|
|
78
|
+
return Number.isFinite(num) ? {
|
|
79
|
+
num
|
|
80
|
+
} : null;
|
|
81
|
+
}
|
|
82
|
+
function resolveDigits(options) {
|
|
83
|
+
const {
|
|
84
|
+
precision,
|
|
85
|
+
minimumFractionDigits,
|
|
86
|
+
maximumFractionDigits
|
|
87
|
+
} = options;
|
|
88
|
+
if (precision != null) {
|
|
89
|
+
return {
|
|
90
|
+
minimumFractionDigits: precision,
|
|
91
|
+
maximumFractionDigits: precision
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const max = maximumFractionDigits ?? 2;
|
|
95
|
+
const min = minimumFractionDigits ?? 0;
|
|
96
|
+
return {
|
|
97
|
+
minimumFractionDigits: min,
|
|
98
|
+
maximumFractionDigits: Math.max(min, max)
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function tryFormatWith(num, options, locale) {
|
|
102
|
+
try {
|
|
103
|
+
return new Intl.NumberFormat(locale, options).format(num);
|
|
104
|
+
} catch {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function formatWith(num, options, locale) {
|
|
109
|
+
return tryFormatWith(num, options, locale) ?? String(num);
|
|
110
|
+
}
|
|
111
|
+
function formatNumber(value, options = {}) {
|
|
112
|
+
const coerced = coerceNumberInput(value);
|
|
113
|
+
if (!coerced) return typeof value === "string" ? value : "";
|
|
114
|
+
return formatWith(coerced.num, {
|
|
115
|
+
...resolveDigits(options),
|
|
116
|
+
useGrouping: options.grouping ?? true
|
|
117
|
+
}, options.locale);
|
|
118
|
+
}
|
|
119
|
+
function formatCurrency(value, options = {}) {
|
|
120
|
+
const coerced = coerceNumberInput(value);
|
|
121
|
+
if (!coerced) return typeof value === "string" ? value : "";
|
|
122
|
+
const {
|
|
123
|
+
currency,
|
|
124
|
+
symbol,
|
|
125
|
+
fractionDigits = "always",
|
|
126
|
+
locale,
|
|
127
|
+
grouping
|
|
128
|
+
} = options;
|
|
129
|
+
const hasExplicitDigits = options.precision != null || options.minimumFractionDigits != null || options.maximumFractionDigits != null;
|
|
130
|
+
const wholeValue = Number.isInteger(coerced.num);
|
|
131
|
+
const digits = hasExplicitDigits ? resolveDigits(options) : fractionDigits === "auto" && wholeValue ? {
|
|
132
|
+
minimumFractionDigits: 0,
|
|
133
|
+
maximumFractionDigits: 0
|
|
134
|
+
} : {
|
|
135
|
+
minimumFractionDigits: 2,
|
|
136
|
+
maximumFractionDigits: 2
|
|
137
|
+
};
|
|
138
|
+
const code = currency ?? resolveCurrencyCode(symbol);
|
|
139
|
+
const useGrouping = grouping ?? true;
|
|
140
|
+
if (code) {
|
|
141
|
+
const styled = tryFormatWith(coerced.num, {
|
|
142
|
+
...digits,
|
|
143
|
+
useGrouping,
|
|
144
|
+
style: "currency",
|
|
145
|
+
currency: code
|
|
146
|
+
}, locale);
|
|
147
|
+
if (styled != null) return styled;
|
|
148
|
+
}
|
|
149
|
+
const amount = formatWith(coerced.num, {
|
|
150
|
+
...digits,
|
|
151
|
+
useGrouping
|
|
152
|
+
}, locale);
|
|
153
|
+
const label = symbol ?? currency;
|
|
154
|
+
return label ? `${label}${amount}` : amount;
|
|
155
|
+
}
|
|
156
|
+
function formatPercent(value, options = {}) {
|
|
157
|
+
const formatted = formatNumber(value, options);
|
|
158
|
+
if (formatted === "") return "";
|
|
159
|
+
const coerced = coerceNumberInput(value);
|
|
160
|
+
return coerced ? `${formatted}%` : formatted;
|
|
161
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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 numbers_exports = {};
|
|
26
|
+
__export(numbers_exports, {
|
|
27
|
+
currencyAffix: () => currencyAffix,
|
|
28
|
+
formatCurrency: () => formatCurrency,
|
|
29
|
+
formatNumber: () => formatNumber,
|
|
30
|
+
formatPercent: () => formatPercent,
|
|
31
|
+
resolveCurrencyCode: () => resolveCurrencyCode
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(numbers_exports);
|
|
34
|
+
var CURRENCY_SYMBOL_TO_CODE = {
|
|
35
|
+
$: "USD",
|
|
36
|
+
"\u20AC": "EUR",
|
|
37
|
+
"\xA3": "GBP",
|
|
38
|
+
"\xA5": "JPY",
|
|
39
|
+
"\u20B9": "INR",
|
|
40
|
+
"\u20A9": "KRW",
|
|
41
|
+
"\u20BD": "RUB",
|
|
42
|
+
R$: "BRL"
|
|
43
|
+
};
|
|
44
|
+
function resolveCurrencyCode(symbol) {
|
|
45
|
+
if (!symbol) return void 0;
|
|
46
|
+
if (/^[A-Za-z]{3}$/.test(symbol)) return symbol.toUpperCase();
|
|
47
|
+
return CURRENCY_SYMBOL_TO_CODE[symbol];
|
|
48
|
+
}
|
|
49
|
+
function currencyAffix(currency, locale) {
|
|
50
|
+
if (!currency) return void 0;
|
|
51
|
+
var code = resolveCurrencyCode(currency);
|
|
52
|
+
if (code) {
|
|
53
|
+
try {
|
|
54
|
+
var parts = new Intl.NumberFormat(locale, {
|
|
55
|
+
style: "currency",
|
|
56
|
+
currency: code,
|
|
57
|
+
currencyDisplay: "narrowSymbol"
|
|
58
|
+
}).formatToParts(1);
|
|
59
|
+
var glyphIndex = parts.findIndex(function (part) {
|
|
60
|
+
return part.type === "currency";
|
|
61
|
+
});
|
|
62
|
+
var amountIndex = parts.findIndex(function (part) {
|
|
63
|
+
return part.type === "integer";
|
|
64
|
+
});
|
|
65
|
+
if (glyphIndex !== -1) {
|
|
66
|
+
return {
|
|
67
|
+
glyph: parts[glyphIndex].value,
|
|
68
|
+
position: amountIndex !== -1 && glyphIndex > amountIndex ? "trailing" : "leading"
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
} catch (unused) {}
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
glyph: currency,
|
|
75
|
+
position: "leading"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function coerceNumberInput(value) {
|
|
79
|
+
if (value == null || value === "") return null;
|
|
80
|
+
if (typeof value === "number") return Number.isFinite(value) ? {
|
|
81
|
+
num: value
|
|
82
|
+
} : null;
|
|
83
|
+
var num = Number(value);
|
|
84
|
+
return Number.isFinite(num) ? {
|
|
85
|
+
num
|
|
86
|
+
} : null;
|
|
87
|
+
}
|
|
88
|
+
function resolveDigits(options) {
|
|
89
|
+
var {
|
|
90
|
+
precision,
|
|
91
|
+
minimumFractionDigits,
|
|
92
|
+
maximumFractionDigits
|
|
93
|
+
} = options;
|
|
94
|
+
if (precision != null) {
|
|
95
|
+
return {
|
|
96
|
+
minimumFractionDigits: precision,
|
|
97
|
+
maximumFractionDigits: precision
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
var max = maximumFractionDigits !== null && maximumFractionDigits !== void 0 ? maximumFractionDigits : 2;
|
|
101
|
+
var min = minimumFractionDigits !== null && minimumFractionDigits !== void 0 ? minimumFractionDigits : 0;
|
|
102
|
+
return {
|
|
103
|
+
minimumFractionDigits: min,
|
|
104
|
+
maximumFractionDigits: Math.max(min, max)
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function tryFormatWith(num, options, locale) {
|
|
108
|
+
try {
|
|
109
|
+
return new Intl.NumberFormat(locale, options).format(num);
|
|
110
|
+
} catch (unused) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function formatWith(num, options, locale) {
|
|
115
|
+
var _tryFormatWith;
|
|
116
|
+
return (_tryFormatWith = tryFormatWith(num, options, locale)) !== null && _tryFormatWith !== void 0 ? _tryFormatWith : String(num);
|
|
117
|
+
}
|
|
118
|
+
function formatNumber(value) {
|
|
119
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
120
|
+
var _options_grouping;
|
|
121
|
+
var coerced = coerceNumberInput(value);
|
|
122
|
+
if (!coerced) return typeof value === "string" ? value : "";
|
|
123
|
+
return formatWith(coerced.num, {
|
|
124
|
+
...resolveDigits(options),
|
|
125
|
+
useGrouping: (_options_grouping = options.grouping) !== null && _options_grouping !== void 0 ? _options_grouping : true
|
|
126
|
+
}, options.locale);
|
|
127
|
+
}
|
|
128
|
+
function formatCurrency(value) {
|
|
129
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
130
|
+
var coerced = coerceNumberInput(value);
|
|
131
|
+
if (!coerced) return typeof value === "string" ? value : "";
|
|
132
|
+
var {
|
|
133
|
+
currency,
|
|
134
|
+
symbol,
|
|
135
|
+
fractionDigits = "always",
|
|
136
|
+
locale,
|
|
137
|
+
grouping
|
|
138
|
+
} = options;
|
|
139
|
+
var hasExplicitDigits = options.precision != null || options.minimumFractionDigits != null || options.maximumFractionDigits != null;
|
|
140
|
+
var wholeValue = Number.isInteger(coerced.num);
|
|
141
|
+
var digits = hasExplicitDigits ? resolveDigits(options) : fractionDigits === "auto" && wholeValue ? {
|
|
142
|
+
minimumFractionDigits: 0,
|
|
143
|
+
maximumFractionDigits: 0
|
|
144
|
+
} : {
|
|
145
|
+
minimumFractionDigits: 2,
|
|
146
|
+
maximumFractionDigits: 2
|
|
147
|
+
};
|
|
148
|
+
var code = currency !== null && currency !== void 0 ? currency : resolveCurrencyCode(symbol);
|
|
149
|
+
var useGrouping = grouping !== null && grouping !== void 0 ? grouping : true;
|
|
150
|
+
if (code) {
|
|
151
|
+
var styled = tryFormatWith(coerced.num, {
|
|
152
|
+
...digits,
|
|
153
|
+
useGrouping,
|
|
154
|
+
style: "currency",
|
|
155
|
+
currency: code
|
|
156
|
+
}, locale);
|
|
157
|
+
if (styled != null) return styled;
|
|
158
|
+
}
|
|
159
|
+
var amount = formatWith(coerced.num, {
|
|
160
|
+
...digits,
|
|
161
|
+
useGrouping
|
|
162
|
+
}, locale);
|
|
163
|
+
var label = symbol !== null && symbol !== void 0 ? symbol : currency;
|
|
164
|
+
return label ? `${label}${amount}` : amount;
|
|
165
|
+
}
|
|
166
|
+
function formatPercent(value) {
|
|
167
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
168
|
+
var formatted = formatNumber(value, options);
|
|
169
|
+
if (formatted === "") return "";
|
|
170
|
+
var coerced = coerceNumberInput(value);
|
|
171
|
+
return coerced ? `${formatted}%` : formatted;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=numbers.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","numbers_exports","__export","currencyAffix","formatCurrency","formatNumber","formatPercent","resolveCurrencyCode","module","exports","CURRENCY_SYMBOL_TO_CODE","$","R$","symbol","test","toUpperCase","currency","locale","code","parts","Intl","NumberFormat","style","currencyDisplay","formatToParts","glyphIndex","findIndex","part","type","amountIndex","glyph","position","unused","coerceNumberInput","Number","isFinite","num","resolveDigits","options","precision","minimumFractionDigits","maximumFractionDigits","max","min","Math","tryFormatWith","format","formatWith","_tryFormatWith","String","arguments","length","_options_grouping","coerced","useGrouping","grouping","fractionDigits","hasExplicitDigits","wholeValue","isInteger"],"sources":["../../src/numbers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AAyDAC,MAAM,CAAAC,OAAA,GAAAb,YAAA,CAAAK,eAAkD;AAAA,IACtDS,uBAAG;EACHC,CAAA;EACA,QAAK;EACL,QAAK;EACL,aAAK;EACL,UAAK;EACL,UAAK;EACL,QAAI;EACNC,EAAA;AAMO;AACL,SAAKL,mBAAeA,CAAAM,MAAA;EACpB,IAAI,CAAAA,MAAA,SAAgB,KAAK;EACzB,mBAAO,CAAAC,IAAA,CAAAD,MAAwB,UAAMA,MAAA,CAAAE,WAAA;EACvC,OAAAL,uBAAA,CAAAG,MAAA;AAcO;AAIL,SAAKV,aAAUA,CAAAa,QAAO,EAAAC,MAAA;EACtB,KAAAD,QAAa;EACb,IAAIE,IAAA,GAAMX,mBAAA,CAAAS,QAAA;EACR,IAAAE,IAAI;IACF;MAA4C,IAC1CC,KAAO,OAAAC,IAAA,CAAAC,YAAA,CAAAJ,MAAA;QACPK,KAAA,YAAU;QACVN,QAAA,EAAAE,IAAA;QACDK,eAAgB,EAAC;MAClB,GAAAC,aAAM,GAAa;MACnB,IAAAC,UAAM,GAAAN,KAAc,CAAAO,SAAM,WAAWC,IAAS;QAC9C,OAAIA,IAAA,CAAAC,IAAA,KAAmB;MACrB;MAAO,IACLC,WAAO,GAAMV,KAAA,CAAAO,SAAY,WAAAC,IAAA;QAAA,OACzBA,IAAA,CAAUC,IAAA,cAAgB;MAA8C,EAC1E;MACF,IAAAH,UAAA;QACF,OAAQ;UAERK,KAAA,EAAAX,KAAA,CAAAM,UAAA,EAAAzB,KAAA;UACF+B,QAAA,EAAAF,WAAA,WAAAJ,UAAA,GAAAI,WAAA;QACA,CAAO;MACT;IAMA,SAASG,MAAA,GACP;EACA;EACA,OAAM;IACNF,KAAO,EAAAd,QAAO;IAChBe,QAAA;EAEA;AAGE;AACA,SAAIE,iBAAmBA,CAAAjC,KAAA;EACrB,IAAAA,KAAO,IAAE,QAAAA,KAAA,SAAuB,WAAW;EAC7C,WAAAA,KAAA,sBAAAkC,MAAA,CAAAC,QAAA,CAAAnC,KAAA;IACAoC,GAAA,EAAMpC;EACN,QAAM;EACN,IAAAoC,GAAO,GAAEF,MAAA,CAAAlC,KAAA;EACX,OAAAkC,MAAA,CAAAC,QAAA,CAAAC,GAAA;IAEAA;EAKE,IAAI;AACF;AAAwD,SAC1DC,aAAQA,CAAAC,OAAA;EACN;IAAAC,SAAO;IAAAC,qBAAA;IAAAC;EAAA,IAAAH,OAAA;EACT,IAAAC,SAAA;IACF;MAEAC,qBAAiC,EAAAD,SAAmC;MAClEE,qBAAqB,EAAKF;IAC5B;EAOO;EACL,IAAAG,GAAM,GAAAD,qBAAU,KAAkB,IAAK,IAAAA,qBAAA,cAAAA,qBAAA;EACvC,IAAIE,GAAC,GAAAH,qBAAuB,SAAU,IAAAA,qBAAmB,cAAAA,qBAAA;EACzD,OAAO;IACLA,qBAAQ,EAAAG,GAAA;IACRF,qBAAmB,EAAAG,IAAO,CAAAF,GAAG,CAAAC,GAAA,EAAAD,GAAA;EAAsC;AAC3D;AAEZ,SAAAG,cAAAT,GAAA,EAAAE,OAAA,EAAArB,MAAA;EAOO;IACL,OAAM,IAAAG,IAAU,CAAAC,YAAA,CAAAJ,MAAkB,EAAKqB,OAAA,EAAAQ,MAAA,CAAAV,GAAA;EACvC,SAAKJ,MAAS;IACd,OAAQ;EACR;AAIA;AACA,SAAMe,UAASA,CAAAX,GAAA,EAAAE,OAAA,EAAArB,MACX;EAIJ,IAAA+B,cAAa;EACb,OAAM,CAAAA,cAAc,GAAAH,aAAY,CAAAT,GAAA,EAAAE,OAAA,EAAArB,MAAA,eAAA+B,cAAA,cAAAA,cAAA,GAAAC,MAAA,CAAAb,GAAA;AAChC;AAIE,SAAA/B,YAAeA,CAAAL,KAAA;EAAA,IACbsC,OAAA,GAAQY,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,IACRE,iBAAa;EAA+C,IAC5DC,OAAA,GAAApB,iBAAA,CAAAjC,KAAA;EAAA,IACF,CAAAqD,OAAA,gBAAArD,KAAA,gBAAAA,KAAA;EACA,OAAI+C,UAAU,CAAAM,OAAM,CAAAjB,GAAO;IAC7B,GAAAC,aAAA,CAAAC,OAAA;IACAgB,WAAM,EAAS,CAAAF,iBAAW,GAAQd,OAAO,CAAGiB,QAAQ,cAAYH,iBAAS,cAAAA,iBAAA;EACzE,GAAAd,OAAM,CAAArB,MAAQ;AACd;AACF,SAAAb,eAAAJ,KAAA;EAMO,IAAAsC,OAAS,GAAAY,SAAc,CAAAC,MAAoB,QAAgCD,SAAY,iBAAAA,SAAA;EAC5F,IAAAG,OAAM,GAAApB,iBAAyB,CAAAjC,KAAA,CAAO;EACtC,IAAI,CAAAqD,OAAA,SAAkB,OAAArD,KAAO,gBAAAA,KAAA;EAC7B;IAAMgB,QAAA;IAAUH,MAAA;IAAA2C,cAAkB,GAAK;IAAAvC,MAAA;IAAAsC;EAAA,IAAAjB,OAAA;EACvC,IAAAmB,iBAAoB,GAAAnB,OAAS,CAAAC,SAAM,YAAAD,OAAA,CAAAE,qBAAA,YAAAF,OAAA,CAAAG,qBAAA;EACrC,IAAAiB,UAAA,GAAAxB,MAAA,CAAAyB,SAAA,CAAAN,OAAA,CAAAjB,GAAA","ignoreList":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
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 FontKnobStyles_exports = {};
|
|
24
|
+
__export(FontKnobStyles_exports, {
|
|
25
|
+
FontKnobStyles: () => FontKnobStyles,
|
|
26
|
+
buildFontKnobCss: () => buildFontKnobCss,
|
|
27
|
+
fontCategoryMetrics: () => import_fontCategoryMetrics.fontCategoryMetrics,
|
|
28
|
+
getConfiguredFontFamily: () => getConfiguredFontFamily,
|
|
29
|
+
getConfiguredFontTables: () => getConfiguredFontTables,
|
|
30
|
+
resolveFontTokenFamily: () => resolveFontTokenFamily
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(FontKnobStyles_exports);
|
|
33
|
+
var import_web = require("@tamagui/web");
|
|
34
|
+
var import_react = require("react");
|
|
35
|
+
var import_fontCategoryMetrics = require("./fontCategoryMetrics.cjs");
|
|
36
|
+
var import_fontCategoryStacks = require("./fontCategoryStacks.cjs");
|
|
37
|
+
var import_knobs = require("./knobs.cjs");
|
|
38
|
+
var import_PresetContext = require("./PresetContext.cjs");
|
|
39
|
+
const STYLE_TAG_ID = "mp-font-knob-styles";
|
|
40
|
+
const DEFAULT_HEADING_LEADING_MIN = 1.25;
|
|
41
|
+
const DEFAULT_BODY_LEADING_MIN = 1.5;
|
|
42
|
+
function defaultLeadingRule(scope, category) {
|
|
43
|
+
const metrics = import_fontCategoryMetrics.fontCategoryMetrics[category] ?? import_fontCategoryMetrics.fontCategoryMetrics["sans-serif"];
|
|
44
|
+
const ratio = Math.max(metrics[scope], scope === "heading" ? DEFAULT_HEADING_LEADING_MIN : DEFAULT_BODY_LEADING_MIN);
|
|
45
|
+
return `:where(:root .font_${scope}) { line-height: ${ratio}; }`;
|
|
46
|
+
}
|
|
47
|
+
function getConfiguredFontFamily(category) {
|
|
48
|
+
return resolveFontTokenFamily(`$${category}`);
|
|
49
|
+
}
|
|
50
|
+
function resolveFontTokenFamily(token) {
|
|
51
|
+
if (typeof token !== "string" || !token) return void 0;
|
|
52
|
+
let config;
|
|
53
|
+
try {
|
|
54
|
+
config = (0, import_web.getConfig)();
|
|
55
|
+
} catch {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
const key = token.startsWith("$") ? token.slice(1) : token;
|
|
59
|
+
const fontsParsed = config.fontsParsed;
|
|
60
|
+
const font = fontsParsed?.[`$${key}`] ?? config.fonts?.[key];
|
|
61
|
+
const family = font?.family;
|
|
62
|
+
if (typeof family === "string") return family;
|
|
63
|
+
if (family && typeof family.val === "string") return family.val;
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
function getConfiguredFontTables(scope) {
|
|
67
|
+
let config;
|
|
68
|
+
try {
|
|
69
|
+
config = (0, import_web.getConfig)();
|
|
70
|
+
} catch {
|
|
71
|
+
return void 0;
|
|
72
|
+
}
|
|
73
|
+
const fontsParsed = config.fontsParsed;
|
|
74
|
+
const font = fontsParsed?.[`$${scope}`] ?? config.fonts?.[scope];
|
|
75
|
+
if (!font) return void 0;
|
|
76
|
+
const unwrap = table => {
|
|
77
|
+
if (!table) return void 0;
|
|
78
|
+
const out = {};
|
|
79
|
+
for (const [key, value] of Object.entries(table)) {
|
|
80
|
+
const num = typeof value === "number" ? value : value && typeof value.val === "number" ? value.val : void 0;
|
|
81
|
+
if (num !== void 0) out[key.replace(/^\$/, "")] = num;
|
|
82
|
+
}
|
|
83
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
84
|
+
};
|
|
85
|
+
const size = unwrap(font.size);
|
|
86
|
+
const lineHeight = unwrap(font.lineHeight);
|
|
87
|
+
if (!size || !lineHeight) return void 0;
|
|
88
|
+
return {
|
|
89
|
+
size,
|
|
90
|
+
lineHeight,
|
|
91
|
+
letterSpacing: unwrap(font.letterSpacing)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function buildScopeRule(scope, category, family, tables) {
|
|
95
|
+
const metrics = import_fontCategoryMetrics.fontCategoryMetrics[category];
|
|
96
|
+
const decls = [`--f-family: ${family} !important`];
|
|
97
|
+
if (tables && metrics) {
|
|
98
|
+
const minRatio = metrics[scope];
|
|
99
|
+
for (const [key, size] of Object.entries(tables.size)) {
|
|
100
|
+
const baseLineHeight = tables.lineHeight[key];
|
|
101
|
+
if (typeof baseLineHeight !== "number") continue;
|
|
102
|
+
const floored = (0, import_fontCategoryMetrics.flooredLineHeight)(size, baseLineHeight, minRatio);
|
|
103
|
+
if (floored > baseLineHeight) {
|
|
104
|
+
decls.push(`--f-lineHeight-${key}: ${floored}px !important`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (metrics.letterSpacing === "neutral" && tables.letterSpacing) {
|
|
108
|
+
for (const [key, tracking] of Object.entries(tables.letterSpacing)) {
|
|
109
|
+
if (tracking !== 0) decls.push(`--f-letterSpacing-${key}: 0px !important`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return `:root .font_${scope} { ${decls.join("; ")}; }`;
|
|
114
|
+
}
|
|
115
|
+
function buildFontKnobCss(headingFont, bodyFont, resolveFamily = getConfiguredFontFamily, resolveTables = getConfiguredFontTables) {
|
|
116
|
+
const rules = [defaultLeadingRule("heading", headingFont), defaultLeadingRule("body", bodyFont)];
|
|
117
|
+
if (headingFont !== "sans-serif") {
|
|
118
|
+
const family = resolveFamily(headingFont) ?? import_fontCategoryStacks.fontCategoryStacks[headingFont];
|
|
119
|
+
if (family) {
|
|
120
|
+
rules.push(buildScopeRule("heading", headingFont, family, resolveTables("heading")));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (bodyFont !== "sans-serif") {
|
|
124
|
+
const family = resolveFamily(bodyFont) ?? import_fontCategoryStacks.fontCategoryStacks[bodyFont];
|
|
125
|
+
if (family) {
|
|
126
|
+
rules.push(buildScopeRule("body", bodyFont, family, resolveTables("body")));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return rules.join("\n");
|
|
130
|
+
}
|
|
131
|
+
function FontKnobStyles() {
|
|
132
|
+
const presetCtx = (0, import_PresetContext.usePresetContext)();
|
|
133
|
+
const knobs = presetCtx ? {
|
|
134
|
+
...presetCtx.preset.knobs,
|
|
135
|
+
...presetCtx.overrides
|
|
136
|
+
} : import_knobs.defaultKnobs;
|
|
137
|
+
const headingFont = knobs.headingFont ?? import_knobs.defaultKnobs.headingFont;
|
|
138
|
+
const bodyFont = knobs.bodyFont ?? import_knobs.defaultKnobs.bodyFont;
|
|
139
|
+
const scaleId = presetCtx?.scaleId;
|
|
140
|
+
(0, import_react.useEffect)(() => {
|
|
141
|
+
if (typeof document === "undefined") return;
|
|
142
|
+
const css = buildFontKnobCss(headingFont, bodyFont);
|
|
143
|
+
let tag = document.getElementById(STYLE_TAG_ID);
|
|
144
|
+
if (!css) {
|
|
145
|
+
tag?.remove();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (!tag) {
|
|
149
|
+
tag = document.createElement("style");
|
|
150
|
+
tag.id = STYLE_TAG_ID;
|
|
151
|
+
document.head.appendChild(tag);
|
|
152
|
+
}
|
|
153
|
+
if (tag.textContent !== css) tag.textContent = css;
|
|
154
|
+
}, [headingFont, bodyFont, scaleId]);
|
|
155
|
+
(0, import_react.useEffect)(() => () => {
|
|
156
|
+
if (typeof document !== "undefined") {
|
|
157
|
+
document.getElementById(STYLE_TAG_ID)?.remove();
|
|
158
|
+
}
|
|
159
|
+
}, []);
|
|
160
|
+
return null;
|
|
161
|
+
}
|