@tamagui/web 1.99.0 → 1.99.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/dist/esm/constants/accessibilityDirectMap.native.mjs +6 -0
- package/dist/esm/constants/webToNativeProps.native.mjs +77 -0
- package/dist/esm/helpers/getStylesAtomic.native.mjs +7 -0
- package/dist/esm/helpers/getThemeCSSRules.native.mjs +4 -0
- package/dist/esm/helpers/matchMedia.native.mjs +14 -0
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs +13 -0
- package/dist/esm/helpers/setElementProps.native.mjs +6 -0
- package/dist/esm/helpers/webPropsToSkip.native.mjs +55 -0
- package/dist/esm/views/FontLanguage.native.mjs +15 -0
- package/dist/esm/views/ThemeDebug.native.mjs +9 -0
- package/package.json +11 -11
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const accessibilityDirectMap = {},
|
|
2
|
+
webToNativeAccessibilityDirectMap = {},
|
|
3
|
+
nativeAccessibilityValue = {},
|
|
4
|
+
nativeAccessibilityState = {},
|
|
5
|
+
accessibilityWebRoleToNativeRole = {};
|
|
6
|
+
export { accessibilityDirectMap, accessibilityWebRoleToNativeRole, nativeAccessibilityState, nativeAccessibilityValue, webToNativeAccessibilityDirectMap };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const resizeModeMap = {
|
|
2
|
+
fill: "stretch",
|
|
3
|
+
none: "center",
|
|
4
|
+
"scale-down": "contain",
|
|
5
|
+
contain: "contain",
|
|
6
|
+
cover: "cover"
|
|
7
|
+
},
|
|
8
|
+
verticalAlignMap = {
|
|
9
|
+
top: "top",
|
|
10
|
+
middle: "center",
|
|
11
|
+
bottom: "bottom",
|
|
12
|
+
auto: "auto"
|
|
13
|
+
},
|
|
14
|
+
webToNativeDynamicExpansion = {
|
|
15
|
+
objectFit: val => [["resizeMode", resizeModeMap[val] || "cover"]],
|
|
16
|
+
verticalAlign: val => [["textAlignVertical", verticalAlignMap[val] || "auto"]]
|
|
17
|
+
},
|
|
18
|
+
vert = ["Top", "Bottom"],
|
|
19
|
+
es = ["End", "Start"],
|
|
20
|
+
t = ["Top"],
|
|
21
|
+
b = ["Bottom"],
|
|
22
|
+
s = ["Start"],
|
|
23
|
+
e = ["End"],
|
|
24
|
+
h = ["Height"],
|
|
25
|
+
w = ["Width"],
|
|
26
|
+
expansionsNoPrefix = {
|
|
27
|
+
borderBlockColor: ["TopColor", "BottomColor"],
|
|
28
|
+
borderInlineColor: ["EndColor", "StartColor"],
|
|
29
|
+
borderBlockWidth: ["TopWidth", "BottomWidth"],
|
|
30
|
+
borderInlineWidth: ["EndWidth", "StartWidth"],
|
|
31
|
+
borderBlockStyle: ["TopStyle", "BottomStyle"],
|
|
32
|
+
borderInlineStyle: ["EndStyle", "StartStyle"],
|
|
33
|
+
marginBlock: vert,
|
|
34
|
+
marginInline: es,
|
|
35
|
+
paddingBlock: vert,
|
|
36
|
+
paddingInline: es,
|
|
37
|
+
borderBlockStartColor: ["TopColor"],
|
|
38
|
+
borderBlockEndColor: ["BottomColor"],
|
|
39
|
+
borderInlineStartColor: ["StartColor"],
|
|
40
|
+
borderInlineEndColor: ["EndColor"],
|
|
41
|
+
borderBlockStartWidth: ["TopWidth"],
|
|
42
|
+
borderBlockEndWidth: ["BottomWidth"],
|
|
43
|
+
borderInlineStartWidth: ["StartWidth"],
|
|
44
|
+
borderInlineEndWidth: ["EndWidth"],
|
|
45
|
+
borderBlockStartStyle: ["TopStyle"],
|
|
46
|
+
borderBlockEndStyle: ["BottomStyle"],
|
|
47
|
+
borderInlineStartStyle: ["StartStyle"],
|
|
48
|
+
borderInlineEndStyle: ["EndStyle"],
|
|
49
|
+
marginBlockStart: t,
|
|
50
|
+
marginBlockEnd: b,
|
|
51
|
+
marginInlineStart: s,
|
|
52
|
+
marginInlineEnd: e,
|
|
53
|
+
paddingBlockStart: t,
|
|
54
|
+
paddingBlockEnd: b,
|
|
55
|
+
paddingInlineStart: s,
|
|
56
|
+
paddingInlineEnd: e,
|
|
57
|
+
minBlockSize: h,
|
|
58
|
+
maxBlockSize: h,
|
|
59
|
+
minInlineSize: w,
|
|
60
|
+
maxInlineSize: w
|
|
61
|
+
};
|
|
62
|
+
for (const parent in expansionsNoPrefix) {
|
|
63
|
+
const prefix = parent.slice(0, /[A-Z]/.exec(parent)?.index ?? parent.length);
|
|
64
|
+
expansionsNoPrefix[parent] = expansionsNoPrefix[parent].map(k => `${prefix}${k}`);
|
|
65
|
+
}
|
|
66
|
+
const expansions = {
|
|
67
|
+
inset: ["top", "right", "bottom", "left"],
|
|
68
|
+
insetBlock: ["top", "bottom"],
|
|
69
|
+
insetBlockStart: ["top"],
|
|
70
|
+
insetBlockEnd: ["bottom"],
|
|
71
|
+
insetInlineStart: ["left"],
|
|
72
|
+
insetInlineEnd: ["right"],
|
|
73
|
+
blockSize: ["height"],
|
|
74
|
+
inlineSize: ["width"]
|
|
75
|
+
},
|
|
76
|
+
webToNativeExpansion = Object.assign(expansionsNoPrefix, expansions);
|
|
77
|
+
export { webToNativeDynamicExpansion, webToNativeExpansion };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
let matchMediaImpl = matchMediaFallback;
|
|
2
|
+
const matchMedia = (...args) => matchMediaImpl(...args);
|
|
3
|
+
function matchMediaFallback(query) {
|
|
4
|
+
return process.env.NODE_ENV === "development" && console.warn("warning: matchMedia implementation is not provided."), {
|
|
5
|
+
match: (a, b) => !1,
|
|
6
|
+
addListener: () => {},
|
|
7
|
+
removeListener: () => {},
|
|
8
|
+
matches: !1
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function setupMatchMedia(_) {
|
|
12
|
+
matchMediaImpl = _, globalThis.matchMedia = _;
|
|
13
|
+
}
|
|
14
|
+
export { matchMedia, setupMatchMedia };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const normalizeStylePropKeys = {
|
|
2
|
+
backgroundColor: !0,
|
|
3
|
+
borderColor: !0,
|
|
4
|
+
borderTopColor: !0,
|
|
5
|
+
borderRightColor: !0,
|
|
6
|
+
borderBottomColor: !0,
|
|
7
|
+
borderLeftColor: !0,
|
|
8
|
+
color: !0,
|
|
9
|
+
shadowColor: !0,
|
|
10
|
+
textDecorationColor: !0,
|
|
11
|
+
textShadowColor: !0
|
|
12
|
+
};
|
|
13
|
+
export { normalizeStylePropKeys };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const webPropsToSkip = {
|
|
2
|
+
whiteSpace: 1,
|
|
3
|
+
wordWrap: 1,
|
|
4
|
+
textOverflow: 1,
|
|
5
|
+
textDecorationDistance: 1,
|
|
6
|
+
cursor: 1,
|
|
7
|
+
contain: 1,
|
|
8
|
+
boxSizing: 1,
|
|
9
|
+
touchAction: 1,
|
|
10
|
+
boxShadow: 1,
|
|
11
|
+
outlineStyle: 1,
|
|
12
|
+
outlineOffset: 1,
|
|
13
|
+
outlineWidth: 1,
|
|
14
|
+
outlineColor: 1,
|
|
15
|
+
filter: 1,
|
|
16
|
+
backdropFilter: 1,
|
|
17
|
+
backgroundImage: 1,
|
|
18
|
+
mixBlendMode: 1,
|
|
19
|
+
scrollbarWidth: 1,
|
|
20
|
+
backgroundOrigin: 1,
|
|
21
|
+
backgroundPosition: 1,
|
|
22
|
+
backgroundRepeat: 1,
|
|
23
|
+
backgroundSize: 1,
|
|
24
|
+
backgroundClip: 1,
|
|
25
|
+
backgroundBlendMode: 1,
|
|
26
|
+
backgroundAttachment: 1,
|
|
27
|
+
background: 1,
|
|
28
|
+
clipPath: 1,
|
|
29
|
+
caretColor: 1,
|
|
30
|
+
transformStyle: 1,
|
|
31
|
+
mask: 1,
|
|
32
|
+
maskImage: 1,
|
|
33
|
+
textEmphasis: 1,
|
|
34
|
+
borderImage: 1,
|
|
35
|
+
float: 1,
|
|
36
|
+
content: 1,
|
|
37
|
+
overflowBlock: 1,
|
|
38
|
+
overflowInline: 1,
|
|
39
|
+
maskBorder: 1,
|
|
40
|
+
maskBorderMode: 1,
|
|
41
|
+
maskBorderOutset: 1,
|
|
42
|
+
maskBorderRepeat: 1,
|
|
43
|
+
maskBorderSlice: 1,
|
|
44
|
+
maskBorderSource: 1,
|
|
45
|
+
maskBorderWidth: 1,
|
|
46
|
+
maskClip: 1,
|
|
47
|
+
maskComposite: 1,
|
|
48
|
+
maskMode: 1,
|
|
49
|
+
maskOrigin: 1,
|
|
50
|
+
maskPosition: 1,
|
|
51
|
+
maskRepeat: 1,
|
|
52
|
+
maskSize: 1,
|
|
53
|
+
maskType: 1
|
|
54
|
+
};
|
|
55
|
+
export { webPropsToSkip };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { ComponentContext } from "../contexts/ComponentContext.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const FontLanguage = ({
|
|
5
|
+
children,
|
|
6
|
+
...props
|
|
7
|
+
}) => {
|
|
8
|
+
const language = useMemo(() => props, [JSON.stringify(props)]);
|
|
9
|
+
return /* @__PURE__ */jsx(ComponentContext.Provider, {
|
|
10
|
+
language,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
FontLanguage.displayName = "FontLanguage";
|
|
15
|
+
export { FontLanguage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.99.
|
|
3
|
+
"version": "1.99.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.99.
|
|
31
|
-
"@tamagui/constants": "1.99.
|
|
32
|
-
"@tamagui/helpers": "1.99.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.99.
|
|
34
|
-
"@tamagui/timer": "1.99.
|
|
35
|
-
"@tamagui/types": "1.99.
|
|
36
|
-
"@tamagui/use-did-finish-ssr": "1.99.
|
|
37
|
-
"@tamagui/use-event": "1.99.
|
|
38
|
-
"@tamagui/use-force-update": "1.99.
|
|
30
|
+
"@tamagui/compose-refs": "1.99.1",
|
|
31
|
+
"@tamagui/constants": "1.99.1",
|
|
32
|
+
"@tamagui/helpers": "1.99.1",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.99.1",
|
|
34
|
+
"@tamagui/timer": "1.99.1",
|
|
35
|
+
"@tamagui/types": "1.99.1",
|
|
36
|
+
"@tamagui/use-did-finish-ssr": "1.99.1",
|
|
37
|
+
"@tamagui/use-event": "1.99.1",
|
|
38
|
+
"@tamagui/use-force-update": "1.99.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.99.
|
|
41
|
+
"@tamagui/build": "1.99.1",
|
|
42
42
|
"@testing-library/react": "^14.0.0",
|
|
43
43
|
"csstype": "^3.0.10",
|
|
44
44
|
"react": "^18.2.0",
|