@tamagui/web 1.47.4 → 1.47.6

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.
@@ -26,16 +26,16 @@ const Decorated = Symbol();
26
26
  const withStaticProperties = function(component, staticProps) {
27
27
  const next = (() => {
28
28
  if (component[Decorated]) {
29
- return (0, import_react.forwardRef)(
29
+ const _ = (0, import_react.forwardRef)(
30
30
  (props, ref) => (0, import_react.createElement)(component, { ...props, ref })
31
31
  );
32
+ for (const key in component) {
33
+ const v = component[key];
34
+ _[key] = v && typeof v === "object" ? { ...v } : v;
35
+ }
32
36
  }
33
37
  return component;
34
38
  })();
35
- for (const key in component) {
36
- const v = component[key];
37
- next[key] = v && typeof v === "object" ? { ...v } : v;
38
- }
39
39
  Object.assign(next, staticProps);
40
40
  next[Decorated] = true;
41
41
  return next;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/withStaticProperties.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO;AAElB,MAAM,uBAAuB,SAClC,WACA,aACO;AAEP,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,iBAAO;AAAA,QAAW,CAAC,OAAO,YACxB,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,aAAW,OAAO,WAAW;AAC3B,UAAM,IAAI,UAAU,GAAG;AAEvB,SAAK,GAAG,IAAI,KAAK,OAAO,MAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,EACtD;AAGA,SAAO,OAAO,MAAM,WAAW;AAC/B,OAAK,SAAS,IAAI;AAElB,SAAO;AACT;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,MAAM,YAAY,OAAO;AAElB,MAAM,uBAAuB,SAClC,WACA,aACO;AAEP,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,QAAI;AAAA,QAAW,CAAC,OAAO,YAC3B,4BAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,MAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,SAAO,OAAO,MAAM,WAAW;AAC/B,OAAK,SAAS,IAAI;AAElB,SAAO;AACT;",
5
5
  "names": []
6
6
  }
@@ -3,16 +3,16 @@ const Decorated = Symbol();
3
3
  const withStaticProperties = function(component, staticProps) {
4
4
  const next = (() => {
5
5
  if (component[Decorated]) {
6
- return forwardRef(
6
+ const _ = forwardRef(
7
7
  (props, ref) => createElement(component, { ...props, ref })
8
8
  );
9
+ for (const key in component) {
10
+ const v = component[key];
11
+ _[key] = v && typeof v === "object" ? { ...v } : v;
12
+ }
9
13
  }
10
14
  return component;
11
15
  })();
12
- for (const key in component) {
13
- const v = component[key];
14
- next[key] = v && typeof v === "object" ? { ...v } : v;
15
- }
16
16
  Object.assign(next, staticProps);
17
17
  next[Decorated] = true;
18
18
  return next;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/withStaticProperties.tsx"],
4
- "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO;AAElB,MAAM,uBAAuB,SAClC,WACA,aACO;AAEP,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,aAAO;AAAA,QAAW,CAAC,OAAO,QACxB,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,aAAW,OAAO,WAAW;AAC3B,UAAM,IAAI,UAAU,GAAG;AAEvB,SAAK,GAAG,IAAI,KAAK,OAAO,MAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,EACtD;AAGA,SAAO,OAAO,MAAM,WAAW;AAC/B,OAAK,SAAS,IAAI;AAElB,SAAO;AACT;",
4
+ "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,MAAM,YAAY,OAAO;AAElB,MAAM,uBAAuB,SAClC,WACA,aACO;AAEP,QAAM,QAAQ,MAAM;AAClB,QAAI,UAAU,SAAS,GAAG;AACxB,YAAM,IAAI;AAAA,QAAW,CAAC,OAAO,QAC3B,cAAc,WAAkB,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,MACnD;AAEA,iBAAW,OAAO,WAAW;AAC3B,cAAM,IAAI,UAAU,GAAG;AAEvB,UAAE,GAAG,IAAI,KAAK,OAAO,MAAM,WAAW,EAAE,GAAG,EAAE,IAAI;AAAA,MACnD;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG;AAGH,SAAO,OAAO,MAAM,WAAW;AAC/B,OAAK,SAAS,IAAI;AAElB,SAAO;AACT;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.47.4",
3
+ "version": "1.47.6",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,19 +27,19 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "1.47.4",
31
- "@tamagui/constants": "1.47.4",
32
- "@tamagui/helpers": "1.47.4",
33
- "@tamagui/normalize-css-color": "1.47.4",
34
- "@tamagui/use-did-finish-ssr": "1.47.4",
35
- "@tamagui/use-event": "1.47.4",
36
- "@tamagui/use-force-update": "1.47.4"
30
+ "@tamagui/compose-refs": "1.47.6",
31
+ "@tamagui/constants": "1.47.6",
32
+ "@tamagui/helpers": "1.47.6",
33
+ "@tamagui/normalize-css-color": "1.47.6",
34
+ "@tamagui/use-did-finish-ssr": "1.47.6",
35
+ "@tamagui/use-event": "1.47.6",
36
+ "@tamagui/use-force-update": "1.47.6"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.47.4",
42
+ "@tamagui/build": "1.47.6",
43
43
  "@testing-library/react": "^13.4.0",
44
44
  "csstype": "^3.0.10",
45
45
  "react": "^18.2.0",
@@ -9,20 +9,19 @@ export const withStaticProperties = function <A extends Function, B>(
9
9
  // clone component if already wrapped once
10
10
  const next = (() => {
11
11
  if (component[Decorated]) {
12
- return forwardRef((props, ref) =>
12
+ const _ = forwardRef((props, ref) =>
13
13
  createElement(component as any, { ...props, ref })
14
14
  )
15
+ // attach existing things again
16
+ for (const key in component) {
17
+ const v = component[key]
18
+ // @ts-ignore
19
+ _[key] = v && typeof v === 'object' ? { ...v } : v
20
+ }
15
21
  }
16
22
  return component
17
23
  })()
18
24
 
19
- // attach existing things again
20
- for (const key in component) {
21
- const v = component[key]
22
- // @ts-ignore
23
- next[key] = v && typeof v === 'object' ? { ...v } : v
24
- }
25
-
26
25
  // add new things
27
26
  Object.assign(next, staticProps)
28
27
  next[Decorated] = true
@@ -1 +1 @@
1
- {"version":3,"file":"withStaticProperties.d.ts","sourceRoot":"","sources":["../../src/helpers/withStaticProperties.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,gEA0BhC,CAAA"}
1
+ {"version":3,"file":"withStaticProperties.d.ts","sourceRoot":"","sources":["../../src/helpers/withStaticProperties.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,gEAyBhC,CAAA"}