@tamagui/use-store 1.98.0 → 1.98.2
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/cjs/useStoreDebug.js +4 -12
- package/dist/cjs/useStoreDebug.js.map +2 -2
- package/dist/cjs/useStoreDebug.native.js +4 -12
- package/dist/cjs/useStoreDebug.native.js.map +2 -2
- package/dist/esm/useStoreDebug.js +2 -2
- package/dist/esm/useStoreDebug.js.map +1 -1
- package/dist/esm/useStoreDebug.mjs +2 -5
- package/dist/esm/useStoreDebug.native.js +3 -3
- package/dist/esm/useStoreDebug.native.js.map +2 -2
- package/package.json +3 -6
- package/src/useStoreDebug.tsx +8 -7
- package/types/useStoreDebug.d.ts +1 -1
- package/types/useStoreDebug.d.ts.map +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
7
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,14 +11,7 @@ var __export = (target, all) => {
|
|
|
12
11
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
12
|
return to;
|
|
14
13
|
};
|
|
15
|
-
var
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
15
|
var useStoreDebug_exports = {};
|
|
24
16
|
__export(useStoreDebug_exports, {
|
|
25
17
|
DebugComponents: () => DebugComponents,
|
|
@@ -29,8 +21,8 @@ __export(useStoreDebug_exports, {
|
|
|
29
21
|
useDebugStoreComponent: () => useDebugStoreComponent
|
|
30
22
|
});
|
|
31
23
|
module.exports = __toCommonJS(useStoreDebug_exports);
|
|
32
|
-
var import_react =
|
|
33
|
-
const
|
|
24
|
+
var import_react = require("react");
|
|
25
|
+
const useCurrentComponent = () => ({});
|
|
34
26
|
function useDebugStoreComponent(StoreCons) {
|
|
35
27
|
const cmp = useCurrentComponent();
|
|
36
28
|
DebugStores.add(StoreCons), DebugComponents.has(cmp) || DebugComponents.set(cmp, /* @__PURE__ */ new Set());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useStoreDebug.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAMhC,MAAM,sBAAsB,OAC1B,CAAC;AAQH,SAAS,uBAAuB,WAAgB;AACrD,QAAM,MAAM,oBAAoB;AAGhC,cAAY,IAAI,SAAS,GACpB,gBAAgB,IAAI,GAAG,KAC1B,gBAAgB,IAAI,KAAK,oBAAI,IAAI,CAAC;AAEpC,QAAM,SAAS,gBAAgB,IAAI,GAAG;AACtC,SAAO,IAAI,SAAS,OAEpB,8BAAgB,MACP,MAAM;AACX,gBAAY,OAAO,SAAS,GAC5B,OAAO,OAAO,SAAS;AAAA,EACzB,GACC,CAAC,CAAC;AACP;AAEO,MAAM,cAAc,CAAC,WAAgB,SAA2C;AACrF,QAAM,YAAY,KAAK,eAAe;AACtC,SAAO,gBAAgB,IAAI,SAAS,GAAG,IAAI,SAAS;AACtD,GAEa,kBAAkB,oBAAI,IAAmB,GACzC,cAAc,oBAAI,IAAS;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -13,14 +12,7 @@ var __export = (target, all) => {
|
|
|
13
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
13
|
return to;
|
|
15
14
|
};
|
|
16
|
-
var
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
16
|
var useStoreDebug_exports = {};
|
|
25
17
|
__export(useStoreDebug_exports, {
|
|
26
18
|
DebugComponents: () => DebugComponents,
|
|
@@ -30,8 +22,8 @@ __export(useStoreDebug_exports, {
|
|
|
30
22
|
useDebugStoreComponent: () => useDebugStoreComponent
|
|
31
23
|
});
|
|
32
24
|
module.exports = __toCommonJS(useStoreDebug_exports);
|
|
33
|
-
var import_react =
|
|
34
|
-
return
|
|
25
|
+
var import_react = require("react"), useCurrentComponent = function() {
|
|
26
|
+
return {};
|
|
35
27
|
};
|
|
36
28
|
function useDebugStoreComponent(StoreCons) {
|
|
37
29
|
var cmp = useCurrentComponent();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/use-store/src/useStoreDebug.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;;;mBAAuC,kBAM1BA,sBAAsB,WAAA;AACjC,SAAO,CAAC;AAMV;AAEO,SAASC,uBAAuBC,WAAc;AACnD,MAAMC,MAAMH,oBAAAA;AAGZI,cAAYC,IAAIH,SAAAA,GACXI,gBAAgBC,IAAIJ,GAAAA,KACvBG,gBAAgBE,IAAIL,KAAK,oBAAIM,IAAAA,CAAAA;AAE/B,MAAMC,SAASJ,gBAAgBK,IAAIR,GAAAA;AACnCO,SAAOL,IAAIH,SAAAA,OAEXU,8BAAgB,WAAA;AACd,WAAO,WAAA;AACLR,kBAAYS,OAAOX,SAAAA,GACnBQ,OAAOG,OAAOX,SAAAA;IAChB;EACF,GAAG,CAAA,CAAE;AACP;AAEO,IAAMY,cAAc,SAACC,WAAgBC,MAAAA;MACxBA,qBACXV,sBADDJ,aAAYc,sBAAAA,KAAKC,mBAAa,QAAlBD,wBAAAA,SAAAA,SAAAA,oBAAoBE;AACtC,UAAOZ,uBAAAA,gBAAgBK,IAAII,SAAAA,OAAAA,QAApBT,yBAAAA,SAAAA,SAAAA,qBAAgCC,IAAIL,SAAAA;AAC7C,GAEaI,kBAAkB,oBAAIa,IAAAA,GACtBf,cAAc,oBAAIK,IAAAA;",
|
|
5
|
+
"names": ["useCurrentComponent", "useDebugStoreComponent", "StoreCons", "cmp", "DebugStores", "add", "DebugComponents", "has", "set", "Set", "stores", "get", "useLayoutEffect", "delete", "shouldDebug", "component", "info", "storeInstance", "constructor", "Map"]
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
const useCurrentComponent = () => ({});
|
|
3
3
|
function useDebugStoreComponent(StoreCons) {
|
|
4
4
|
const cmp = useCurrentComponent();
|
|
5
5
|
DebugStores.add(StoreCons), DebugComponents.has(cmp) || DebugComponents.set(cmp, /* @__PURE__ */ new Set());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useStoreDebug.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,SAAgB,uBAAuB;AAMhC,MAAM,sBAAsB,OAC1B,CAAC;AAQH,SAAS,uBAAuB,WAAgB;AACrD,QAAM,MAAM,oBAAoB;AAGhC,cAAY,IAAI,SAAS,GACpB,gBAAgB,IAAI,GAAG,KAC1B,gBAAgB,IAAI,KAAK,oBAAI,IAAI,CAAC;AAEpC,QAAM,SAAS,gBAAgB,IAAI,GAAG;AACtC,SAAO,IAAI,SAAS,GAEpB,gBAAgB,MACP,MAAM;AACX,gBAAY,OAAO,SAAS,GAC5B,OAAO,OAAO,SAAS;AAAA,EACzB,GACC,CAAC,CAAC;AACP;AAEO,MAAM,cAAc,CAAC,WAAgB,SAA2C;AACrF,QAAM,YAAY,KAAK,eAAe;AACtC,SAAO,gBAAgB,IAAI,SAAS,GAAG,IAAI,SAAS;AACtD,GAEa,kBAAkB,oBAAI,IAAmB,GACzC,cAAc,oBAAI,IAAS;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const {
|
|
3
|
-
ReactCurrentOwner
|
|
4
|
-
} = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
|
5
|
-
useCurrentComponent = () => ReactCurrentOwner && ReactCurrentOwner.current && ReactCurrentOwner.current.elementType ? ReactCurrentOwner.current.elementType : {};
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
const useCurrentComponent = () => ({});
|
|
6
3
|
function useDebugStoreComponent(StoreCons) {
|
|
7
4
|
const cmp = useCurrentComponent();
|
|
8
5
|
DebugStores.add(StoreCons), DebugComponents.has(cmp) || DebugComponents.set(cmp, /* @__PURE__ */new Set());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
return
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
var useCurrentComponent = function() {
|
|
3
|
+
return {};
|
|
4
4
|
};
|
|
5
5
|
function useDebugStoreComponent(StoreCons) {
|
|
6
6
|
var cmp = useCurrentComponent();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/use-store/src/useStoreDebug.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": "AAAA,SAAgBA,uBAAuB;AAMhC,IAAMC,sBAAsB,WAAA;AACjC,SAAO,CAAC;AAMV;AAEO,SAASC,uBAAuBC,WAAc;AACnD,MAAMC,MAAMH,oBAAAA;AAGZI,cAAYC,IAAIH,SAAAA,GACXI,gBAAgBC,IAAIJ,GAAAA,KACvBG,gBAAgBE,IAAIL,KAAK,oBAAIM,IAAAA,CAAAA;AAE/B,MAAMC,SAASJ,gBAAgBK,IAAIR,GAAAA;AACnCO,SAAOL,IAAIH,SAAAA,GAEXH,gBAAgB,WAAA;AACd,WAAO,WAAA;AACLK,kBAAYQ,OAAOV,SAAAA,GACnBQ,OAAOE,OAAOV,SAAAA;IAChB;EACF,GAAG,CAAA,CAAE;AACP;AAEO,IAAMW,cAAc,SAACC,WAAgBC,MAAAA;MACxBA,qBACXT,sBADDJ,aAAYa,sBAAAA,KAAKC,mBAAa,QAAlBD,wBAAAA,SAAAA,SAAAA,oBAAoBE;AACtC,UAAOX,uBAAAA,gBAAgBK,IAAIG,SAAAA,OAAAA,QAApBR,yBAAAA,SAAAA,SAAAA,qBAAgCC,IAAIL,SAAAA;AAC7C,GAEaI,kBAAkB,oBAAIY,IAAAA,GACtBd,cAAc,oBAAIK,IAAAA;",
|
|
5
|
+
"names": ["useLayoutEffect", "useCurrentComponent", "useDebugStoreComponent", "StoreCons", "cmp", "DebugStores", "add", "DebugComponents", "has", "set", "Set", "stores", "get", "delete", "shouldDebug", "component", "info", "storeInstance", "constructor", "Map"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-store",
|
|
3
|
-
"version": "1.98.
|
|
3
|
+
"version": "1.98.2",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -28,17 +28,14 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@tamagui/simple-hash": "1.98.
|
|
31
|
+
"@tamagui/simple-hash": "1.98.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tamagui/build": "1.98.
|
|
34
|
+
"@tamagui/build": "1.98.2",
|
|
35
35
|
"@testing-library/react": "^14.0.0",
|
|
36
36
|
"react": "^18.2.0",
|
|
37
37
|
"vitest": "^0.34.3"
|
|
38
38
|
},
|
|
39
|
-
"peerDependencies": {
|
|
40
|
-
"react": "*"
|
|
41
|
-
},
|
|
42
39
|
"publishConfig": {
|
|
43
40
|
"access": "public"
|
|
44
41
|
}
|
package/src/useStoreDebug.tsx
CHANGED
|
@@ -2,14 +2,15 @@ import React, { useLayoutEffect } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import type { StoreInfo } from './interfaces'
|
|
4
4
|
|
|
5
|
-
const { ReactCurrentOwner } = (React as any)
|
|
6
|
-
|
|
5
|
+
// const { ReactCurrentOwner } = (React as any)
|
|
6
|
+
// .__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
7
7
|
export const useCurrentComponent = () => {
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
return {}
|
|
9
|
+
// return ReactCurrentOwner &&
|
|
10
|
+
// ReactCurrentOwner.current &&
|
|
11
|
+
// ReactCurrentOwner.current.elementType
|
|
12
|
+
// ? ReactCurrentOwner.current.elementType
|
|
13
|
+
// : {}
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export function useDebugStoreComponent(StoreCons: any) {
|
package/types/useStoreDebug.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StoreInfo } from './interfaces';
|
|
2
|
-
export declare const useCurrentComponent: () =>
|
|
2
|
+
export declare const useCurrentComponent: () => {};
|
|
3
3
|
export declare function useDebugStoreComponent(StoreCons: any): void;
|
|
4
4
|
export declare const shouldDebug: (component: any, info: Pick<StoreInfo, 'storeInstance'>) => boolean | undefined;
|
|
5
5
|
export declare const DebugComponents: Map<any, Set<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStoreDebug.d.ts","sourceRoot":"","sources":["../src/useStoreDebug.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useStoreDebug.d.ts","sourceRoot":"","sources":["../src/useStoreDebug.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,eAAO,MAAM,mBAAmB,UAO/B,CAAA;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,QAiBpD;AAED,eAAO,MAAM,WAAW,cAAe,GAAG,QAAQ,KAAK,SAAS,EAAE,eAAe,CAAC,wBAGjF,CAAA;AAED,eAAO,MAAM,eAAe,oBAA2B,CAAA;AACvD,eAAO,MAAM,WAAW,UAAiB,CAAA"}
|