@tamagui/collection 1.89.26 → 1.89.27-1708113113238

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,52 +26,106 @@ __export(Collection_exports, {
26
26
  createCollection: () => createCollection
27
27
  });
28
28
  module.exports = __toCommonJS(Collection_exports);
29
- var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_react = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
29
+ var 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)
51
+ return {};
52
+ var target = _object_without_properties_loose(source, excluded), key, i;
53
+ if (Object.getOwnPropertySymbols) {
54
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
55
+ for (i = 0; i < sourceSymbolKeys.length; i++)
56
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
57
+ }
58
+ return target;
59
+ }
60
+ function _object_without_properties_loose(source, excluded) {
61
+ if (source == null)
62
+ return {};
63
+ var target = {}, sourceKeys = Object.keys(source), key, i;
64
+ for (i = 0; i < sourceKeys.length; i++)
65
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
66
+ return target;
67
+ }
30
68
  function createCollection(name) {
31
- const { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core.createStyledContext)({
32
- collectionRef: { current: null },
69
+ var _createStyledContext = (0, import_core.createStyledContext)({
70
+ collectionRef: {
71
+ current: null
72
+ },
33
73
  itemMap: /* @__PURE__ */ new Map()
34
- }), CollectionProvider = (props) => {
35
- const { __scopeCollection, children } = props, ref = import_react.default.useRef(null), itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
36
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
- CollectionProviderImpl,
38
- {
39
- scope: __scopeCollection,
40
- itemMap,
41
- collectionRef: ref,
42
- children
43
- }
44
- );
74
+ }), CollectionProviderImpl = _createStyledContext.Provider, useCollectionContext = _createStyledContext.useStyledContext, CollectionProvider = function(props) {
75
+ var __scopeCollection = props.__scopeCollection, children = props.children, ref = import_react.default.useRef(null), itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
76
+ return /* @__PURE__ */ import_react.default.createElement(CollectionProviderImpl, {
77
+ scope: __scopeCollection,
78
+ itemMap,
79
+ collectionRef: ref
80
+ }, children);
45
81
  };
46
82
  CollectionProvider.displayName = "CollectionProvider";
47
- const COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = import_react.default.forwardRef((props, forwardedRef) => {
48
- const { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Slot, { ref: composedRefs, children });
83
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react.default.forwardRef(function(props, forwardedRef) {
84
+ var __scopeCollection = props.__scopeCollection, children = props.children, context = useCollectionContext(__scopeCollection), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
85
+ return /* @__PURE__ */ import_react.default.createElement(import_core.Slot, {
86
+ ref: composedRefs
87
+ }, children);
50
88
  });
51
89
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
52
- const ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = import_react.default.forwardRef((props, forwardedRef) => {
53
- const { __scopeCollection, children, ...itemData } = props, ref = import_react.default.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
54
- return import_react.default.useEffect(() => (context.itemMap.set(ref, { ref, ...itemData }), () => void context.itemMap.delete(ref))), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Slot, { [ITEM_DATA_ATTR]: "", ref: composedRefs, children });
90
+ 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.__scopeCollection, children = props.children, itemData = _object_without_properties(props, [
92
+ "__scopeCollection",
93
+ "children"
94
+ ]), ref = import_react.default.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
95
+ import_react.default.useEffect(function() {
96
+ return context.itemMap.set(ref, _object_spread({
97
+ ref
98
+ }, itemData)), function() {
99
+ return void context.itemMap.delete(ref);
100
+ };
101
+ });
102
+ var _obj;
103
+ return /* @__PURE__ */ import_react.default.createElement(import_core.Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _obj), children);
55
104
  });
56
105
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
57
106
  function useCollection(__scopeCollection) {
58
- const context = useCollectionContext(__scopeCollection);
59
- return import_react.default.useCallback(() => {
107
+ var context = useCollectionContext(__scopeCollection), getItems = import_react.default.useCallback(function() {
60
108
  if (!import_constants.isWeb)
61
109
  return [];
62
- const collectionNode = context.collectionRef.current;
110
+ var collectionNode = context.collectionRef.current;
63
111
  if (!collectionNode)
64
112
  return [];
65
- const orderedNodes = Array.from(
66
- collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)
67
- );
68
- return Array.from(context.itemMap.values()).sort(
69
- (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
70
- );
71
- }, [context.collectionRef, context.itemMap]);
113
+ var orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]"))), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
114
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
115
+ });
116
+ return orderedItems;
117
+ }, [
118
+ context.collectionRef,
119
+ context.itemMap
120
+ ]);
121
+ return getItems;
72
122
  }
