@tamagui/web 1.2.12 → 1.2.13

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.
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var normalizeShadow_exports = {};
20
+ __export(normalizeShadow_exports, {
21
+ normalizeShadow: () => normalizeShadow
22
+ });
23
+ module.exports = __toCommonJS(normalizeShadow_exports);
24
+ var import_expandStyles = require("./expandStyles");
25
+ var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.js");
26
+ function normalizeShadow({
27
+ shadowColor,
28
+ shadowOffset,
29
+ shadowOpacity = 1,
30
+ shadowRadius
31
+ }) {
32
+ const { height, width } = shadowOffset || import_expandStyles.defaultOffset;
33
+ return {
34
+ shadowOffset: {
35
+ width: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width || 0),
36
+ height: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height || 0)
37
+ },
38
+ shadowRadius: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0),
39
+ shadowColor,
40
+ shadowOpacity
41
+ };
42
+ }
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ normalizeShadow
46
+ });
47
+ //# sourceMappingURL=normalizeShadow.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.ts"],
4
+ "sourcesContent": ["import { defaultOffset } from './expandStyles'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity = 1,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor,\n shadowOpacity,\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8B;AAC9B,wCAA2C;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,WAAO,8DAA2B,SAAS,CAAC;AAAA,MAC5C,YAAQ,8DAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,kBAAc,8DAA2B,gBAAgB,CAAC;AAAA,IAC1D;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var normalizeShadow_native_exports = {};
20
+ __export(normalizeShadow_native_exports, {
21
+ normalizeShadow: () => normalizeShadow
22
+ });
23
+ module.exports = __toCommonJS(normalizeShadow_native_exports);
24
+ var import_normalize_css_color = require("@tamagui/normalize-css-color");
25
+ var import_expandStyles = require("./expandStyles");
26
+ var import_normalizeColor = require("./normalizeColor");
27
+ var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.js");
28
+ function normalizeShadow({
29
+ shadowColor,
30
+ shadowOffset,
31
+ shadowOpacity,
32
+ shadowRadius
33
+ }) {
34
+ const { height, width } = shadowOffset || import_expandStyles.defaultOffset;
35
+ const colorStr = String(shadowColor || "black");
36
+ const val = (0, import_normalize_css_color.normalizeCSSColor)(colorStr);
37
+ if (!val) {
38
+ throw new Error(`invalid shadow color ${colorStr}`);
39
+ }
40
+ const { r, g, b, a } = (0, import_normalizeColor.rgba)(val);
41
+ return {
42
+ shadowOffset: {
43
+ width: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width || 0),
44
+ height: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height || 0)
45
+ },
46
+ shadowRadius: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0),
47
+ shadowColor: `rgb(${r},${g},${b})`,
48
+ shadowOpacity: shadowOpacity ?? a
49
+ };
50
+ }
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ normalizeShadow
54
+ });
55
+ //# sourceMappingURL=normalizeShadow.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.native.ts"],
4
+ "sourcesContent": ["import { normalizeCSSColor } from '@tamagui/normalize-css-color'\n\nimport { defaultOffset } from './expandStyles'\nimport { rgba } from './normalizeColor'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n const colorStr = String(shadowColor || 'black')\n // on native fix bug - shadows behave better if turned into non-alpha rgb() + shadowOpacity\n const val = normalizeCSSColor(colorStr)\n if (!val) {\n throw new Error(`invalid shadow color ${colorStr}`)\n }\n const { r, g, b, a } = rgba(val)\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor: `rgb(${r},${g},${b})`,\n shadowOpacity: shadowOpacity ?? a,\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAkC;AAElC,0BAA8B;AAC9B,4BAAqB;AACrB,wCAA2C;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,QAAM,WAAW,OAAO,eAAe,OAAO;AAE9C,QAAM,UAAM,8CAAkB,QAAQ;AACtC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,wBAAwB,UAAU;AAAA,EACpD;AACA,QAAM,EAAE,GAAG,GAAG,GAAG,EAAE,QAAI,4BAAK,GAAG;AAC/B,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,WAAO,8DAA2B,SAAS,CAAC;AAAA,MAC5C,YAAQ,8DAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,kBAAc,8DAA2B,gBAAgB,CAAC;AAAA,IAC1D,aAAa,OAAO,KAAK,KAAK;AAAA,IAC9B,eAAe,iBAAiB;AAAA,EAClC;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var normalizeStylePropKeys_exports = {};
20
+ __export(normalizeStylePropKeys_exports, {
21
+ normalizeStylePropKeys: () => normalizeStylePropKeys
22
+ });
23
+ module.exports = __toCommonJS(normalizeStylePropKeys_exports);
24
+ const normalizeStylePropKeys = {};
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ normalizeStylePropKeys
28
+ });
29
+ //# sourceMappingURL=normalizeStylePropKeys.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.ts"],
4
+ "sourcesContent": ["// none for web, all for native\n\nexport const normalizeStylePropKeys = {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,yBAAyB,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var normalizeStylePropKeys_native_exports = {};
20
+ __export(normalizeStylePropKeys_native_exports, {
21
+ normalizeStylePropKeys: () => normalizeStylePropKeys
22
+ });
23
+ module.exports = __toCommonJS(normalizeStylePropKeys_native_exports);
24
+ const normalizeStylePropKeys = {
25
+ backgroundColor: true,
26
+ borderColor: true,
27
+ borderTopColor: true,
28
+ borderRightColor: true,
29
+ borderBottomColor: true,
30
+ borderLeftColor: true,
31
+ color: true,
32
+ shadowColor: true,
33
+ textDecorationColor: true,
34
+ textShadowColor: true
35
+ };
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ normalizeStylePropKeys
39
+ });
40
+ //# sourceMappingURL=normalizeStylePropKeys.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.native.ts"],
4
+ "sourcesContent": ["export const normalizeStylePropKeys = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ import { defaultOffset } from "./expandStyles";
2
+ import { normalizeValueWithProperty } from "./normalizeValueWithProperty.js";
3
+ function normalizeShadow({
4
+ shadowColor,
5
+ shadowOffset,
6
+ shadowOpacity = 1,
7
+ shadowRadius
8
+ }) {
9
+ const { height, width } = shadowOffset || defaultOffset;
10
+ return {
11
+ shadowOffset: {
12
+ width: normalizeValueWithProperty(width || 0),
13
+ height: normalizeValueWithProperty(height || 0)
14
+ },
15
+ shadowRadius: normalizeValueWithProperty(shadowRadius || 0),
16
+ shadowColor,
17
+ shadowOpacity
18
+ };
19
+ }
20
+ export {
21
+ normalizeShadow
22
+ };
23
+ //# sourceMappingURL=normalizeShadow.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.ts"],
4
+ "sourcesContent": ["import { defaultOffset } from './expandStyles'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity = 1,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor,\n shadowOpacity,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,OAAO,2BAA2B,SAAS,CAAC;AAAA,MAC5C,QAAQ,2BAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,cAAc,2BAA2B,gBAAgB,CAAC;AAAA,IAC1D;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ import { defaultOffset } from "./expandStyles";
2
+ import { normalizeValueWithProperty } from "./normalizeValueWithProperty.js";
3
+ function normalizeShadow({
4
+ shadowColor,
5
+ shadowOffset,
6
+ shadowOpacity = 1,
7
+ shadowRadius
8
+ }) {
9
+ const { height, width } = shadowOffset || defaultOffset;
10
+ return {
11
+ shadowOffset: {
12
+ width: normalizeValueWithProperty(width || 0),
13
+ height: normalizeValueWithProperty(height || 0)
14
+ },
15
+ shadowRadius: normalizeValueWithProperty(shadowRadius || 0),
16
+ shadowColor,
17
+ shadowOpacity
18
+ };
19
+ }
20
+ export {
21
+ normalizeShadow
22
+ };
23
+ //# sourceMappingURL=normalizeShadow.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.ts"],
4
+ "sourcesContent": ["import { defaultOffset } from './expandStyles'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity = 1,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor,\n shadowOpacity,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,qBAAqB;AAC9B,SAAS,kCAAkC;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,OAAO,2BAA2B,SAAS,CAAC;AAAA,MAC5C,QAAQ,2BAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,cAAc,2BAA2B,gBAAgB,CAAC;AAAA,IAC1D;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import { normalizeCSSColor } from "@tamagui/normalize-css-color";
2
+ import { defaultOffset } from "./expandStyles";
3
+ import { rgba } from "./normalizeColor";
4
+ import { normalizeValueWithProperty } from "./normalizeValueWithProperty.js";
5
+ function normalizeShadow({
6
+ shadowColor,
7
+ shadowOffset,
8
+ shadowOpacity,
9
+ shadowRadius
10
+ }) {
11
+ const { height, width } = shadowOffset || defaultOffset;
12
+ const colorStr = String(shadowColor || "black");
13
+ const val = normalizeCSSColor(colorStr);
14
+ if (!val) {
15
+ throw new Error(`invalid shadow color ${colorStr}`);
16
+ }
17
+ const { r, g, b, a } = rgba(val);
18
+ return {
19
+ shadowOffset: {
20
+ width: normalizeValueWithProperty(width || 0),
21
+ height: normalizeValueWithProperty(height || 0)
22
+ },
23
+ shadowRadius: normalizeValueWithProperty(shadowRadius || 0),
24
+ shadowColor: `rgb(${r},${g},${b})`,
25
+ shadowOpacity: shadowOpacity ?? a
26
+ };
27
+ }
28
+ export {
29
+ normalizeShadow
30
+ };
31
+ //# sourceMappingURL=normalizeShadow.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.native.ts"],
4
+ "sourcesContent": ["import { normalizeCSSColor } from '@tamagui/normalize-css-color'\n\nimport { defaultOffset } from './expandStyles'\nimport { rgba } from './normalizeColor'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n const colorStr = String(shadowColor || 'black')\n // on native fix bug - shadows behave better if turned into non-alpha rgb() + shadowOpacity\n const val = normalizeCSSColor(colorStr)\n if (!val) {\n throw new Error(`invalid shadow color ${colorStr}`)\n }\n const { r, g, b, a } = rgba(val)\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor: `rgb(${r},${g},${b})`,\n shadowOpacity: shadowOpacity ?? a,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,yBAAyB;AAElC,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,kCAAkC;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,QAAM,WAAW,OAAO,eAAe,OAAO;AAE9C,QAAM,MAAM,kBAAkB,QAAQ;AACtC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,wBAAwB,UAAU;AAAA,EACpD;AACA,QAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,KAAK,GAAG;AAC/B,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,OAAO,2BAA2B,SAAS,CAAC;AAAA,MAC5C,QAAQ,2BAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,cAAc,2BAA2B,gBAAgB,CAAC;AAAA,IAC1D,aAAa,OAAO,KAAK,KAAK;AAAA,IAC9B,eAAe,iBAAiB;AAAA,EAClC;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ import { normalizeCSSColor } from "@tamagui/normalize-css-color";
2
+ import { defaultOffset } from "./expandStyles";
3
+ import { rgba } from "./normalizeColor";
4
+ import { normalizeValueWithProperty } from "./normalizeValueWithProperty.js";
5
+ function normalizeShadow({
6
+ shadowColor,
7
+ shadowOffset,
8
+ shadowOpacity,
9
+ shadowRadius
10
+ }) {
11
+ const { height, width } = shadowOffset || defaultOffset;
12
+ const colorStr = String(shadowColor || "black");
13
+ const val = normalizeCSSColor(colorStr);
14
+ if (!val) {
15
+ throw new Error(`invalid shadow color ${colorStr}`);
16
+ }
17
+ const { r, g, b, a } = rgba(val);
18
+ return {
19
+ shadowOffset: {
20
+ width: normalizeValueWithProperty(width || 0),
21
+ height: normalizeValueWithProperty(height || 0)
22
+ },
23
+ shadowRadius: normalizeValueWithProperty(shadowRadius || 0),
24
+ shadowColor: `rgb(${r},${g},${b})`,
25
+ shadowOpacity: shadowOpacity ?? a
26
+ };
27
+ }
28
+ export {
29
+ normalizeShadow
30
+ };
31
+ //# sourceMappingURL=normalizeShadow.native.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeShadow.native.ts"],
4
+ "sourcesContent": ["import { normalizeCSSColor } from '@tamagui/normalize-css-color'\n\nimport { defaultOffset } from './expandStyles'\nimport { rgba } from './normalizeColor'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n const colorStr = String(shadowColor || 'black')\n // on native fix bug - shadows behave better if turned into non-alpha rgb() + shadowOpacity\n const val = normalizeCSSColor(colorStr)\n if (!val) {\n throw new Error(`invalid shadow color ${colorStr}`)\n }\n const { r, g, b, a } = rgba(val)\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor: `rgb(${r},${g},${b})`,\n shadowOpacity: shadowOpacity ?? a,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,yBAAyB;AAElC,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,kCAAkC;AAEpC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,EAAE,QAAQ,MAAM,IAAI,gBAAgB;AAC1C,QAAM,WAAW,OAAO,eAAe,OAAO;AAE9C,QAAM,MAAM,kBAAkB,QAAQ;AACtC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,wBAAwB,UAAU;AAAA,EACpD;AACA,QAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,KAAK,GAAG;AAC/B,SAAO;AAAA,IACL,cAAc;AAAA,MACZ,OAAO,2BAA2B,SAAS,CAAC;AAAA,MAC5C,QAAQ,2BAA2B,UAAU,CAAC;AAAA,IAChD;AAAA,IACA,cAAc,2BAA2B,gBAAgB,CAAC;AAAA,IAC1D,aAAa,OAAO,KAAK,KAAK;AAAA,IAC9B,eAAe,iBAAiB;AAAA,EAClC;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ const normalizeStylePropKeys = {};
2
+ export {
3
+ normalizeStylePropKeys
4
+ };
5
+ //# sourceMappingURL=normalizeStylePropKeys.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.ts"],
4
+ "sourcesContent": ["// none for web, all for native\n\nexport const normalizeStylePropKeys = {}\n"],
5
+ "mappings": "AAEO,MAAM,yBAAyB,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ const normalizeStylePropKeys = {};
2
+ export {
3
+ normalizeStylePropKeys
4
+ };
5
+ //# sourceMappingURL=normalizeStylePropKeys.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.ts"],
4
+ "sourcesContent": ["// none for web, all for native\n\nexport const normalizeStylePropKeys = {}\n"],
5
+ "mappings": "AAEO,MAAM,yBAAyB,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ const normalizeStylePropKeys = {
2
+ backgroundColor: true,
3
+ borderColor: true,
4
+ borderTopColor: true,
5
+ borderRightColor: true,
6
+ borderBottomColor: true,
7
+ borderLeftColor: true,
8
+ color: true,
9
+ shadowColor: true,
10
+ textDecorationColor: true,
11
+ textShadowColor: true
12
+ };
13
+ export {
14
+ normalizeStylePropKeys
15
+ };
16
+ //# sourceMappingURL=normalizeStylePropKeys.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.native.ts"],
4
+ "sourcesContent": ["export const normalizeStylePropKeys = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n"],
5
+ "mappings": "AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ const normalizeStylePropKeys = {
2
+ backgroundColor: true,
3
+ borderColor: true,
4
+ borderTopColor: true,
5
+ borderRightColor: true,
6
+ borderBottomColor: true,
7
+ borderLeftColor: true,
8
+ color: true,
9
+ shadowColor: true,
10
+ textDecorationColor: true,
11
+ textShadowColor: true
12
+ };
13
+ export {
14
+ normalizeStylePropKeys
15
+ };
16
+ //# sourceMappingURL=normalizeStylePropKeys.native.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.native.ts"],
4
+ "sourcesContent": ["export const normalizeStylePropKeys = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n"],
5
+ "mappings": "AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,20 +27,20 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "^1.2.12",
31
- "@tamagui/constants": "^1.2.12",
32
- "@tamagui/helpers": "^1.2.12",
33
- "@tamagui/normalize-css-color": "^1.2.12",
34
- "@tamagui/use-did-finish-ssr": "^1.2.12",
35
- "@tamagui/use-event": "^1.2.12",
36
- "@tamagui/use-force-update": "^1.2.12"
30
+ "@tamagui/compose-refs": "^1.2.13",
31
+ "@tamagui/constants": "^1.2.13",
32
+ "@tamagui/helpers": "^1.2.13",
33
+ "@tamagui/normalize-css-color": "^1.2.13",
34
+ "@tamagui/use-did-finish-ssr": "^1.2.13",
35
+ "@tamagui/use-event": "^1.2.13",
36
+ "@tamagui/use-force-update": "^1.2.13"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*",
40
40
  "react-dom": "*"
41
41
  },
42
42
  "devDependencies": {
43
- "@tamagui/build": "^1.2.12",
43
+ "@tamagui/build": "^1.2.13",
44
44
  "@testing-library/react": "^13.4.0",
45
45
  "csstype": "^3.0.10",
46
46
  "react": "^18.2.0",