@tamagui/shorthands 2.7.7 → 3.0.0-beta.643.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.
Files changed (44) hide show
  1. package/dist/cjs/index.cjs +89 -96
  2. package/dist/cjs/index.native.cjs +111 -0
  3. package/dist/cjs/index.native.js +89 -95
  4. package/dist/cjs/index.native.js.map +1 -1
  5. package/dist/cjs/v4.cjs +49 -54
  6. package/dist/cjs/v4.native.cjs +64 -0
  7. package/dist/cjs/v4.native.js +49 -53
  8. package/dist/cjs/v4.native.js.map +1 -1
  9. package/dist/cjs/v5.cjs +49 -54
  10. package/dist/cjs/v5.native.cjs +64 -0
  11. package/dist/cjs/v5.native.js +49 -53
  12. package/dist/cjs/v5.native.js.map +1 -1
  13. package/dist/cjs/v6.cjs +64 -0
  14. package/dist/cjs/v6.native.cjs +66 -0
  15. package/dist/cjs/v6.native.js +68 -0
  16. package/dist/cjs/v6.native.js.map +1 -0
  17. package/dist/esm/index.js +75 -78
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/esm/index.mjs +75 -78
  20. package/dist/esm/index.mjs.map +1 -1
  21. package/dist/esm/index.native.js +75 -78
  22. package/dist/esm/index.native.js.map +1 -1
  23. package/dist/esm/v4.mjs +35 -36
  24. package/dist/esm/v4.mjs.map +1 -1
  25. package/dist/esm/v4.native.js +35 -36
  26. package/dist/esm/v4.native.js.map +1 -1
  27. package/dist/esm/v5.mjs +35 -36
  28. package/dist/esm/v5.mjs.map +1 -1
  29. package/dist/esm/v5.native.js +35 -36
  30. package/dist/esm/v5.native.js.map +1 -1
  31. package/dist/esm/v6.mjs +43 -0
  32. package/dist/esm/v6.mjs.map +1 -0
  33. package/dist/esm/v6.native.js +43 -0
  34. package/dist/esm/v6.native.js.map +1 -0
  35. package/package.json +25 -3
  36. package/src/v6.ts +51 -0
  37. package/types/index.d.ts +74 -74
  38. package/types/index.d.ts.map +1 -1
  39. package/types/v6.d.ts +40 -0
  40. package/types/v6.d.ts.map +1 -0
  41. package/v6.cjs +1 -0
  42. package/v6.d.ts +1 -0
  43. package/.turbo/turbo-build.log +0 -2
  44. package/tsconfig.json +0 -18
