@tamagui/collection 2.0.0-rc.4 → 2.0.0-rc.40
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/Collection.cjs +93 -82
- package/dist/cjs/Collection.native.js +101 -95
- package/dist/cjs/Collection.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Collection.mjs +64 -55
- package/dist/esm/Collection.mjs.map +1 -1
- package/dist/esm/Collection.native.js +72 -68
- package/dist/esm/Collection.native.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Collection.mjs +64 -55
- package/dist/jsx/Collection.mjs.map +1 -1
- package/dist/jsx/Collection.native.js +101 -95
- package/dist/jsx/Collection.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/package.json +12 -15
- package/dist/cjs/Collection.js +0 -73
- package/dist/cjs/Collection.js.map +0 -6
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/esm/Collection.js +0 -53
- package/dist/esm/Collection.js.map +0 -6
- package/dist/jsx/Collection.js +0 -53
- package/dist/jsx/Collection.js.map +0 -6
package/dist/cjs/Collection.cjs
CHANGED
|
@@ -2,114 +2,125 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
6
|
-
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
32
34
|
var Collection_exports = {};
|
|
33
35
|
__export(Collection_exports, {
|
|
34
36
|
createCollection: () => createCollection
|
|
35
37
|
});
|
|
36
38
|
module.exports = __toCommonJS(Collection_exports);
|
|
37
|
-
var import_compose_refs = require("@tamagui/compose-refs")
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
var import_compose_refs = require("@tamagui/compose-refs");
|
|
40
|
+
var import_constants = require("@tamagui/constants");
|
|
41
|
+
var import_core = require("@tamagui/core");
|
|
42
|
+
var import_react = __toESM(require("react"), 1);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
44
|
function createCollection(name) {
|
|
43
45
|
const {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
46
|
+
Provider: CollectionProviderImpl,
|
|
47
|
+
useStyledContext: useCollectionContext
|
|
48
|
+
} = (0, import_core.createStyledContext)({
|
|
49
|
+
collectionRef: {
|
|
50
|
+
current: void 0
|
|
51
|
+
},
|
|
52
|
+
itemMap: /* @__PURE__ */new Map()
|
|
53
|
+
}, "Toast");
|
|
54
|
+
const CollectionProvider = props => {
|
|
55
|
+
const {
|
|
56
|
+
scope,
|
|
57
|
+
children
|
|
58
|
+
} = props;
|
|
59
|
+
const ref = import_react.default.useRef(void 0);
|
|
60
|
+
const itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
|
|
61
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
|
|
62
|
+
scope,
|
|
63
|
+
itemMap,
|
|
64
|
+
collectionRef: ref,
|
|
65
|
+
children
|
|
66
|
+
});
|
|
67
|
+
};
|
|
66
68
|
CollectionProvider.displayName = "CollectionProvider";
|
|
67
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
69
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
70
|
+
const CollectionSlot = import_react.default.forwardRef((props, forwardedRef) => {
|
|
71
|
+
const {
|
|
72
|
+
scope,
|
|
73
|
+
children
|
|
74
|
+
} = props;
|
|
75
|
+
const context = useCollectionContext(scope);
|
|
76
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
77
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
78
|
+
ref: composedRefs,
|
|
79
|
+
children
|
|
79
80
|
});
|
|
81
|
+
});
|
|
80
82
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
81
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
84
|
+
const ITEM_DATA_ATTR = "data-collection-item";
|
|
85
|
+
const CollectionItemSlot = import_react.default.forwardRef((props, forwardedRef) => {
|
|
86
|
+
const {
|
|
87
|
+
scope,
|
|
88
|
+
children,
|
|
89
|
+
...itemData
|
|
90
|
+
} = props;
|
|
91
|
+
const ref = import_react.default.useRef(void 0);
|
|
92
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
93
|
+
const context = useCollectionContext(scope);
|
|
94
|
+
import_react.default.useEffect(() => {
|
|
95
|
+
context.itemMap.set(ref, {
|
|
93
96
|
ref,
|
|
94
97
|
...itemData
|
|
95
|
-
}), () => {
|
|
96
|
-
context.itemMap.delete(ref);
|
|
97
|
-
})), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
98
|
-
[ITEM_DATA_ATTR]: "",
|
|
99
|
-
ref: composedRefs,
|
|
100
|
-
children
|
|
101
98
|
});
|
|
99
|
+
return () => void context.itemMap.delete(ref);
|
|
100
|
+
});
|
|
101
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
102
|
+
...{
|
|
103
|
+
[ITEM_DATA_ATTR]: ""
|
|
104
|
+
},
|
|
105
|
+
ref: composedRefs,
|
|
106
|
+
children
|
|
102
107
|
});
|
|
108
|
+
});
|
|
103
109
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
104
110
|
function useCollection(scope) {
|
|
105
111
|
const context = useCollectionContext(scope);
|
|
106
|
-
|
|
107
|
-
if (!import_constants.isWeb)
|
|
112
|
+
const getItems = import_react.default.useCallback(() => {
|
|
113
|
+
if (!import_constants.isWeb) {
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
108
116
|
const collectionNode = context.collectionRef.current;
|
|
109
117
|
if (!collectionNode) return [];
|
|
110
118
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
111
|
-
|
|
119
|
+
const items = Array.from(context.itemMap.values());
|
|
120
|
+
const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
|
|
121
|
+
return orderedItems;
|
|
112
122
|
}, [context.collectionRef, context.itemMap]);
|
|
123
|
+
return getItems;
|
|
113
124
|
}
|
|
114
125
|
return [{
|
|
115
126
|
Provider: CollectionProvider,
|
|
@@ -4,120 +4,126 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var Collection_exports = {};
|
|
35
37
|
__export(Collection_exports, {
|
|
36
38
|
createCollection: () => createCollection
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(Collection_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_compose_refs = require("@tamagui/compose-refs");
|
|
43
|
+
var import_constants = require("@tamagui/constants");
|
|
44
|
+
var import_core = require("@tamagui/core");
|
|
45
|
+
var import_react = __toESM(require("react"), 1);
|
|
44
46
|
function createCollection(name) {
|
|
45
47
|
var {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
Provider: CollectionProviderImpl,
|
|
49
|
+
useStyledContext: useCollectionContext
|
|
50
|
+
} = (0, import_core.createStyledContext)({
|
|
51
|
+
collectionRef: {
|
|
52
|
+
current: void 0
|
|
53
|
+
},
|
|
54
|
+
itemMap: /* @__PURE__ */new Map()
|
|
55
|
+
}, "Toast");
|
|
56
|
+
var CollectionProvider = function (props) {
|
|
57
|
+
var {
|
|
58
|
+
scope,
|
|
59
|
+
children
|
|
60
|
+
} = props;
|
|
61
|
+
var ref = import_react.default.useRef(void 0);
|
|
62
|
+
var itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
|
|
63
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
|
|
64
|
+
scope,
|
|
65
|
+
itemMap,
|
|
66
|
+
collectionRef: ref,
|
|
67
|
+
children
|
|
68
|
+
});
|
|
69
|
+
};
|
|
68
70
|
CollectionProvider.displayName = "CollectionProvider";
|
|
69
|
-
var COLLECTION_SLOT_NAME = name + "CollectionSlot"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
71
|
+
var COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
72
|
+
var CollectionSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
|
|
73
|
+
var {
|
|
74
|
+
scope,
|
|
75
|
+
children
|
|
76
|
+
} = props;
|
|
77
|
+
var context = useCollectionContext(scope);
|
|
78
|
+
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
79
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
80
|
+
ref: composedRefs,
|
|
81
|
+
children
|
|
81
82
|
});
|
|
83
|
+
});
|
|
82
84
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
83
|
-
var ITEM_SLOT_NAME = name + "CollectionItemSlot"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}), function () {
|
|
99
|
-
context.itemMap.delete(ref);
|
|
100
|
-
};
|
|
101
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
102
|
-
[ITEM_DATA_ATTR]: "",
|
|
103
|
-
ref: composedRefs,
|
|
104
|
-
children
|
|
85
|
+
var ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
86
|
+
var ITEM_DATA_ATTR = "data-collection-item";
|
|
87
|
+
var CollectionItemSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
|
|
88
|
+
var {
|
|
89
|
+
scope,
|
|
90
|
+
children,
|
|
91
|
+
...itemData
|
|
92
|
+
} = props;
|
|
93
|
+
var ref = import_react.default.useRef(void 0);
|
|
94
|
+
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
95
|
+
var context = useCollectionContext(scope);
|
|
96
|
+
import_react.default.useEffect(function () {
|
|
97
|
+
context.itemMap.set(ref, {
|
|
98
|
+
ref,
|
|
99
|
+
...itemData
|
|
105
100
|
});
|
|
101
|
+
return function () {
|
|
102
|
+
return void context.itemMap.delete(ref);
|
|
103
|
+
};
|
|
106
104
|
});
|
|
105
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
106
|
+
[ITEM_DATA_ATTR]: "",
|
|
107
|
+
ref: composedRefs,
|
|
108
|
+
children
|
|
109
|
+
});
|
|
110
|
+
});
|
|
107
111
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
108
112
|
function useCollection(scope) {
|
|
109
|
-
var context = useCollectionContext(scope)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return
|
|
120
|
-
}
|
|
113
|
+
var context = useCollectionContext(scope);
|
|
114
|
+
var getItems = import_react.default.useCallback(function () {
|
|
115
|
+
if (!import_constants.isWeb) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
var collectionNode = context.collectionRef.current;
|
|
119
|
+
if (!collectionNode) return [];
|
|
120
|
+
var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
121
|
+
var items = Array.from(context.itemMap.values());
|
|
122
|
+
var orderedItems = items.sort(function (a, b) {
|
|
123
|
+
return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
|
|
124
|
+
});
|
|
125
|
+
return orderedItems;
|
|
126
|
+
}, [context.collectionRef, context.itemMap]);
|
|
121
127
|
return getItems;
|
|
122
128
|
}
|
|
123
129
|
return [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Collection_exports","__export","createCollection","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_react","__toESM","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","createStyledContext","collectionRef","current","itemMap","Map","CollectionProvider","props","scope","children","ref","default","useRef","jsx","displayName","COLLECTION_SLOT_NAME","CollectionSlot","forwardRef","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useEffect","set","delete","useCollection","getItems","useCallback","isWeb"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Collection_exports","__export","createCollection","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_react","__toESM","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","createStyledContext","collectionRef","current","itemMap","Map","CollectionProvider","props","scope","children","ref","default","useRef","jsx","displayName","COLLECTION_SLOT_NAME","CollectionSlot","forwardRef","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useEffect","set","delete","useCollection","getItems","useCallback","isWeb","collectionNode"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
|