73
123
  return [
74
- { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
124
+ {
125
+ Provider: CollectionProvider,
126
+ Slot: CollectionSlot,
127
+ ItemSlot: CollectionItemSlot
128
+ },
75
129
  useCollection
76
130
  ];
77
131
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Collection.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgC,kCAChC,mBAAsB,+BAEtB,cAA0C,0BAC1C,eAAkB,2BA8CZ;AAnCN,SAAS,iBACP,MACA;AAmBA,QAAM,EAAE,UAAU,wBAAwB,kBAAkB,qBAAqB,QAC/E,iCAAkC;AAAA,IAChC,eAAe,EAAE,SAAS,KAAK;AAAA,IAC/B,SAAS,oBAAI,IAAI;AAAA,EACnB,CAAC,GAEG,qBAGD,CAAC,UAAU;AACd,UAAM,EAAE,mBAAmB,SAAS,IAAI,OAClC,MAAM,aA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,GAE/Ce,QAAQH,MAAMC,KAAKlB,QAAQnB,QAAQwC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAEjC,IAAIX,OAAO,IAClCoC,aAAaU,QAAQD,EAAElC,IAAIX,OAAO;;AAEtC,aAAO0C;IACT,GAAG;MAACtB,QAAQrB;MAAeqB,QAAQnB;KAAQ;AAE3C,WAAO+B;EACT;AAEA,SAAO;IACL;MAAE5B,UAAUG;MAAoBgB,MAAMN;MAAgB8B,UAAUrB;IAAmB;IACnFK;;AAEJ;",
5
+ "names": ["createCollection", "name", "createStyledContext", "collectionRef", "current", "itemMap", "Map", "CollectionProviderImpl", "Provider", "useCollectionContext", "useStyledContext", "CollectionProvider", "props", "__scopeCollection", "children", "ref", "React", "useRef", "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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yBAAd;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/collection/src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;;wBAAc,yBAAd;",
5
5
  "names": []
6
6
  }
@@ -2,52 +2,105 @@ import { useComposedRefs } from "@tamagui/compose-refs";
2
2
  import { isWeb } from "@tamagui/constants";
3
3
  import { Slot, createStyledContext } from "@tamagui/core";
4
4
  import React from "react";
5
- import { jsx } from "react/jsx-runtime";
5
+ function _define_property(obj, key, value) {
6
+ return key in obj ? Object.defineProperty(obj, key, {
7
+ value,
8
+ enumerable: !0,
9
+ configurable: !0,
10
+ writable: !0
11
+ }) : obj[key] = value, obj;
12
+ }
13
+ function _object_spread(target) {
14
+ for (var i = 1; i < arguments.length; i++) {
15
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
16
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
17
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
18
+ }))), ownKeys.forEach(function(key) {
19
+ _define_property(target, key, source[key]);
20
+ });
21
+ }
22
+ return target;
23
+ }
24
+ function _object_without_properties(source, excluded) {
25
+ if (source == null)
26
+ 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)
37
+ return {};
38
+ var target = {}, sourceKeys = Object.keys(source), key, i;
39
+ for (i = 0; i < sourceKeys.length; i++)
40
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
41
+ return target;
42
+ }
6
43
  function createCollection(name) {
7
- const { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext({
8
- collectionRef: { current: null },
44
+ var _createStyledContext = createStyledContext({
45
+ collectionRef: {
46
+ current: null
47
+ },
9
48
  itemMap: /* @__PURE__ */ new Map()
10
- }), CollectionProvider = (props) => {
11
- const { __scopeCollection, children } = props, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ jsx(
13
- CollectionProviderImpl,
14
- {
15
- scope: __scopeCollection,
16
- itemMap,
17
- collectionRef: ref,
18
- children
19
- }
20
- );
49
+ }), CollectionProviderImpl = _createStyledContext.Provider, useCollectionContext = _createStyledContext.useStyledContext, CollectionProvider = function(props) {
50
+ var __scopeCollection = props.__scopeCollection, children = props.children, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
51
+ return /* @__PURE__ */ React.createElement(CollectionProviderImpl, {
52
+ scope: __scopeCollection,
53
+ itemMap,
54
+ collectionRef: ref
55
+ }, children);
21
56
  };
22
57
  CollectionProvider.displayName = "CollectionProvider";
23
- const COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = React.forwardRef((props, forwardedRef) => {
24
- const { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
25
- return /* @__PURE__ */ jsx(Slot, { ref: composedRefs, children });
58
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
59
+ var __scopeCollection = props.__scopeCollection, children = props.children, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
60
+ return /* @__PURE__ */ React.createElement(Slot, {
61
+ ref: composedRefs
62
+ }, children);
26
63
  });
27
64
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
28
- const ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = React.forwardRef((props, forwardedRef) => {
29
- const { __scopeCollection, children, ...itemData } = props, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
30
- return React.useEffect(() => (context.itemMap.set(ref, { ref, ...itemData }), () => void context.itemMap.delete(ref))), /* @__PURE__ */ jsx(Slot, { [ITEM_DATA_ATTR]: "", ref: composedRefs, children });
65
+ var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
66
+ var __scopeCollection = props.__scopeCollection, children = props.children, itemData = _object_without_properties(props, [
67
+ "__scopeCollection",
68
+ "children"
69
+ ]), ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
70
+ React.useEffect(function() {
71
+ return context.itemMap.set(ref, _object_spread({
72
+ ref
73
+ }, itemData)), function() {
74
+ return void context.itemMap.delete(ref);
75
+ };
76
+ });
77
+ var _obj;
78
+ return /* @__PURE__ */ React.createElement(Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _obj), children);
31
79
  });
32
80
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
33
81
  function useCollection(__scopeCollection) {
34
- const context = useCollectionContext(__scopeCollection);
35
- return React.useCallback(() => {
82
+ var context = useCollectionContext(__scopeCollection), getItems = React.useCallback(function() {
36
83
  if (!isWeb)
37
84
  return [];
38
- const collectionNode = context.collectionRef.current;
85
+ var collectionNode = context.collectionRef.current;
39
86
  if (!collectionNode)
40
87
  return [];
41
- const orderedNodes = Array.from(
42
- collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)
43
- );
44
- return Array.from(context.itemMap.values()).sort(
45
- (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
46
- );
47
- }, [context.collectionRef, context.itemMap]);
88
+ var orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]"))), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
89
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
90
+ });
91
+ return orderedItems;
92
+ }, [
93
+ context.collectionRef,
94
+ context.itemMap
95
+ ]);
96
+ return getItems;
48
97
  }