@@ -0,0 +1,43 @@
1
+ var shorthands = createShorthands({
2
+ text: "textAlign",
3
+ b: "bottom",
4
+ bg: "background",
5
+ content: "alignContent",
6
+ grow: "flexGrow",
7
+ h: "height",
8
+ items: "alignItems",
9
+ justify: "justifyContent",
10
+ l: "left",
11
+ m: "margin",
12
+ maxH: "maxHeight",
13
+ maxW: "maxWidth",
14
+ mb: "marginBottom",
15
+ minH: "minHeight",
16
+ minW: "minWidth",
17
+ ml: "marginLeft",
18
+ mr: "marginRight",
19
+ mt: "marginTop",
20
+ mx: "marginHorizontal",
21
+ my: "marginVertical",
22
+ p: "padding",
23
+ pb: "paddingBottom",
24
+ pl: "paddingLeft",
25
+ pr: "paddingRight",
26
+ pt: "paddingTop",
27
+ px: "paddingHorizontal",
28
+ py: "paddingVertical",
29
+ r: "right",
30
+ rounded: "borderRadius",
31
+ select: "userSelect",
32
+ self: "alignSelf",
33
+ shrink: "flexShrink",
34
+ t: "top",
35
+ w: "width",
36
+ z: "zIndex"
37
+ });
38
+ function createShorthands(a) {
39
+ return a;
40
+ }
41
+
42
+ export { shorthands };
43
+ //# sourceMappingURL=v6.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v6.native.js","names":[],"sources":["esm/v6.native.js"],"sourcesContent":["var shorthands = createShorthands({\n // text\n text: \"textAlign\",\n // view\n b: \"bottom\",\n bg: \"background\",\n content: \"alignContent\",\n grow: \"flexGrow\",\n h: \"height\",\n items: \"alignItems\",\n justify: \"justifyContent\",\n l: \"left\",\n m: \"margin\",\n maxH: \"maxHeight\",\n maxW: \"maxWidth\",\n mb: \"marginBottom\",\n minH: \"minHeight\",\n minW: \"minWidth\",\n ml: \"marginLeft\",\n mr: \"marginRight\",\n mt: \"marginTop\",\n mx: \"marginHorizontal\",\n my: \"marginVertical\",\n p: \"padding\",\n pb: \"paddingBottom\",\n pl: \"paddingLeft\",\n pr: \"paddingRight\",\n pt: \"paddingTop\",\n px: \"paddingHorizontal\",\n py: \"paddingVertical\",\n r: \"right\",\n rounded: \"borderRadius\",\n select: \"userSelect\",\n self: \"alignSelf\",\n shrink: \"flexShrink\",\n t: \"top\",\n w: \"width\",\n z: \"zIndex\"\n});\nfunction createShorthands(a) {\n return a;\n}\nexport {\n shorthands\n};\n//# sourceMappingURL=v6.js.map\n"],"mappings":";AAAA,IAAI,aAAa,iBAAiB;CAEhC,MAAM;CAEN,GAAG;CACH,IAAI;CACJ,SAAS;CACT,MAAM;CACN,GAAG;CACH,OAAO;CACP,SAAS;CACT,GAAG;CACH,GAAG;CACH,MAAM;CACN,MAAM;CACN,IAAI;CACJ,MAAM;CACN,MAAM;CACN,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,SAAS;CACT,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AACD,SAAS,iBAAiB,GAAG;CAC3B,OAAO;AACT"}
package/package.json CHANGED
@@ -1,10 +1,23 @@
1
1
  {
2
2
  "name": "@tamagui/shorthands",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "type": "module",
7
7
  "sideEffects": false,
8
+ "files": [
9
+ "src",
10
+ "types",
11
+ "dist",
12
+ "v4",
13
+ "v4.cjs",
14
+ "v4.d.ts",
15
+ "v5",
16
+ "v5.cjs",
17
+ "v5.d.ts",
18
+ "v6.cjs",
19
+ "v6.d.ts"
20
+ ],
8
21
  "main": "dist/cjs",
9
22
  "module": "dist/esm",
10
23
  "types": "./types/index.d.ts",
@@ -36,6 +49,15 @@
36
49
  "import": "./dist/esm/v5.mjs",
37
50
  "require": "./dist/cjs/v5.cjs",
38
51
  "default": "./dist/esm/v5.mjs"
52
+ },
53
+ "./v6": {
54
+ "types": "./types/v6.d.ts",
55
+ "react-native": "./dist/esm/v6.native.js",
56
+ "browser": "./dist/esm/v6.mjs",
57
+ "module": "./dist/esm/v6.mjs",
58
+ "import": "./dist/esm/v6.mjs",
59
+ "require": "./dist/cjs/v6.cjs",
60
+ "default": "./dist/esm/v6.mjs"
39
61
  }
40
62
  },
41
63
  "publishConfig": {
@@ -48,10 +70,10 @@
48
70
  "clean:build": "tamagui-build clean:build"
49
71
  },
50
72
  "dependencies": {
51
- "@tamagui/web": "2.7.7"
73
+ "@tamagui/web": "3.0.0-beta.643.1"
52
74
  },
53
75
  "devDependencies": {
54
- "@tamagui/build": "2.7.7"
76
+ "@tamagui/build": "3.0.0-beta.643.1"
55
77
  },
