@tamagui/get-font-sized 3.0.0-beta.1093.1 → 3.0.0-beta.1097.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/get-font-sized",
3
- "version": "3.0.0-beta.1093.1",
3
+ "version": "3.0.0-beta.1097.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "src",
@@ -34,11 +34,11 @@
34
34
  "clean:build": "tamagui-build clean:build"
35
35
  },
36
36
  "dependencies": {
37
- "@tamagui/size": "3.0.0-beta.1093.1",
38
- "@tamagui/web": "3.0.0-beta.1093.1"
37
+ "@tamagui/size": "3.0.0-beta.1097.1",
38
+ "@tamagui/web": "3.0.0-beta.1097.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@tamagui/build": "3.0.0-beta.1093.1",
41
+ "@tamagui/build": "3.0.0-beta.1097.1",
42
42
  "react": "19.2.3"
43
43
  },
44
44
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -1,8 +1,17 @@
1
- import type { FontSizeTokens } from '@tamagui/web'
1
+ import type { FontSizeTokens, SizeTokens } from '@tamagui/web'
2
2
  import { resolveSize } from '@tamagui/size'
3
3
  import { styled, Text } from '@tamagui/web'
4
4
 
5
- export const getFontSized = styled.dynamic<FontSizeTokens | number | true>(
5
+ /**
6
+ * A control's size token is accepted too, so a Label sized like the control
7
+ * next to it shares the same value: `true` and a named size read the size
8
+ * recipe's font key, anything else is a font.size key already. Exported by
9
+ * name so the built types keep the alias and resolve it against the user's
10
+ * config, instead of baking the config-less `string` into the .d.ts.
11
+ */
12
+ export type GetFontSizedInput = FontSizeTokens | SizeTokens | number | true
13
+
14
+ export const getFontSized = styled.dynamic<GetFontSizedInput>(
6
15
  (sizeTokenIn = true, env) => {
7
16
  const { font, fontFamily } = env
8
17
  if (!font) {
package/types/index.d.ts CHANGED
@@ -1,13 +1,22 @@
1
- export declare const getFontSized: import("@tamagui/web/types/types").StyledDynamicFn<import("@tamagui/web").FontSize, Record<string, any>>;
1
+ import type { FontSizeTokens, SizeTokens } from '@tamagui/web';
2
+ /**
3
+ * A control's size token is accepted too, so a Label sized like the control
4
+ * next to it shares the same value: `true` and a named size read the size
5
+ * recipe's font key, anything else is a font.size key already. Exported by
6
+ * name so the built types keep the alias and resolve it against the user's
7
+ * config, instead of baking the config-less `string` into the .d.ts.
8
+ */
9
+ export type GetFontSizedInput = FontSizeTokens | SizeTokens | number | true;
10
+ export declare const getFontSized: import("@tamagui/web/types/types").StyledDynamicFn<GetFontSizedInput, Record<string, any>>;
2
11
  export declare const SizableText: import("react").FunctionComponent<Omit<import("@tamagui/web").TextNonStyleProps, "size" | keyof import("@tamagui/web").TextStylePropsBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").TextStylePropsBase> & import("@tamagui/web").WithFlatVariantValues<{
3
- size?: import("@tamagui/web").FontSize | undefined;
12
+ size?: GetFontSizedInput | undefined;
4
13
  }> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").TextStylePropsBase>> & {
5
14
  ref?: import("react").Ref<import("@tamagui/web").TamaguiTextElement> | undefined;
6
15
  }> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
7
- size?: import("@tamagui/web").FontSize | undefined;
16
+ size?: GetFontSizedInput | undefined;
8
17
  }, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig"> & {
9
18
  __tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
10
- size?: import("@tamagui/web").FontSize | undefined;
19
+ size?: GetFontSizedInput | undefined;
11
20
  }, import("@tamagui/web").StaticConfigPublic];
12
21
  };
13
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,0GAoDxB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAWtB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAI9D;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,CAAA;AAE3E,eAAO,MAAM,YAAY,4FAoDxB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAWtB,CAAA"}