49
98
  return [
50
- { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
99
+ {
100
+ Provider: CollectionProvider,
101
+ Slot: CollectionSlot,
102
+ ItemSlot: CollectionItemSlot
103
+ },
51
104
  useCollection
52
105
  ];
53
106
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Collection.tsx"],
4
- "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,aAAa;AAEtB,SAAS,MAAM,2BAA2B;AAC1C,OAAO,WAAW;AA8CZ;AAnCN,SAAS,iBACP,MACA;AAmBA,QAAM,EAAE,UAAU,wBAAwB,kBAAkB,qBAAqB,IAC/E,oBAAkC;AAAA,IAChC,eAAe,EAAE,SAAS,KAAK;AAAA,IAC/B,SAAS,oBAAI,IAAI;AAAA,EACnB,CAAC,GAEG,qBAGD,CAAC,UAAU;AACd,UAAM,EAAE,mBAAmB,SAAS,IAAI,OAClC,MAAM,MAAM,OAA0B,IAAI,GAC1C,UAAU,MAAM,OAAgC,oBAAI,IAAI,CAAC,EAAE;AACjE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP;AAAA,QACA,eAAe;AAAA,QAEd;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,qBAAmB,cAAc;AAMjC,QAAM,uBAAuB,OAAO,kBAE9B,iBAAiB,MAAM,WAG3B,CAAC,OAAO,iBAAiB;AACzB,UAAM,EAAE,mBAAmB,SAAS,IAAI,OAClC,UAAU,qBAAqB,iBAAiB,GAChD,eAAe,gBAAgB,cAAc,QAAQ,aAAa;AACxE,WAAO,oBAAC,QAAK,KAAK,cAAe,UAAS;AAAA,EAC5C,CAAC;AAED,iBAAe,cAAc;AAM7B,QAAM,iBAAiB,OAAO,sBACxB,iBAAiB,wBAMjB,qBAAqB,MAAM,WAG/B,CAAC,OAAO,iBAAiB;AACzB,UAAM,EAAE,mBAAmB,UAAU,GAAG,SAAS,IAAI,OAC/C,MAAM,MAAM,OAAoB,IAAI,GACpC,eAAe,gBAAgB,cAAc,GAAG,GAChD,UAAU,qBAAqB,iBAAiB;AAEtD,iBAAM,U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A,GAAAA,OACtCV,QAAAA;EAGP,CAAA;AAEAa,qBAAmBT,cAAcO;AAMjC,WAASO,cAAcnB,mBAAsB;AAC3C,QAAMU,UAAUd,qBAAqBI,iBAAAA,GAE/BoB,WAAWjC,MAAMkC,YAAY,WAAA;AACjC,UAAI,CAACrC;AACH,eAAO,CAAA;AAGT,UAAMsC,iBAAiBZ,QAAQpB,cAAcC;AAC7C,UAAI,CAAC+B;AAAgB,eAAO,CAAA;AAC5B,UAAMC,eAAeC,MAAMC,KACzBH,eAAeI,iBAAkB,IAAkB,OAAfb,gBAAe,GAAA,CAAA,CAAA,GAE/Cc,QAAQH,MAAMC,KAAKf,QAAQlB,QAAQoC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAE7B,IAAIX,OAAO,IAClCgC,aAAaU,QAAQD,EAAE9B,IAAIX,OAAO;;AAEtC,aAAOsC;IACT,GAAG;MAACnB,QAAQpB;MAAeoB,QAAQlB;KAAQ;AAE3C,WAAO4B;EACT;AAEA,SAAO;IACL;MAAEzB,UAAUG;MAAoBb,MAAMsB;MAAgB2B,UAAUpB;IAAmB;IACnFK;;AAEJ;",
5
+ "names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "collectionRef", "current", "itemMap", "Map", "CollectionProviderImpl", "Provider", "useCollectionContext", "useStyledContext", "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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts"],
3
+ "sources": ["../../src/Users/n8/tamagui/packages/collection/src/index.ts"],
4
4
  "mappings": "AAAA,cAAc;",
5
5
  "names": []
6
6
  }
