@tamagui/collection 1.110.4 → 1.111.0
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.native.js +15 -51
- package/dist/cjs/Collection.native.js.map +2 -2
- package/dist/esm/Collection.native.js +15 -51
- package/dist/esm/Collection.native.js.map +2 -2
- package/dist/esm/Collection.native.mjs +92 -0
- package/dist/esm/Collection.native.mjs.map +1 -0
- package/dist/esm/index.native.mjs +2 -0
- package/dist/esm/index.native.mjs.map +1 -0
- package/dist/jsx/Collection.native.js +15 -51
- package/dist/jsx/Collection.native.js.map +2 -2
- package/package.json +9 -9
|
@@ -27,50 +27,14 @@ __export(Collection_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(Collection_exports);
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_react = __toESM(require("react"));
|
|
30
|
-
function _define_property(obj, key, value) {
|
|
31
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
32
|
-
value,
|
|
33
|
-
enumerable: !0,
|
|
34
|
-
configurable: !0,
|
|
35
|
-
writable: !0
|
|
36
|
-
}) : obj[key] = value, obj;
|
|
37
|
-
}
|
|
38
|
-
function _object_spread(target) {
|
|
39
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
40
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
41
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
42
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
43
|
-
}))), ownKeys.forEach(function(key) {
|
|
44
|
-
_define_property(target, key, source[key]);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return target;
|
|
48
|
-
}
|
|
49
|
-
function _object_without_properties(source, excluded) {
|
|
50
|
-
if (source == null) return {};
|
|
51
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
52
|
-
if (Object.getOwnPropertySymbols) {
|
|
53
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
54
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
55
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
56
|
-
}
|
|
57
|
-
return target;
|
|
58
|
-
}
|
|
59
|
-
function _object_without_properties_loose(source, excluded) {
|
|
60
|
-
if (source == null) return {};
|
|
61
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
62
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
63
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
64
|
-
return target;
|
|
65
|
-
}
|
|
66
30
|
function createCollection(name) {
|
|
67
|
-
var
|
|
31
|
+
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core.createStyledContext)({
|
|
68
32
|
collectionRef: {
|
|
69
33
|
current: null
|
|
70
34
|
},
|
|
71
35
|
itemMap: /* @__PURE__ */ new Map()
|
|
72
|
-
}),
|
|
73
|
-
var
|
|
36
|
+
}), CollectionProvider = function(props) {
|
|
37
|
+
var { __scopeCollection, children } = props, ref = import_react.default.useRef(null), itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
74
38
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
|
|
75
39
|
scope: __scopeCollection,
|
|
76
40
|
itemMap,
|
|
@@ -80,7 +44,7 @@ function createCollection(name) {
|
|
|
80
44
|
};
|
|
81
45
|
CollectionProvider.displayName = "CollectionProvider";
|
|
82
46
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react.default.forwardRef(function(props, forwardedRef) {
|
|
83
|
-
var
|
|
47
|
+
var { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
84
48
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
85
49
|
ref: composedRefs,
|
|
86
50
|
children
|
|
@@ -88,19 +52,19 @@ function createCollection(name) {
|
|
|
88
52
|
});
|
|
89
53
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
90
54
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react.default.forwardRef(function(props, forwardedRef) {
|
|
91
|
-
var __scopeCollection = props
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
ref
|
|
98
|
-
}, itemData)), function() {
|
|
55
|
+
var { __scopeCollection, children, ...itemData } = props, ref = import_react.default.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
|
|
56
|
+
return import_react.default.useEffect(function() {
|
|
57
|
+
return context.itemMap.set(ref, {
|
|
58
|
+
ref,
|
|
59
|
+
...itemData
|
|
60
|
+
}), function() {
|
|
99
61
|
return void context.itemMap.delete(ref);
|
|
100
62
|
};
|
|
63
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Slot, {
|
|
64
|
+
[ITEM_DATA_ATTR]: "",
|
|
65
|
+
ref: composedRefs,
|
|
66
|
+
children
|
|
101
67
|
});
|
|
102
|
-
var _obj;
|
|
103
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _define_property(_obj, "children", children), _obj));
|
|
104
68
|
});
|
|
105
69
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
106
70
|
function useCollection(__scopeCollection) {
|
|
@@ -109,7 +73,7 @@ function createCollection(name) {
|
|
|
109
73
|
return [];
|
|
110
74
|
var collectionNode = context.collectionRef.current;
|
|
111
75
|
if (!collectionNode) return [];
|
|
112
|
-
var orderedNodes = Array.from(collectionNode.querySelectorAll(
|
|
76
|
+
var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
|
|
113
77
|
return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
|
|
114
78
|
});
|
|
115
79
|
return orderedItems;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/collection/src/Collection.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,sBAAgC,kCAChC,mBAAsB,+BAEtB,cAA0C,0BAC1C,eAAkB
|
|
5
|
-
"names": ["createCollection", "name", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,sBAAgC,kCAChC,mBAAsB,+BAEtB,cAA0C,0BAC1C,eAAkB;AAWlB,SAASA,iBACPC,MAAY;AAoBZ,MAAM,EAAEC,UAAUC,wBAAwBC,kBAAkBC,qBAAoB,QAC9EC,iCAAkC;IAChCC,eAAe;MAAEC,SAAS;IAAK;IAC/BC,SAAS,oBAAIC,IAAAA;EACf,CAAA,GAEIC,qBAGD,SAACC,OAAAA;AACJ,QAAM,EAAEC,mBAAmBC,SAAQ,IAAKF,OAClCG,MAAMC,aAAAA,QAAMC,OAA0B,IAAA,GACtCR,UAAUO,aAAAA,QAAMC,OAAgC,oBAAIP,IAAAA,CAAAA,EAAOF;AACjE,WACE,uCAAAU,KAACf,wBAAAA;MACCgB,OAAON;MACPJ;MACAF,eAAeQ;;;EAKrB;AAEAJ,qBAAmBS,cAAc;AA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QhB,QAAQqC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAElC,IAAIP,OAAO,IAClCiC,aAAaU,QAAQD,EAAEnC,IAAIP,OAAO;;AAEtC,aAAOuC;IACT,GAAG;MAACtB,QAAQlB;MAAekB,QAAQhB;KAAQ;AAE3C,WAAO4B;EACT;AAEA,SAAO;IACL;MAAEnC,UAAUS;MAAoBiB,MAAMN;MAAgB8B,UAAUrB;IAAmB;IACnFK;;AAEJ;",
|
|
5
|
+
"names": ["createCollection", "name", "Provider", "CollectionProviderImpl", "useStyledContext", "useCollectionContext", "createStyledContext", "collectionRef", "current", "itemMap", "Map", "CollectionProvider", "props", "__scopeCollection", "children", "ref", "React", "useRef", "_jsx", "scope", "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", "orderedNodes", "Array", "from", "querySelectorAll", "items", "values", "orderedItems", "sort", "a", "b", "indexOf", "ItemSlot"]
|
|
6
6
|
}
|
|
@@ -3,50 +3,14 @@ import { useComposedRefs } from "@tamagui/compose-refs";
|
|
|
3
3
|
import { isWeb } from "@tamagui/constants";
|
|
4
4
|
import { Slot, createStyledContext } from "@tamagui/core";
|
|
5
5
|
import React from "react";
|
|
6
|
-
function _define_property(obj, key, value) {
|
|
7
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
8
|
-
value,
|
|
9
|
-
enumerable: !0,
|
|
10
|
-
configurable: !0,
|
|
11
|
-
writable: !0
|
|
12
|
-
}) : obj[key] = value, obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
17
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
-
}))), ownKeys.forEach(function(key) {
|
|
20
|
-
_define_property(target, key, source[key]);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return target;
|
|
24
|
-
}
|
|
25
|
-
function _object_without_properties(source, excluded) {
|
|
26
|
-
if (source == null) return {};
|
|
27
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
28
|
-
if (Object.getOwnPropertySymbols) {
|
|
29
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
30
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
31
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
}
|
|
35
|
-
function _object_without_properties_loose(source, excluded) {
|
|
36
|
-
if (source == null) return {};
|
|
37
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
38
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
39
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
40
|
-
return target;
|
|
41
|
-
}
|
|
42
6
|
function createCollection(name) {
|
|
43
|
-
var
|
|
7
|
+
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext({
|
|
44
8
|
collectionRef: {
|
|
45
9
|
current: null
|
|
46
10
|
},
|
|
47
11
|
itemMap: /* @__PURE__ */ new Map()
|
|
48
|
-
}),
|
|
49
|
-
var
|
|
12
|
+
}), CollectionProvider = function(props) {
|
|
13
|
+
var { __scopeCollection, children } = props, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
50
14
|
return /* @__PURE__ */ _jsx(CollectionProviderImpl, {
|
|
51
15
|
scope: __scopeCollection,
|
|
52
16
|
itemMap,
|
|
@@ -56,7 +20,7 @@ function createCollection(name) {
|
|
|
56
20
|
};
|
|
57
21
|
CollectionProvider.displayName = "CollectionProvider";
|
|
58
22
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
59
|
-
var
|
|
23
|
+
var { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
60
24
|
return /* @__PURE__ */ _jsx(Slot, {
|
|
61
25
|
ref: composedRefs,
|
|
62
26
|
children
|
|
@@ -64,19 +28,19 @@ function createCollection(name) {
|
|
|
64
28
|
});
|
|
65
29
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
66
30
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
67
|
-
var __scopeCollection = props
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ref
|
|
74
|
-
}, itemData)), function() {
|
|
31
|
+
var { __scopeCollection, children, ...itemData } = props, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
|
|
32
|
+
return React.useEffect(function() {
|
|
33
|
+
return context.itemMap.set(ref, {
|
|
34
|
+
ref,
|
|
35
|
+
...itemData
|
|
36
|
+
}), function() {
|
|
75
37
|
return void context.itemMap.delete(ref);
|
|
76
38
|
};
|
|
39
|
+
}), /* @__PURE__ */ _jsx(Slot, {
|
|
40
|
+
[ITEM_DATA_ATTR]: "",
|
|
41
|
+
ref: composedRefs,
|
|
42
|
+
children
|
|
77
43
|
});
|
|
78
|
-
var _obj;
|
|
79
|
-
return /* @__PURE__ */ _jsx(Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _define_property(_obj, "children", children), _obj));
|
|
80
44
|
});
|
|
81
45
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
82
46
|
function useCollection(__scopeCollection) {
|
|
@@ -85,7 +49,7 @@ function createCollection(name) {
|
|
|
85
49
|
return [];
|
|
86
50
|
var collectionNode = context.collectionRef.current;
|
|
87
51
|
if (!collectionNode) return [];
|
|
88
|
-
var orderedNodes = Array.from(collectionNode.querySelectorAll(
|
|
52
|
+
var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
|
|
89
53
|
return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
|
|
90
54
|
});
|
|
91
55
|
return orderedItems;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/collection/src/Collection.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AAEtB,SAASC,MAAMC,2BAA2B;AAC1C,OAAOC,WAAW
|
|
5
|
-
"names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AAEtB,SAASC,MAAMC,2BAA2B;AAC1C,OAAOC,WAAW;AAWlB,SAASC,iBACPC,MAAY;AAoBZ,MAAM,EAAEC,UAAUC,wBAAwBC,kBAAkBC,qBAAoB,IAC9EP,oBAAkC;IAChCQ,eAAe;MAAEC,SAAS;IAAK;IAC/BC,SAAS,oBAAIC,IAAAA;EACf,CAAA,GAEIC,qBAGD,SAACC,OAAAA;AACJ,QAAM,EAAEC,mBAAmBC,SAAQ,IAAKF,OAClCG,MAAMf,MAAMgB,OAA0B,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CAAA;AAC5B,UAAMC,eAAeC,MAAMC,KACzBH,eAAeI,iBAAiB,IAAIb,cAAAA,GAAiB,CAAA,GAEjDc,QAAQH,MAAMC,KAAKf,QAAQd,QAAQgC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAE7B,IAAIP,OAAO,IAClC4B,aAAaU,QAAQD,EAAE9B,IAAIP,OAAO;;AAEtC,aAAOkC;IACT,GAAG;MAACnB,QAAQhB;MAAegB,QAAQd;KAAQ;AAE3C,WAAOwB;EACT;AAEA,SAAO;IACL;MAAE9B,UAAUQ;MAAoBb,MAAMsB;MAAgB2B,UAAUpB;IAAmB;IACnFK;;AAEJ;",
|
|
5
|
+
"names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "Provider", "CollectionProviderImpl", "useStyledContext", "useCollectionContext", "collectionRef", "current", "itemMap", "Map", "CollectionProvider", "props", "__scopeCollection", "children", "ref", "useRef", "scope", "displayName", "COLLECTION_SLOT_NAME", "CollectionSlot", "forwardRef", "forwardedRef", "context", "composedRefs", "ITEM_SLOT_NAME", "ITEM_DATA_ATTR", "CollectionItemSlot", "itemData", "useEffect", "set", "delete", "useCollection", "getItems", "useCallback", "collectionNode", "orderedNodes", "Array", "from", "querySelectorAll", "items", "values", "orderedItems", "sort", "a", "b", "indexOf", "ItemSlot"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
|
+
import { isWeb } from "@tamagui/constants";
|
|
4
|
+
import { Slot, createStyledContext } from "@tamagui/core";
|
|
5
|
+
import React from "react";
|
|
6
|
+
function createCollection(name) {
|
|
7
|
+
var {
|
|
8
|
+
Provider: CollectionProviderImpl,
|
|
9
|
+
useStyledContext: useCollectionContext
|
|
10
|
+
} = createStyledContext({
|
|
11
|
+
collectionRef: {
|
|
12
|
+
current: null
|
|
13
|
+
},
|
|
14
|
+
itemMap: /* @__PURE__ */new Map()
|
|
15
|
+
}),
|
|
16
|
+
CollectionProvider = function (props) {
|
|
17
|
+
var {
|
|
18
|
+
__scopeCollection,
|
|
19
|
+
children
|
|
20
|
+
} = props,
|
|
21
|
+
ref = React.useRef(null),
|
|
22
|
+
itemMap = React.useRef(/* @__PURE__ */new Map()).current;
|
|
23
|
+
return /* @__PURE__ */_jsx(CollectionProviderImpl, {
|
|
24
|
+
scope: __scopeCollection,
|
|
25
|
+
itemMap,
|
|
26
|
+
collectionRef: ref,
|
|
27
|
+
children
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
CollectionProvider.displayName = "CollectionProvider";
|
|
31
|
+
var COLLECTION_SLOT_NAME = name + "CollectionSlot",
|
|
32
|
+
CollectionSlot = /* @__PURE__ */React.forwardRef(function (props, forwardedRef) {
|
|
33
|
+
var {
|
|
34
|
+
__scopeCollection,
|
|
35
|
+
children
|
|
36
|
+
} = props,
|
|
37
|
+
context = useCollectionContext(__scopeCollection),
|
|
38
|
+
composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
39
|
+
return /* @__PURE__ */_jsx(Slot, {
|
|
40
|
+
ref: composedRefs,
|
|
41
|
+
children
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
45
|
+
var ITEM_SLOT_NAME = name + "CollectionItemSlot",
|
|
46
|
+
ITEM_DATA_ATTR = "data-collection-item",
|
|
47
|
+
CollectionItemSlot = /* @__PURE__ */React.forwardRef(function (props, forwardedRef) {
|
|
48
|
+
var {
|
|
49
|
+
__scopeCollection,
|
|
50
|
+
children,
|
|
51
|
+
...itemData
|
|
52
|
+
} = props,
|
|
53
|
+
ref = React.useRef(null),
|
|
54
|
+
composedRefs = useComposedRefs(forwardedRef, ref),
|
|
55
|
+
context = useCollectionContext(__scopeCollection);
|
|
56
|
+
return React.useEffect(function () {
|
|
57
|
+
return context.itemMap.set(ref, {
|
|
58
|
+
ref,
|
|
59
|
+
...itemData
|
|
60
|
+
}), function () {
|
|
61
|
+
return void context.itemMap.delete(ref);
|
|
62
|
+
};
|
|
63
|
+
}), /* @__PURE__ */_jsx(Slot, {
|
|
64
|
+
[ITEM_DATA_ATTR]: "",
|
|
65
|
+
ref: composedRefs,
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
70
|
+
function useCollection(__scopeCollection) {
|
|
71
|
+
var context = useCollectionContext(__scopeCollection),
|
|
72
|
+
getItems = React.useCallback(function () {
|
|
73
|
+
if (!isWeb) return [];
|
|
74
|
+
var collectionNode = context.collectionRef.current;
|
|
75
|
+
if (!collectionNode) return [];
|
|
76
|
+
var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)),
|
|
77
|
+
items = Array.from(context.itemMap.values()),
|
|
78
|
+
orderedItems = items.sort(function (a, b) {
|
|
79
|
+
return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
|
|
80
|
+
});
|
|
81
|
+
return orderedItems;
|
|
82
|
+
}, [context.collectionRef, context.itemMap]);
|
|
83
|
+
return getItems;
|
|
84
|
+
}
|
|
85
|
+
return [{
|
|
86
|
+
Provider: CollectionProvider,
|
|
87
|
+
Slot: CollectionSlot,
|
|
88
|
+
ItemSlot: CollectionItemSlot
|
|
89
|
+
}, useCollection];
|
|
90
|
+
}
|
|
91
|
+
export { createCollection };
|
|
92
|
+
//# sourceMappingURL=Collection.native.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","useComposedRefs","isWeb","Slot","createStyledContext","React","createCollection","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","collectionRef","current","itemMap","Map","CollectionProvider","props","__scopeCollection","children","ref","useRef","scope","displayName","COLLECTION_SLOT_NAME","CollectionSlot","forwardRef","forwardedRef","context","composedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useEffect","set","delete","useCollection","getItems","useCallback","collectionNode","orderedNodes","Array","from","querySelectorAll","items","values","orderedItems","sort","a","b"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,2BAAuB;AAChC,SAASC,eAAa;AAEtB,SAASC,KAAA,QAAM,oBAA2B;AAC1C,SAAOC,IAAA,EAAAC,mBAAW;AA8CZ,OAAAC,KAAA;AAnCN,SAASC,iBACPC,IAAA,EACA;EAmBA;MAAMC,QAAE,EAAAC,sBAAU;MAAAC,gBAAwB,EAAAC;IAAkB,IAAqBP,mBAC/E;MACEQ,aAAA,EAAe;QACfC,OAAS;MACV;MAMDC,OAAM,EAAE,mBAAmBC,GAAA;IAG3B;IAAAC,kBACE,YAAAA,CAAAC,KAAA;MAAA,IAAC;UAAAC,iBAAA;UAAAC;QAAA,IAAAF,KAAA;QAAAG,GAAA,GAAAf,KAAA,CAAAgB,MAAA;QAAAP,OAAA,GAAAT,KAAA,CAAAgB,MAAA,oBAAAN,GAAA,IAAAF,OAAA;MAAA,sBAAAb,IAAA,CAAAS,sBAAA;QAAAa,KACC,EAAAJ,iBAAO;QAAAJ,OACP;QAAAF,aACA,EAAAQ,GAAe;QAAAD;MAEd;IAAA;EAGPH,kBAAA,CAAAO,WAAA;EAEA,IAAAC,oBAAmB,GAAAjB,IAAA,GAAc;IAAAkB,cAAA,kBAAApB,KAAA,CAAAqB,UAAA,WAAAT,KAAA,EAAAU,YAAA;MAMjC,IAAM;UAAAT,iBAAA;UAAAC;QAA8B,IAAAF,KAAA;QAAAW,OAE9B,GAAAjB,oBAAuB,CAAAO,iBAG1B,CAAO;QAAAW,YAAA,GAAiB5B,eAAA,CAAA0B,YAAA,EAAAC,OAAA,CAAAhB,aAAA;MACzB,OAAM,eAAEZ,IAAmB,CAAAG,IAA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A;UAAAC,YAAA,GAAAF,KAAA,CAAAG,IAAA,WAAAC,CAAA,EAAAC,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -3,50 +3,14 @@ import { useComposedRefs } from "@tamagui/compose-refs";
|
|
|
3
3
|
import { isWeb } from "@tamagui/constants";
|
|
4
4
|
import { Slot, createStyledContext } from "@tamagui/core";
|
|
5
5
|
import React from "react";
|
|
6
|
-
function _define_property(obj, key, value) {
|
|
7
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
8
|
-
value,
|
|
9
|
-
enumerable: !0,
|
|
10
|
-
configurable: !0,
|
|
11
|
-
writable: !0
|
|
12
|
-
}) : obj[key] = value, obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
17
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
18
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
19
|
-
}))), ownKeys.forEach(function(key) {
|
|
20
|
-
_define_property(target, key, source[key]);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return target;
|
|
24
|
-
}
|
|
25
|
-
function _object_without_properties(source, excluded) {
|
|
26
|
-
if (source == null) return {};
|
|
27
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
28
|
-
if (Object.getOwnPropertySymbols) {
|
|
29
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
30
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
31
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
}
|
|
35
|
-
function _object_without_properties_loose(source, excluded) {
|
|
36
|
-
if (source == null) return {};
|
|
37
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
38
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
39
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
40
|
-
return target;
|
|
41
|
-
}
|
|
42
6
|
function createCollection(name) {
|
|
43
|
-
var
|
|
7
|
+
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext({
|
|
44
8
|
collectionRef: {
|
|
45
9
|
current: null
|
|
46
10
|
},
|
|
47
11
|
itemMap: /* @__PURE__ */ new Map()
|
|
48
|
-
}),
|
|
49
|
-
var
|
|
12
|
+
}), CollectionProvider = function(props) {
|
|
13
|
+
var { __scopeCollection, children } = props, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
50
14
|
return /* @__PURE__ */ _jsx(CollectionProviderImpl, {
|
|
51
15
|
scope: __scopeCollection,
|
|
52
16
|
itemMap,
|
|
@@ -56,7 +20,7 @@ function createCollection(name) {
|
|
|
56
20
|
};
|
|
57
21
|
CollectionProvider.displayName = "CollectionProvider";
|
|
58
22
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
59
|
-
var
|
|
23
|
+
var { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
60
24
|
return /* @__PURE__ */ _jsx(Slot, {
|
|
61
25
|
ref: composedRefs,
|
|
62
26
|
children
|
|
@@ -64,19 +28,19 @@ function createCollection(name) {
|
|
|
64
28
|
});
|
|
65
29
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
66
30
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
67
|
-
var __scopeCollection = props
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ref
|
|
74
|
-
}, itemData)), function() {
|
|
31
|
+
var { __scopeCollection, children, ...itemData } = props, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
|
|
32
|
+
return React.useEffect(function() {
|
|
33
|
+
return context.itemMap.set(ref, {
|
|
34
|
+
ref,
|
|
35
|
+
...itemData
|
|
36
|
+
}), function() {
|
|
75
37
|
return void context.itemMap.delete(ref);
|
|
76
38
|
};
|
|
39
|
+
}), /* @__PURE__ */ _jsx(Slot, {
|
|
40
|
+
[ITEM_DATA_ATTR]: "",
|
|
41
|
+
ref: composedRefs,
|
|
42
|
+
children
|
|
77
43
|
});
|
|
78
|
-
var _obj;
|
|
79
|
-
return /* @__PURE__ */ _jsx(Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _define_property(_obj, "children", children), _obj));
|
|
80
44
|
});
|
|
81
45
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
82
46
|
function useCollection(__scopeCollection) {
|
|
@@ -85,7 +49,7 @@ function createCollection(name) {
|
|
|
85
49
|
return [];
|
|
86
50
|
var collectionNode = context.collectionRef.current;
|
|
87
51
|
if (!collectionNode) return [];
|
|
88
|
-
var orderedNodes = Array.from(collectionNode.querySelectorAll(
|
|
52
|
+
var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
|
|
89
53
|
return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
|
|
90
54
|
});
|
|
91
55
|
return orderedItems;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/collection/src/Collection.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AAEtB,SAASC,MAAMC,2BAA2B;AAC1C,OAAOC,WAAW
|
|
5
|
-
"names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AAEtB,SAASC,MAAMC,2BAA2B;AAC1C,OAAOC,WAAW;AAWlB,SAASC,iBACPC,MAAY;AAoBZ,MAAM,EAAEC,UAAUC,wBAAwBC,kBAAkBC,qBAAoB,IAC9EP,oBAAkC;IAChCQ,eAAe;MAAEC,SAAS;IAAK;IAC/BC,SAAS,oBAAIC,IAAAA;EACf,CAAA,GAEIC,qBAGD,SAACC,OAAAA;AACJ,QAAM,EAAEC,mBAAmBC,SAAQ,IAAKF,OAClCG,MAAMf,MAAMgB,OAA0B,IAAA,GACtCP,UAAUT,MAAMgB,OAAgC,oBAAIN,IAAAA,CAAAA,EAAOF;AACjE,WACE,qBAACJ,wBAAAA;MACCa,OAAOJ;MACPJ;MACAF,eAAeQ;;;EAKrB;AAEAJ,qBAAmBO,cAAc;AAMjC,MAAMC,uBAAuBjB,OAAO,kBAE9BkB,iBAAiBpB,sBAAMqB,WAG3B,SAACT,OAAOU,cAAAA;AACR,QAAM,EAAET,mBAAmBC,SAAQ,IAAKF,OAClCW,UAAUjB,qBAAqBO,iBAAAA,GAC/BW,eAAe5B,gBAAgB0B,cAAcC,QAAQhB,aAAa;AACxE,WAAO,qBAACT,MAAAA;MAAKiB,KAAKS;;;EACpB,CAAA;AAEAJ,iBAAeF,cAAcC;AAM7B,MAAMM,iBAAiBvB,OAAO,sBACxBwB,iBAAiB,wBAMjBC,qBAAqB3B,sBAAMqB,WAG/B,SAACT,OAAOU,cAAAA;AACR,QAAM,EAAET,mBAAmBC,UAAU,GAAGc,SAAAA,IAAahB,OAC/CG,MAAMf,MAAMgB,OAAoB,IAAA,GAChCQ,eAAe5B,gBAAgB0B,cAAcP,GAAAA,GAC7CQ,UAAUjB,qBAAqBO,iBAAAA;AAErCb,iBAAM6B,UAAU,WAAA;AACdN,qBAAQd,QAAQqB,IAAIf,KAAK;QAAEA;QAAK,GAAIa;MAAiC,CAAA,GAC9D,WAAA;eAAM,KAAKL,QAAQd,QAAQsB,OAAOhB,GAAAA;;IAC3C,CAAA,GAGE,qBAACjB,MAAAA;MAAW,CAAC4B,cAAAA,GAAiB;MAAMX,KAAKS;;;EAI7C,CAAA;AAEAG,qBAAmBT,cAAcO;AAMjC,WAASO,cAAcnB,mBAAsB;AAC3C,QAAMU,UAAUjB,qBAAqBO,iBAAAA,GAE/BoB,WAAWjC,MAAMkC,YAAY,WAAA;AACjC,UAAI,CAACrC;AACH,eAAO,CAAA;AAGT,UAAMsC,iBAAiBZ,QAAQhB,cAAcC;AAC7C,UAAI,CAAC2B,eAAgB,QAAO,CAAA;AAC5B,UAAMC,eAAeC,MAAMC,KACzBH,eAAeI,iBAAiB,IAAIb,cAAAA,GAAiB,CAAA,GAEjDc,QAAQH,MAAMC,KAAKf,QAAQd,QAAQgC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAE7B,IAAIP,OAAO,IAClC4B,aAAaU,QAAQD,EAAE9B,IAAIP,OAAO;;AAEtC,aAAOkC;IACT,GAAG;MAACnB,QAAQhB;MAAegB,QAAQd;KAAQ;AAE3C,WAAOwB;EACT;AAEA,SAAO;IACL;MAAE9B,UAAUQ;MAAoBb,MAAMsB;MAAgB2B,UAAUpB;IAAmB;IACnFK;;AAEJ;",
|
|
5
|
+
"names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "Provider", "CollectionProviderImpl", "useStyledContext", "useCollectionContext", "collectionRef", "current", "itemMap", "Map", "CollectionProvider", "props", "__scopeCollection", "children", "ref", "useRef", "scope", "displayName", "COLLECTION_SLOT_NAME", "CollectionSlot", "forwardRef", "forwardedRef", "context", "composedRefs", "ITEM_SLOT_NAME", "ITEM_DATA_ATTR", "CollectionItemSlot", "itemData", "useEffect", "set", "delete", "useCollection", "getItems", "useCallback", "collectionNode", "orderedNodes", "Array", "from", "querySelectorAll", "items", "values", "orderedItems", "sort", "a", "b", "indexOf", "ItemSlot"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/collection",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/compose-refs": "1.
|
|
37
|
-
"@tamagui/constants": "1.
|
|
38
|
-
"@tamagui/core": "1.
|
|
39
|
-
"@tamagui/create-context": "1.
|
|
40
|
-
"@tamagui/polyfill-dev": "1.
|
|
41
|
-
"@tamagui/stacks": "1.
|
|
42
|
-
"@tamagui/use-controllable-state": "1.
|
|
36
|
+
"@tamagui/compose-refs": "1.111.0",
|
|
37
|
+
"@tamagui/constants": "1.111.0",
|
|
38
|
+
"@tamagui/core": "1.111.0",
|
|
39
|
+
"@tamagui/create-context": "1.111.0",
|
|
40
|
+
"@tamagui/polyfill-dev": "1.111.0",
|
|
41
|
+
"@tamagui/stacks": "1.111.0",
|
|
42
|
+
"@tamagui/use-controllable-state": "1.111.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "1.
|
|
45
|
+
"@tamagui/build": "1.111.0",
|
|
46
46
|
"react": "^18.2.0 || ^19.0.0"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|