{"version":3,"file":"v6-base.js","names":["systemFonts","baseSettings"],"sources":["esm/v6-base.js"],"sourcesContent":["import { shorthands } from \"@tamagui/shorthands/v6\";\nimport { defaultSizing } from \"@tamagui/web\";\nimport { copyAuthoredThemeScheme } from \"@tamagui/web/internal-runtime\";\nimport { fonts as systemFonts } from \"./fonts\";\nimport { media } from \"./media\";\nimport { settings as baseSettings } from \"./settings\";\nimport {\n  tailwindFontSize,\n  tailwindLineHeight,\n  tailwindRadius,\n  tailwindSize,\n  tailwindSpace\n} from \"./v6-tailwind-scales.generated\";\nimport {\n  v6RemovedThemeNames,\n  v6ThemeNameReplacements\n} from \"@tamagui/style-grammar/v6-themes\";\nimport { createSystemFont } from \"./fonts\";\nimport { breakpoints, media as media2, mediaQueryDefaultActive } from \"./media\";\nimport { tailwindSource } from \"./v6-tailwind-scales.generated\";\nimport { toV6Themes } from \"./v6-themes\";\nconst tailwindContainerSize = {\n  \"3xs\": 256,\n  \"2xs\": 288,\n  xs: 320,\n  sm: 384,\n  md: 448,\n  lg: 512,\n  xl: 576,\n  \"2xl\": 672,\n  \"3xl\": 768,\n  \"4xl\": 896,\n  \"5xl\": 1024,\n  \"6xl\": 1152,\n  \"7xl\": 1280\n};\nconst tokens = {\n  space: tailwindSpace,\n  size: tailwindSize,\n  width: {\n    ...tailwindSize,\n    ...tailwindContainerSize\n  },\n  minWidth: { ...tailwindSize, ...tailwindContainerSize },\n  maxWidth: { ...tailwindSize, ...tailwindContainerSize },\n  inlineSize: { ...tailwindSize, ...tailwindContainerSize },\n  minInlineSize: { ...tailwindSize, ...tailwindContainerSize },\n  maxInlineSize: { ...tailwindSize, ...tailwindContainerSize },\n  flexBasis: { ...tailwindSize, ...tailwindContainerSize },\n  borderWidth: {\n    0: 0,\n    1: 1,\n    2: 2,\n    4: 4,\n    8: 8\n  },\n  outlineWidth: {\n    0: 0,\n    1: 1,\n    2: 2,\n    4: 4,\n    8: 8\n  },\n  outlineOffset: {\n    0: 0,\n    1: 1,\n    2: 2,\n    4: 4,\n    8: 8,\n    \"-1\": -1,\n    \"-2\": -2,\n    \"-4\": -4,\n    \"-8\": -8\n  },\n  boxShadow: {\n    \"2xs\": \"0 1px rgb(0 0 0 / 0.05)\",\n    xs: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n    sm: \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n    md: \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n    lg: \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n    xl: \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n    \"2xl\": \"0 25px 50px -12px rgb(0 0 0 / 0.25)\",\n    inner: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)\"\n  },\n  perspective: {\n    dramatic: 100,\n    near: 300,\n    normal: 500,\n    midrange: 800,\n    distant: 1200\n  },\n  radius: {\n    0: 0,\n    1: 3,\n    2: 5,\n    3: 7,\n    4: 9,\n    5: 10,\n    6: 16,\n    7: 19,\n    8: 22,\n    9: 26,\n    10: 34,\n    11: 42,\n    12: 50,\n    ...tailwindRadius\n  }\n};\nfunction withTailwindTypeScale(font) {\n  return {\n    ...font,\n    size: { ...font.size, ...tailwindFontSize },\n    lineHeight: { ...font.lineHeight, ...tailwindLineHeight }\n  };\n}\nconst fonts = {\n  body: withTailwindTypeScale(systemFonts.body),\n  heading: withTailwindTypeScale(systemFonts.heading)\n};\nconst selectionStyles = (theme) => theme[\"color-5\"] ? {\n  backgroundColor: theme[\"color-5\"],\n  color: theme[\"color-11\"]\n} : null;\nconst settings = {\n  ...baseSettings,\n  selectionStyles\n};\nfunction themesWithColorScales(themes, scales) {\n  const light = {};\n  const dark = {};\n  for (const name in scales) {\n    const scale = scales[name];\n    if (scale.light.length !== 12 || scale.dark.length !== 12) {\n      throw new Error(\n        `color scale \"${name}\" needs exactly 12 light and 12 dark values, got ${scale.light.length}/${scale.dark.length}`\n      );\n    }\n    scale.light.forEach((value, index) => {\n      light[`${name}-${index + 1}`] = value;\n    });\n    scale.dark.forEach((value, index) => {\n      dark[`${name}-${index + 1}`] = value;\n    });\n  }\n  return {\n    ...themes,\n    light: copyAuthoredThemeScheme({ ...themes.light, ...light }, themes.light),\n    dark: copyAuthoredThemeScheme({ ...themes.dark, ...dark }, themes.dark)\n  };\n}\nconst alignedConfig = {\n  media,\n  shorthands,\n  fonts,\n  settings,\n  sizing: defaultSizing\n};\nfunction createV6Config(colors) {\n  return {\n    ...alignedConfig,\n    themes: colors.scales ? themesWithColorScales(colors.themes, colors.scales) : colors.themes,\n    tokens: colors.colorTokens ? { ...tokens, color: colors.colorTokens } : tokens\n  };\n}\nexport {\n  breakpoints,\n  createSystemFont,\n  createV6Config,\n  defaultSizing,\n  fonts,\n  media2 as media,\n  mediaQueryDefaultActive,\n  selectionStyles,\n  settings,\n  shorthands,\n  tailwindSource,\n  toV6Themes,\n  tokens,\n  v6RemovedThemeNames,\n  v6ThemeNameReplacements,\n  withTailwindTypeScale\n};\n//# sourceMappingURL=v6-base.js.map\n"],"mappings":";;;;;;;;;;;AAqBA,MAAM,wBAAwB;CAC5B,OAAO;CACP,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;AACT;AACA,MAAM,SAAS;CACb,OAAO;CACP,MAAM;CACN,OAAO;EACL,GAAG;EACH,GAAG;CACL;CACA,UAAU;EAAE,GAAG;EAAc,GAAG;CAAsB;CACtD,UAAU;EAAE,GAAG;EAAc,GAAG;CAAsB;CACtD,YAAY;EAAE,GAAG;EAAc,GAAG;CAAsB;CACxD,eAAe;EAAE,GAAG;EAAc,GAAG;CAAsB;CAC3D,eAAe;EAAE,GAAG;EAAc,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