@@ -2,52 +2,105 @@ import { useComposedRefs } from "@tamagui/compose-refs";
2
2
  import { isWeb } from "@tamagui/constants";
3
3
  import { Slot, createStyledContext } from "@tamagui/core";
4
4
  import React from "react";
5
- import { jsx } from "react/jsx-runtime";
5
+ function _define_property(obj, key, value) {
6
+ return key in obj ? Object.defineProperty(obj, key, {
7
+ value,
8
+ enumerable: !0,
9
+ configurable: !0,
10
+ writable: !0
11
+ }) : obj[key] = value, obj;
12
+ }
13
+ function _object_spread(target) {
14
+ for (var i = 1; i < arguments.length; i++) {
15
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
16
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
17
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
18
+ }))), ownKeys.forEach(function(key) {
19
+ _define_property(target, key, source[key]);
20
+ });
21
+ }
22
+ return target;
23
+ }
24
+ function _object_without_properties(source, excluded) {
25
+ if (source == null)
26
+ 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)
37
+ return {};
38
+ var target = {}, sourceKeys = Object.keys(source), key, i;
39
+ for (i = 0; i < sourceKeys.length; i++)
40
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
41
+ return target;
42
+ }
6
43
  function createCollection(name) {
7
- const { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext({
8
- collectionRef: { current: null },
44
+ var _createStyledContext = createStyledContext({
45
+ collectionRef: {
46
+ current: null
47
+ },
9
48
  itemMap: /* @__PURE__ */ new Map()
10
- }), CollectionProvider = (props) => {
11
- const { __scopeCollection, children } = props, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ jsx(
13
- CollectionProviderImpl,
14
- {
15
- scope: __scopeCollection,
16
- itemMap,
17
- collectionRef: ref,
18
- children
19
- }
20
- );
49
+ }), CollectionProviderImpl = _createStyledContext.Provider, useCollectionContext = _createStyledContext.useStyledContext, CollectionProvider = function(props) {
50
+ var __scopeCollection = props.__scopeCollection, children = props.children, ref = React.useRef(null), itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
51
+ return /* @__PURE__ */ React.createElement(CollectionProviderImpl, {
52
+ scope: __scopeCollection,
53
+ itemMap,
54
+ collectionRef: ref
55
+ }, children);
21
56
  };
22
57
  CollectionProvider.displayName = "CollectionProvider";
23
- const COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = React.forwardRef((props, forwardedRef) => {
24
- const { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
25
- return /* @__PURE__ */ jsx(Slot, { ref: composedRefs, children });
58
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
59
+ var __scopeCollection = props.__scopeCollection, children = props.children, context = useCollectionContext(__scopeCollection), composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
60
+ return /* @__PURE__ */ React.createElement(Slot, {
61
+ ref: composedRefs
62
+ }, children);
26
63
  });
27
64
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
28
- const ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = React.forwardRef((props, forwardedRef) => {
29
- const { __scopeCollection, children, ...itemData } = props, ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
30
- return React.useEffect(() => (context.itemMap.set(ref, { ref, ...itemData }), () => void context.itemMap.delete(ref))), /* @__PURE__ */ jsx(Slot, { [ITEM_DATA_ATTR]: "", ref: composedRefs, children });
65
+ var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
66
+ var __scopeCollection = props.__scopeCollection, children = props.children, itemData = _object_without_properties(props, [
67
+ "__scopeCollection",
68
+ "children"
69
+ ]), ref = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
70
+ React.useEffect(function() {
71
+ return context.itemMap.set(ref, _object_spread({
72
+ ref
73
+ }, itemData)), function() {
74
+ return void context.itemMap.delete(ref);
75
+ };
76
+ });
77
+ var _obj;
78
+ return /* @__PURE__ */ React.createElement(Slot, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _obj), children);
31
79
  });
32
80
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
33
81
  function useCollection(__scopeCollection) {
34
- const context = useCollectionContext(__scopeCollection);
35
- return React.useCallback(() => {
82
+ var context = useCollectionContext(__scopeCollection), getItems = React.useCallback(function() {
36
83
  if (!isWeb)
37
84
  return [];
38
- const collectionNode = context.collectionRef.current;
85
+ var collectionNode = context.collectionRef.current;
39
86
  if (!collectionNode)
40
87
  return [];
41
- const orderedNodes = Array.from(
42
- collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)
43
- );
44
- return Array.from(context.itemMap.values()).sort(
45
- (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
46
- );
47
- }, [context.collectionRef, context.itemMap]);
88
+ var orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]"))), items = Array.from(context.itemMap.values()), orderedItems = items.sort(function(a, b) {
89
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
90
+ });
91
+ return orderedItems;
92
+ }, [
93
+ context.collectionRef,
94
+ context.itemMap
95
+ ]);
96
+ return getItems;
48
97
  }