56
78
  "repository": {
57
79
  "type": "git",
package/src/v6.ts ADDED
@@ -0,0 +1,51 @@
1
+ import type { TextStyle } from '@tamagui/web'
2
+
3
+ // v6 = v4/v5 shorthands with the flat-value family and Tailwind-aligned names.
4
+ export const shorthands = createShorthands({
5
+ // text
6
+ text: 'textAlign',
7
+
8
+ // view
9
+ b: 'bottom',
10
+ bg: 'background',
11
+ content: 'alignContent',
12
+ grow: 'flexGrow',
13
+ h: 'height',
14
+ items: 'alignItems',
15
+ justify: 'justifyContent',
16
+ l: 'left',
17
+ m: 'margin',
18
+ maxH: 'maxHeight',
19
+ maxW: 'maxWidth',
20
+ mb: 'marginBottom',
21
+ minH: 'minHeight',
22
+ minW: 'minWidth',
23
+ ml: 'marginLeft',
24
+ mr: 'marginRight',
25
+ mt: 'marginTop',
26
+ mx: 'marginHorizontal',
27
+ my: 'marginVertical',
28
+ p: 'padding',
29
+ pb: 'paddingBottom',
30
+ pl: 'paddingLeft',
31
+ pr: 'paddingRight',
32
+ pt: 'paddingTop',
33
+ px: 'paddingHorizontal',
34
+ py: 'paddingVertical',
35
+ r: 'right',
36
+ rounded: 'borderRadius',
37
+ select: 'userSelect',
38
+ self: 'alignSelf',
39
+ shrink: 'flexShrink',
40
+ t: 'top',
41
+ w: 'width',
42
+ z: 'zIndex',
43
+ })
44
+
45
+ // type helper
46
+ function createShorthands<A extends Record<string, keyof TextStyle>>(a: A) {
47
+ return a
48
+ }
49
+
50
+ export type Shorthands = typeof shorthands
51
+ export type ShorthandKeys = keyof Shorthands
package/types/index.d.ts CHANGED
@@ -1,77 +1,77 @@
1
1
  export declare const shorthands: {
2
- readonly ussel: "userSelect";
3
- readonly cur: "cursor";
4
- readonly pe: "pointerEvents";
5
- readonly col: "color";
6
- readonly ff: "fontFamily";
7
- readonly fos: "fontSize";
8
- readonly fost: "fontStyle";
9
- readonly fow: "fontWeight";
10
- readonly ls: "letterSpacing";
11
- readonly lh: "lineHeight";
12
- readonly ta: "textAlign";
13
- readonly tt: "textTransform";
14
- readonly ww: "wordWrap";
15
- readonly ac: "alignContent";
16
- readonly ai: "alignItems";
17
- readonly als: "alignSelf";
18
- readonly b: "bottom";
19
- readonly bc: "backgroundColor";
20
- readonly bg: "backgroundColor";
21
- readonly bbc: "borderBottomColor";
22
- readonly bblr: "borderBottomLeftRadius";
23
- readonly bbrr: "borderBottomRightRadius";
24
- readonly bbw: "borderBottomWidth";
25
- readonly blc: "borderLeftColor";
26
- readonly blw: "borderLeftWidth";
27
- readonly boc: "borderColor";
28
- readonly br: "borderRadius";
29
- readonly bs: "borderStyle";
30
- readonly brw: "borderRightWidth";
31
- readonly brc: "borderRightColor";
32
- readonly btc: "borderTopColor";
33
- readonly btlr: "borderTopLeftRadius";
34
- readonly btrr: "borderTopRightRadius";
35
- readonly btw: "borderTopWidth";
36
- readonly bw: "borderWidth";
37
- readonly dsp: "display";
38
- readonly f: "flex";
39
- readonly fb: "flexBasis";
40
- readonly fd: "flexDirection";
41
- readonly fg: "flexGrow";
42
- readonly fs: "flexShrink";
43
- readonly fw: "flexWrap";
44
- readonly h: "height";
45
- readonly jc: "justifyContent";
46
- readonly l: "left";
47
- readonly m: "margin";
48
- readonly mah: "maxHeight";
49
- readonly maw: "maxWidth";
50
- readonly mb: "marginBottom";
51
- readonly mih: "minHeight";
52
- readonly miw: "minWidth";
53
- readonly ml: "marginLeft";
54
- readonly mr: "marginRight";
55
- readonly mt: "marginTop";
56
- readonly mx: "marginHorizontal";
57
- readonly my: "marginVertical";
58
- readonly o: "opacity";
59
- readonly ov: "overflow";
60
- readonly p: "padding";
61
- readonly pb: "paddingBottom";
62
- readonly pl: "paddingLeft";
63
- readonly pos: "position";
64
- readonly pr: "paddingRight";
65
- readonly pt: "paddingTop";
66
- readonly px: "paddingHorizontal";
67
- readonly py: "paddingVertical";
68
- readonly r: "right";
69
- readonly shac: "shadowColor";
70
- readonly shar: "shadowRadius";
71
- readonly shof: "shadowOffset";
72
- readonly shop: "shadowOpacity";
73
- readonly t: "top";
74
- readonly w: "width";
75
- readonly zi: "zIndex";
2
+ readonly ussel: 'userSelect';
3
+ readonly cur: 'cursor';
4
+ readonly pe: 'pointerEvents';
5
+ readonly col: 'color';
6
+ readonly ff: 'fontFamily';
7
+ readonly fos: 'fontSize';
8
+ readonly fost: 'fontStyle';
9
+ readonly fow: 'fontWeight';
10
+ readonly ls: 'letterSpacing';
11
+ readonly lh: 'lineHeight';
12
+ readonly ta: 'textAlign';
13
+ readonly tt: 'textTransform';
14
+ readonly ww: 'wordWrap';
15
+ readonly ac: 'alignContent';
16
+ readonly ai: 'alignItems';
17
+ readonly als: 'alignSelf';
18
+ readonly b: 'bottom';
19
+ readonly bc: 'backgroundColor';
20
+ readonly bg: 'backgroundColor';
21
+ readonly bbc: 'borderBottomColor';
22
+ readonly bblr: 'borderBottomLeftRadius';
23
+ readonly bbrr: 'borderBottomRightRadius';
24
+ readonly bbw: 'borderBottomWidth';
25
+ readonly blc: 'borderLeftColor';
26
+ readonly blw: 'borderLeftWidth';
27
+ readonly boc: 'borderColor';
28
+ readonly br: 'borderRadius';
29
+ readonly bs: 'borderStyle';
30
+ readonly brw: 'borderRightWidth';
31
+ readonly brc: 'borderRightColor';
32
+ readonly btc: 'borderTopColor';
33
+ readonly btlr: 'borderTopLeftRadius';
34
+ readonly btrr: 'borderTopRightRadius';
35
+ readonly btw: 'borderTopWidth';
36
+ readonly bw: 'borderWidth';
37
+ readonly dsp: 'display';
38
+ readonly f: 'flex';
39
+ readonly fb: 'flexBasis';
40
+ readonly fd: 'flexDirection';
41
+ readonly fg: 'flexGrow';
42
+ readonly fs: 'flexShrink';
43
+ readonly fw: 'flexWrap';
44
+ readonly h: 'height';
45
+ readonly jc: 'justifyContent';
46
+ readonly l: 'left';
47
+ readonly m: 'margin';
48
+ readonly mah: 'maxHeight';
49
+ readonly maw: 'maxWidth';
50
+ readonly mb: 'marginBottom';
51
+ readonly mih: 'minHeight';
52
+ readonly miw: 'minWidth';
53
+ readonly ml: 'marginLeft';
54
+ readonly mr: 'marginRight';
55
+ readonly mt: 'marginTop';
56
+ readonly mx: 'marginHorizontal';
57
+ readonly my: 'marginVertical';
58
+ readonly o: 'opacity';
59
+ readonly ov: 'overflow';
60
+ readonly p: 'padding';
61
+ readonly pb: 'paddingBottom';
62
+ readonly pl: 'paddingLeft';
63
+ readonly pos: 'position';
64
+ readonly pr: 'paddingRight';
65
+ readonly pt: 'paddingTop';
66
+ readonly px: 'paddingHorizontal';
67
+ readonly py: 'paddingVertical';
68
+ readonly r: 'right';
69
+ readonly shac: 'shadowColor';
70
+ readonly shar: 'shadowRadius';
71
+ readonly shof: 'shadowOffset';
72
+ readonly shop: 'shadowOpacity';
73
+ readonly t: 'top';
74
+ readonly w: 'width';
75
+ readonly zi: 'zIndex';
76
76
  };
77
77
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAE,EAAE,gBAAgB;aACpB,CAAC,EAAE,MAAM;aACT,CAAC,EAAE,QAAQ;aACX,GAAG,EAAE,WAAW;aAChB,GAAG,EAAE,UAAU;aACf,EAAE,EAAE,cAAc;aAClB,GAAG,EAAE,WAAW;aAChB,GAAG,EAAE,UAAU;aACf,EAAE,EAAE,YAAY;aAChB,EAAE,EAAE,aAAa;aACjB,EAAE,EAAE,WAAW;aACf,EAAE,EAAE,kBAAkB;aACtB,EAAE,EAAE,gBAAgB;aACpB,CAAC,EAAE,SAAS;aACZ,EAAE,EAAE,UAAU;aACd,CAAC,EAAE,SAAS;aACZ,EAAE,EAAE,eAAe;aACnB,EAAE,EAAE,aAAa;aACjB,GAAG,EAAE,UAAU;aACf,EAAE,EAAE,cAAc;aAClB,EAAE,EAAE,YAAY;aAChB,EAAE,EAAE,mBAAmB;aACvB,EAAE,EAAE,iBAAiB;aACrB,CAAC,EAAE,OAAO;aACV,IAAI,EAAE,aAAa;aACnB,IAAI,EAAE,cAAc;aACpB,IAAI,EAAE,cAAc;aACpB,IAAI,EAAE,eAAe;aACrB,CAAC,EAAE,KAAK;aACR,CAAC,EAAE,OAAO;aACV,EAAE,EAAE,QAAQ;CACJ,CAAA"}
package/types/v6.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ export declare const shorthands: {
2
+ text: "textAlign";
3
+ b: "bottom";
4
+ bg: "background";
5
+ content: "alignContent";
6
+ grow: "flexGrow";
7
+ h: "height";
8
+ items: "alignItems";
9
+ justify: "justifyContent";
10
+ l: "left";
11
+ m: "margin";
12
+ maxH: "maxHeight";
13
+ maxW: "maxWidth";
14
+ mb: "marginBottom";
15
+ minH: "minHeight";
16
+ minW: "minWidth";
17
+ ml: "marginLeft";
18
+ mr: "marginRight";
19
+ mt: "marginTop";
20
+ mx: "marginHorizontal";
21
+ my: "marginVertical";
22
+ p: "padding";
23
+ pb: "paddingBottom";
24
+ pl: "paddingLeft";
25
+ pr: "paddingRight";
26
+ pt: "paddingTop";
27
+ px: "paddingHorizontal";
28
+ py: "paddingVertical";
29
+ r: "right";
30
+ rounded: "borderRadius";
31
+ select: "userSelect";
32
+ self: "alignSelf";
33
+ shrink: "flexShrink";
34
+ t: "top";
35
+ w: "width";
36
+ z: "zIndex";
37
+ };
38
+ export type Shorthands = typeof shorthands;
39
+ export type ShorthandKeys = keyof Shorthands;
40
+ //# sourceMappingURL=v6.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["../src/v6.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCrB,CAAA;AAOF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAC1C,MAAM,MAAM,aAAa,GAAG,MAAM,UAAU,CAAA"}
package/v6.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.assign(module.exports, require('./dist/cjs/v6.cjs'))
package/v6.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './types/v6'
@@ -1,2 +0,0 @@
1
- $ tamagui-build
2
- built @tamagui/shorthands in 1544 ms
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- "composite": true
5
- },
6
- "references": [],
7
- "exclude": [
8
- "types",
9
- "dist",
10
- "**/__tests__",
11
- "v2.cjs",
12
- "v2.d.ts",
13
- "v4.cjs",
14
- "v4.d.ts",
15
- "v5.cjs",
16
- "v5.d.ts"
17
- ]
18
- }