49
98
  return [
50
- { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
99
+ {
100
+ Provider: CollectionProvider,
101
+ Slot: CollectionSlot,
102
+ ItemSlot: CollectionItemSlot
103
+ },
51
104
  useCollection
52
105
  ];
53
106
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Collection.tsx"],
4
- "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,aAAa;AAEtB,SAAS,MAAM,2BAA2B;AAC1C,OAAO,WAAW;AA8CZ;AAnCN,SAAS,iBACP,MACA;AAmBA,QAAM,EAAE,UAAU,wBAAwB,kBAAkB,qBAAqB,IAC/E,oBAAkC;AAAA,IAChC,eAAe,EAAE,SAAS,KAAK;AAAA,IAC/B,SAAS,oBAAI,IAAI;AAAA,EACnB,CAAC,GAEG,qBAGD,CAAC,UAAU;AACd,UAAM,EAAE,mBAAmB,SAAS,IAAI,OAClC,MAAM,MAAM,OAA0B,IAAI,GAC1C,UAAU,MAAM,OAAgC,oBAAI,IAAI,CAAC,EAAE;AACjE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP;AAAA,QACA,eAAe;AAAA,QAEd;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,qBAAmB,cAAc;AAMjC,QAAM,uBAAuB,OAAO,kBAE9B,iBAAiB,MAAM,WAG3B,CAAC,OAAO,iBAAiB;AACzB,UAAM,EAAE,mBAAmB,SAAS,IAAI,OAClC,UAAU,qBAAqB,iBAAiB,GAChD,eAAe,gBAAgB,cAAc,QAAQ,aAAa;AACxE,WAAO,oBAAC,QAAK,KAAK,cAAe,UAA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;AAErCb,UAAM6B,UAAU,WAAA;AACdN,qBAAQlB,QAAQyB,IAAIf,KAAK,eAAA;QAAEA;SAASa,QAAAA,CAAAA,GAC7B,WAAA;eAAM,KAAKL,QAAQlB,QAAQ0B,OAAOhB,GAAAA;;IAC3C,CAAA;;AAEA,WACE,sBAAA,cAACjB,OAAAA,OAAAA,CAAAA,GAAW,iBAAA,MAAC4B,gBAAiB,EAAA,GAAMX,iBAAAA,MAAAA,OAAKS,YAAAA,GAAAA,OACtCV,QAAAA;EAGP,CAAA;AAEAa,qBAAmBT,cAAcO;AAMjC,WAASO,cAAcnB,mBAAsB;AAC3C,QAAMU,UAAUd,qBAAqBI,iBAAAA,GAE/BoB,WAAWjC,MAAMkC,YAAY,WAAA;AACjC,UAAI,CAACrC;AACH,eAAO,CAAA;AAGT,UAAMsC,iBAAiBZ,QAAQpB,cAAcC;AAC7C,UAAI,CAAC+B;AAAgB,eAAO,CAAA;AAC5B,UAAMC,eAAeC,MAAMC,KACzBH,eAAeI,iBAAkB,IAAkB,OAAfb,gBAAe,GAAA,CAAA,CAAA,GAE/Cc,QAAQH,MAAMC,KAAKf,QAAQlB,QAAQoC,OAAM,CAAA,GACzCC,eAAeF,MAAMG,KACzB,SAACC,GAAGC,GAAAA;eACFT,aAAaU,QAAQF,EAAE7B,IAAIX,OAAO,IAClCgC,aAAaU,QAAQD,EAAE9B,IAAIX,OAAO;;AAEtC,aAAOsC;IACT,GAAG;MAACnB,QAAQpB;MAAeoB,QAAQlB;KAAQ;AAE3C,WAAO4B;EACT;AAEA,SAAO;IACL;MAAEzB,UAAUG;MAAoBb,MAAMsB;MAAgB2B,UAAUpB;IAAmB;IACnFK;;AAEJ;",
5
+ "names": ["useComposedRefs", "isWeb", "Slot", "createStyledContext", "React", "createCollection", "name", "collectionRef", "current", "itemMap", "Map", "CollectionProviderImpl", "Provider", "useCollectionContext", "useStyledContext", "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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts"],
3
+ "sources": ["../../src/Users/n8/tamagui/packages/collection/src/index.ts"],
4
4
  "mappings": "AAAA,cAAc;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/collection",
3
- "version": "1.89.26",
3
+ "version": "1.89.27-1708113113238",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -32,19 +32,19 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@tamagui/compose-refs": "1.89.26",
36
- "@tamagui/constants": "1.89.26",
37
- "@tamagui/core": "1.89.26",
38
- "@tamagui/create-context": "1.89.26",
39
- "@tamagui/polyfill-dev": "1.89.26",
40
- "@tamagui/stacks": "1.89.26",
41
- "@tamagui/use-controllable-state": "1.89.26"
35
+ "@tamagui/compose-refs": "1.89.27-1708113113238",
36
+ "@tamagui/constants": "1.89.27-1708113113238",
37
+ "@tamagui/core": "1.89.27-1708113113238",
38
+ "@tamagui/create-context": "1.89.27-1708113113238",
39
+ "@tamagui/polyfill-dev": "1.89.27-1708113113238",
40
+ "@tamagui/stacks": "1.89.27-1708113113238",
41
+ "@tamagui/use-controllable-state": "1.89.27-1708113113238"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "*"
45
45
  },
46
46
  "devDependencies": {
47
- "@tamagui/build": "1.89.26",
47
+ "@tamagui/build": "1.89.27-1708113113238",
48
48
  "react": "^18.2.0"
49
49
  },
50
50
  "publishConfig": {