@tamagui/collection 2.7.7 → 3.0.0-beta.643.1

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.
@@ -1,94 +1,79 @@
1
+ import { Slot, createRefComponent, createStyledContext } from "@tamagui/core";
1
2
  import { useComposedRefs } from "@tamagui/compose-refs";
2
3
  import { isWeb } from "@tamagui/constants";
3
- import { Slot, createStyledContext } from "@tamagui/core";
4
4
  import React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
+
6
7
  function createCollection(name) {
7
- const {
8
- Provider: CollectionProviderImpl,
9
- useStyledContext: useCollectionContext
10
- } = createStyledContext({
11
- collectionRef: {
12
- current: void 0
13
- },
14
- itemMap: /* @__PURE__ */new Map()
15
- }, "Toast");
16
- const CollectionProvider = props => {
17
- const {
18
- scope,
19
- children
20
- } = props;
21
- const ref = React.useRef(void 0);
22
- const itemMap = React.useRef(/* @__PURE__ */new Map()).current;
23
- return /* @__PURE__ */jsx(CollectionProviderImpl, {
24
- scope,
25
- itemMap,
26
- collectionRef: ref,
27
- children
28
- });
29
- };
30
- CollectionProvider.displayName = "CollectionProvider";
31
- const COLLECTION_SLOT_NAME = name + "CollectionSlot";
32
- const CollectionSlot = React.forwardRef((props, forwardedRef) => {
33
- const {
34
- scope,
35
- children
36
- } = props;
37
- const context = useCollectionContext(scope);
38
- const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
39
- return /* @__PURE__ */jsx(Slot, {
40
- ref: composedRefs,
41
- children
42
- });
43
- });
44
- CollectionSlot.displayName = COLLECTION_SLOT_NAME;
45
- const ITEM_SLOT_NAME = name + "CollectionItemSlot";
46
- const ITEM_DATA_ATTR = "data-collection-item";
47
- const CollectionItemSlot = React.forwardRef((props, forwardedRef) => {
48
- const {
49
- scope,
50
- children,
51
- ...itemData
52
- } = props;
53
- const ref = React.useRef(void 0);
54
- const composedRefs = useComposedRefs(forwardedRef, ref);
55
- const context = useCollectionContext(scope);
56
- React.useEffect(() => {
57
- context.itemMap.set(ref, {
58
- ref,
59
- ...itemData
60
- });
61
- return () => void context.itemMap.delete(ref);
62
- });
63
- return /* @__PURE__ */jsx(Slot, {
64
- ...{
65
- [ITEM_DATA_ATTR]: ""
66
- },
67
- ref: composedRefs,
68
- children
69
- });
70
- });
71
- CollectionItemSlot.displayName = ITEM_SLOT_NAME;
72
- function useCollection(scope) {
73
- const context = useCollectionContext(scope);
74
- const getItems = React.useCallback(() => {
75
- if (!isWeb) {
76
- return [];
77
- }
78
- const collectionNode = context.collectionRef.current;
79
- if (!collectionNode) return [];
80
- const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
81
- const items = Array.from(context.itemMap.values());
82
- const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
83
- return orderedItems;
84
- }, [context.collectionRef, context.itemMap]);
85
- return getItems;
86
- }
87
- return [{
88
- Provider: CollectionProvider,
89
- Slot: CollectionSlot,
90
- ItemSlot: CollectionItemSlot
91
- }, useCollection];
8
+ const { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext({
9
+ collectionRef: { current: void 0 },
10
+ itemMap: /* @__PURE__ */ new Map()
11
+ }, "Toast");
12
+ const CollectionProvider = (props) => {
13
+ const { scope, children } = props;
14
+ const ref = React.useRef(void 0);
15
+ const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
16
+ return /* @__PURE__ */ jsx(CollectionProviderImpl, {
17
+ scope,
18
+ itemMap,
19
+ collectionRef: ref,
20
+ children
21
+ });
22
+ };
23
+ CollectionProvider.displayName = "CollectionProvider";
24
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
25
+ const CollectionSlot = createRefComponent((props, forwardedRef) => {
26
+ const { scope, children } = props;
27
+ const context = useCollectionContext(scope);
28
+ const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
29
+ return /* @__PURE__ */ jsx(Slot, {
30
+ ref: composedRefs,
31
+ children
32
+ });
33
+ });
34
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
35
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
36
+ const ITEM_DATA_ATTR = "data-collection-item";
37
+ const CollectionItemSlot = createRefComponent((props, forwardedRef) => {
38
+ const { scope, children, ...itemData } = props;
39
+ const ref = React.useRef(void 0);
40
+ const composedRefs = useComposedRefs(forwardedRef, ref);
41
+ const context = useCollectionContext(scope);
42
+ React.useEffect(() => {
43
+ context.itemMap.set(ref, {
44
+ ref,
45
+ ...itemData
46
+ });
47
+ return () => void context.itemMap.delete(ref);
48
+ });
49
+ return /* @__PURE__ */ jsx(Slot, {
50
+ ...{ [ITEM_DATA_ATTR]: "" },
51
+ ref: composedRefs,
52
+ children
53
+ });
54
+ });
55
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
56
+ function useCollection(scope) {
57
+ const context = useCollectionContext(scope);
58
+ const getItems = React.useCallback(() => {
59
+ if (!isWeb) {
60
+ return [];
61
+ }
62
+ const collectionNode = context.collectionRef.current;
63
+ if (!collectionNode) return [];
64
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
65
+ const items = Array.from(context.itemMap.values());
66
+ const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
67
+ return orderedItems;
68
+ }, [context.collectionRef, context.itemMap]);
69
+ return getItems;
70
+ }
71
+ return [{
72
+ Provider: CollectionProvider,
73
+ Slot: CollectionSlot,
74
+ ItemSlot: CollectionItemSlot
75
+ }, useCollection];
92
76
  }
77
+
93
78
  export { createCollection };
94
79
  //# sourceMappingURL=Collection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["useComposedRefs","isWeb","Slot","createStyledContext","React","jsx","createCollection","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","collectionRef","current","itemMap","Map","CollectionProvider","props","scope","children","ref","useRef","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"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,QAAa;AAEtB,SAASC,IAAA,EAAMC,mBAAA,QAA2B;AAC1C,OAAOC,KAAA,MAAW;AAkDZ,SAAAC,GAAA;AAvCN,SAASC,iBACPC,IAAA,EACA;EAmBA,MAAM;IAAEC,QAAA,EAAUC,sBAAA;IAAwBC,gBAAA,EAAkBC;EAAqB,IAC/ER,mBAAA,CACE;IACES,aAAA,EAAe;MAAEC,OAAA,EAAS;IAAU;IACpCC,OAAA,EAAS,mBAAIC,GAAA,CAAI;EACnB,GACA,OACF;EAEF,MAAMC,kBAAA,GAIDC,KAAA,IAAU;IACb,MAAM;MAAEC,KAAA;MAAOC;IAAS,IAAIF,KAAA;IAC5B,MAAMG,GAAA,GAAMhB,KAAA,CAAMiB,MAAA,CAA0B,MAAS;IACrD,MAAMP,OAAA,GAAUV,KAAA,CAAMiB,MAAA,CAAgC,mBAAIN,GAAA,CAAI,CAAC,EAAEF,OAAA;IACjE,OACE,eAAAR,GAAA,CAACI,sBAAA;MAAuBS,KAAA;MAAcJ,OAAA;MAAkBF,aAAA,EAAeQ,GAAA;MACpED;IAAA,CACH;EAEJ;EAEAH,kBAAA,CAAmBM,WAAA,GAAc;EAMjC,MAAMC,oBAAA,GAAuBhB,IAAA,GAAO;EAEpC,MAAMiB,cAAA,GAAiBpB,KAAA,CAAMqB,UAAA,CAG3B,CAACR,KAAA,EAAOS,YAAA,KAAiB;IACzB,MAAM;MAAER,KAAA;MAAOC;IAAS,IAAIF,KAAA;IAC5B,MAAMU,OAAA,GAAUhB,oBAAA,CAAqBO,KAAK;IAC1C,MAAMU,YAA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AiBZ,OAAA,CAAQf,aAAA,CAAcC,OAAA;MAC7C,IAAI,CAAC0B,cAAA,EAAgB,OAAO,EAAC;MAC7B,MAAMC,YAAA,GAAeC,KAAA,CAAMC,IAAA,CACzBH,cAAA,CAAeI,gBAAA,CAAiB,IAAIb,cAAc,GAAG,CACvD;MACA,MAAMc,KAAA,GAAQH,KAAA,CAAMC,IAAA,CAAKf,OAAA,CAAQb,OAAA,CAAQ+B,MAAA,CAAO,CAAC;MACjD,MAAMC,YAAA,GAAeF,KAAA,CAAMG,IAAA,CACzB,CAACC,CAAA,EAAGC,CAAA,KACFT,YAAA,CAAaU,OAAA,CAAQF,CAAA,CAAE5B,GAAA,CAAIP,OAAuB,IAClD2B,YAAA,CAAaU,OAAA,CAAQD,CAAA,CAAE7B,GAAA,CAAIP,OAAuB,CACtD;MACA,OAAOiC,YAAA;IACT,GAAG,CAACnB,OAAA,CAAQf,aAAA,EAAee,OAAA,CAAQb,OAAO,CAAC;IAE3C,OAAOuB,QAAA;EACT;EAEA,OAAO,CACL;IAAE7B,QAAA,EAAUQ,kBAAA;IAAoBd,IAAA,EAAMsB,cAAA;IAAgB2B,QAAA,EAAUpB;EAAmB,GACnFK,aAAA,CACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"Collection.js","names":[],"sources":["jsx/Collection.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/core\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport { Slot, createStyledContext } from \"@tamagui/core\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = createStyledContext(\n {\n collectionRef: { current: void 0 },\n itemMap: /* @__PURE__ */ new Map()\n },\n \"Toast\"\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(void 0);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = \"CollectionProvider\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlot = createRefComponent((props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(Slot, { ref: composedRefs, children });\n });\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-collection-item\";\n const CollectionItemSlot = createRefComponent((props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(void 0);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(Slot, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n });\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(scope);\n const getItems = React.useCallback(() => {\n if (!isWeb) {\n return [];\n }\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(\n collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)\n );\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=Collection.js.map\n"],"mappings":";;;;;;;AAMA,SAAS,iBAAiB,MAAM;CAC9B,MAAM,EAAE,UAAU,wBAAwB,kBAAkB,yBAAyB,oBACnF;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O,CAAC;GACV;GACA,MAAM,iBAAiB,QAAQ,cAAc;GAC7C,IAAI,CAAC,gBAAgB,OAAO,CAAC;GAC7B,MAAM,eAAe,MAAM,KACzB,eAAe,iBAAiB,IAAI,eAAe,EAAE,CACvD;GACA,MAAM,QAAQ,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;GACjD,MAAM,eAAe,MAAM,MACxB,GAAG,MAAM,aAAa,QAAQ,EAAE,IAAI,OAAO,IAAI,aAAa,QAAQ,EAAE,IAAI,OAAO,CACpF;GACA,OAAO;EACT,GAAG,CAAC,QAAQ,eAAe,QAAQ,OAAO,CAAC;EAC3C,OAAO;CACT;CACA,OAAO,CACL;EAAE,UAAU;EAAoB,MAAM;EAAgB,UAAU;CAAmB,GACnF,aACF;AACF"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var Collection_exports = {};
31
+ __export(Collection_exports, { createCollection: () => createCollection });
32
+ module.exports = __toCommonJS(Collection_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_core = require("@tamagui/core");
35
+ var import_compose_refs = require("@tamagui/compose-refs");
36
+ var import_constants = require("@tamagui/constants");
37
+ var import_core2 = require("@tamagui/core");
38
+ var import_react = __toESM(require("react"), 1);
39
+ function createCollection(name) {
40
+ var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core2.createStyledContext)({
41
+ collectionRef: { current: void 0 },
42
+ itemMap: /* @__PURE__ */ new Map()
43
+ }, "Toast");
44
+ var CollectionProvider = function(props) {
45
+ var { scope, children } = props;
46
+ var ref = import_react.default.useRef(void 0);
47
+ var itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
49
+ scope,
50
+ itemMap,
51
+ collectionRef: ref,
52
+ children
53
+ });
54
+ };
55
+ CollectionProvider.displayName = "CollectionProvider";
56
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot";
57
+ var CollectionSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {
58
+ var { scope, children } = props;
59
+ var context = useCollectionContext(scope);
60
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {
62
+ ref: composedRefs,
63
+ children
64
+ });
65
+ });
66
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
67
+ var ITEM_SLOT_NAME = name + "CollectionItemSlot";
68
+ var ITEM_DATA_ATTR = "data-collection-item";
69
+ var CollectionItemSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {
70
+ var { scope, children, ...itemData } = props;
71
+ var ref = import_react.default.useRef(void 0);
72
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
73
+ var context = useCollectionContext(scope);
74
+ import_react.default.useEffect(function() {
75
+ context.itemMap.set(ref, {
76
+ ref,
77
+ ...itemData
78
+ });
79
+ return function() {
80
+ return void context.itemMap.delete(ref);
81
+ };
82
+ });
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {
84
+ [ITEM_DATA_ATTR]: "",
85
+ ref: composedRefs,
86
+ children
87
+ });
88
+ });
89
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
90
+ function useCollection(scope) {
91
+ var context = useCollectionContext(scope);
92
+ var getItems = import_react.default.useCallback(function() {
93
+ if (!import_constants.isWeb) {
94
+ return [];
95
+ }
96
+ var collectionNode = context.collectionRef.current;
97
+ if (!collectionNode) return [];
98
+ var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
99
+ var items = Array.from(context.itemMap.values());
100
+ var orderedItems = items.sort(function(a, b) {
101
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
102
+ });
103
+ return orderedItems;
104
+ }, [context.collectionRef, context.itemMap]);
105
+ return getItems;
106
+ }
107
+ return [{
108
+ Provider: CollectionProvider,
109
+ Slot: CollectionSlot,
110
+ ItemSlot: CollectionItemSlot
111
+ }, useCollection];
112
+ }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,129 +8,107 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  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, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
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
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var Collection_exports = {};
37
- __export(Collection_exports, {
38
- createCollection: () => createCollection
39
- });
31
+ __export(Collection_exports, { createCollection: () => createCollection });
40
32
  module.exports = __toCommonJS(Collection_exports);
41
33
  var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_core = require("@tamagui/core");
42
35
  var import_compose_refs = require("@tamagui/compose-refs");
43
36
  var import_constants = require("@tamagui/constants");
44
- var import_core = require("@tamagui/core");
37
+ var import_core2 = require("@tamagui/core");
45
38
  var import_react = __toESM(require("react"), 1);
46
39
  function createCollection(name) {
47
- var {
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
- };
70
- CollectionProvider.displayName = "CollectionProvider";
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
82
- });
83
- });
84
- CollectionSlot.displayName = COLLECTION_SLOT_NAME;
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
100
- });
101
- return function () {
102
- return void context.itemMap.delete(ref);
103
- };
104
- });
105
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
106
- [ITEM_DATA_ATTR]: "",
107
- ref: composedRefs,
108
- children
109
- });
110
- });
111
- CollectionItemSlot.displayName = ITEM_SLOT_NAME;
112
- function useCollection(scope) {
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]);
127
- return getItems;
128
- }
129
- return [{
130
- Provider: CollectionProvider,
131
- Slot: CollectionSlot,
132
- ItemSlot: CollectionItemSlot
133
- }, useCollection];
40
+ var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core2.createStyledContext)({
41
+ collectionRef: { current: void 0 },
42
+ itemMap: /* @__PURE__ */ new Map()
43
+ }, "Toast");
44
+ var CollectionProvider = function(props) {
45
+ var { scope, children } = props;
46
+ var ref = import_react.default.useRef(void 0);
47
+ var itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
49
+ scope,
50
+ itemMap,
51
+ collectionRef: ref,
52
+ children
53
+ });
54
+ };
55
+ CollectionProvider.displayName = "CollectionProvider";
56
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot";
57
+ var CollectionSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {
58
+ var { scope, children } = props;
59
+ var context = useCollectionContext(scope);
60
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {
62
+ ref: composedRefs,
63
+ children
64
+ });
65
+ });
66
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
67
+ var ITEM_SLOT_NAME = name + "CollectionItemSlot";
68
+ var ITEM_DATA_ATTR = "data-collection-item";
69
+ var CollectionItemSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {
70
+ var { scope, children, ...itemData } = props;
71
+ var ref = import_react.default.useRef(void 0);
72
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
73
+ var context = useCollectionContext(scope);
74
+ import_react.default.useEffect(function() {
75
+ context.itemMap.set(ref, {
76
+ ref,
77
+ ...itemData
78
+ });
79
+ return function() {
80
+ return void context.itemMap.delete(ref);
81
+ };
82
+ });
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {
84
+ [ITEM_DATA_ATTR]: "",
85
+ ref: composedRefs,
86
+ children
87
+ });
88
+ });
89
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
90
+ function useCollection(scope) {
91
+ var context = useCollectionContext(scope);
92
+ var getItems = import_react.default.useCallback(function() {
93
+ if (!import_constants.isWeb) {
94
+ return [];
95
+ }
96
+ var collectionNode = context.collectionRef.current;
97
+ if (!collectionNode) return [];
98
+ var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
99
+ var items = Array.from(context.itemMap.values());
100
+ var orderedItems = items.sort(function(a, b) {
101
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
102
+ });
103
+ return orderedItems;
104
+ }, [context.collectionRef, context.itemMap]);
105
+ return getItems;
106
+ }
107
+ return [{
108
+ Provider: CollectionProvider,
109
+ Slot: CollectionSlot,
110
+ ItemSlot: CollectionItemSlot
111
+ }, useCollection];
134
112
  }
113
+
135
114
  //# sourceMappingURL=Collection.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","Collection_exports","createCollection","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_react","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"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAA,CAAaC,MAAA;AAEtB,IAAAC,SAAS,GAAMF,MAAA,CAAAG,cAAA;AACf,IAAAC,gBAAkB,GAAAJ,MAAA,CAAAK,wBAAA;AAkDZ,IAAAC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAvCN,IAAAC,YAAS,GAAAR,MAAA,CACPS,cACA;AAmBA,IAAAC,YAAQ,GAAAV,MAAU,CAAAW,SAAA,CAAAC,cAAwB;AACxC,IACEC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACE,IAAAC,IAAA,IAAAD,GAAe,EAAqBb,SACpC,CAAAY,MAAS,EAAAE,IAAA;IAAAC,GAAA,EAAIF,GAAA,CAAIC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACnB,IACAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EACF,IAAAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IAEF,KAAM,IAAAG,GAAA,IAAAlB,iBAID,CAAAe,IAAU,GACb,IAAM,CAAAX,YAAS,CAAAe,IAAS,CAAAL,EAAA,EAAII,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAC5BpB,SAAY,CAAAkB,EAAA,EAAMI,GAAA;MAA0BP,GAAA,EAAAA,CAAA,KAASI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,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AAAe,OAAA,CAAAC,MAAA;IAEA,IAAAR,OAAM,GAAAR,YAAiB,CAAAe,OAAQ,CAAAC,MAAA,gBAAc,IAAAP,GAAA,IAAAF,OAAA;IAC7C,OAAK,eAAgB,IAAAZ,kBAAQ,CAAAsB,GAAA,EAAAf,sBAAA;MAC7BU,KAAA;MAA2BJ,OACzB;MACFF,aAAA,EAAAQ,GAAA;MACAD;IACA;EAA2B;EAG2BH,kBACtD,CAAAQ,WAAA;EACA,IAAAC,oBAAO,GAAA5C,IAAA;EAAA,IACT6C,cAAY,kBAAuBpB,YAAQ,CAAAe,OAAA,CAAAM,UAAA,WAAAV,KAAA,EAAAW,YAAA;IAE3C;MAAAV,KAAO;MAAAC;IAAA,IAAAF,KAAA;IACT,IAAAY,OAAA,GAAAnB,oBAAA,CAAAQ,KAAA;IAEA,IAAAY,YAAO,OAAA3B,mBAAA,CAAA4B,eAAA,EAAAH,YAAA,EAAAC,OAAA,CAAAjB,aAAA;IACL,OAAE,eAAU,IAAAX,kBAA0B,CAAAsB,GAAA,EAAAlB,WAAgB,CAAA2B,IAAU;MAChEZ,GAAA,EAAAU,YAAA;MACFX;IACF","ignoreList":[]}
1
+ {"version":3,"file":"Collection.native.js","names":[],"sources":["jsx/Collection.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Collection_exports = {};\n__export(Collection_exports, {\n createCollection: () => createCollection\n});\nmodule.exports = __toCommonJS(Collection_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core2 = require(\"@tamagui/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction createCollection(name) {\n var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core2.createStyledContext)({\n collectionRef: {\n current: void 0\n },\n itemMap: /* @__PURE__ */ new Map()\n }, \"Toast\");\n var CollectionProvider = function(props) {\n var { scope, children } = props;\n var ref = import_react.default.useRef(void 0);\n var itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionProviderImpl, {\n scope,\n itemMap,\n collectionRef: ref,\n children\n });\n };\n CollectionProvider.displayName = \"CollectionProvider\";\n var COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n var CollectionSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, children } = props;\n var context = useCollectionContext(scope);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {\n ref: composedRefs,\n children\n });\n });\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n var ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n var ITEM_DATA_ATTR = \"data-collection-item\";\n var CollectionItemSlot = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, children, ...itemData } = props;\n var ref = import_react.default.useRef(void 0);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);\n var context = useCollectionContext(scope);\n import_react.default.useEffect(function() {\n context.itemMap.set(ref, {\n ref,\n ...itemData\n });\n return function() {\n return void context.itemMap.delete(ref);\n };\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slot, {\n [ITEM_DATA_ATTR]: \"\",\n ref: composedRefs,\n children\n });\n });\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n var context = useCollectionContext(scope);\n var getItems = import_react.default.useCallback(function() {\n if (!import_constants.isWeb) {\n return [];\n }\n var collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n var items = Array.from(context.itemMap.values());\n var orderedItems = items.sort(function(a, b) {\n return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);\n });\n return orderedItems;\n }, [\n context.collectionRef,\n context.itemMap\n ]);\n return getItems;\n }\n return [\n {\n Provider: CollectionProvider,\n Slot: CollectionSlot,\n ItemSlot: CollectionItemSlot\n },\n useCollection\n ];\n}\n//# sourceMappingURL=Collection.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,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AAI,iBAAiB,QAAQ,cAAc;GAC3C,IAAI,CAAC,gBAAgB,OAAO,CAAC;GAC7B,IAAI,eAAe,MAAM,KAAK,eAAe,iBAAiB,IAAI,eAAe,EAAE,CAAC;GACpF,IAAI,QAAQ,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;GAC/C,IAAI,eAAe,MAAM,KAAK,SAAS,GAAG,GAAG;IAC3C,OAAO,aAAa,QAAQ,EAAE,IAAI,OAAO,IAAI,aAAa,QAAQ,EAAE,IAAI,OAAO;GACjF,CAAC;GACD,OAAO;EACT,GAAG,CACD,QAAQ,eACR,QAAQ,OACV,CAAC;EACD,OAAO;CACT;CACA,OAAO,CACL;EACE,UAAU;EACV,MAAM;EACN,UAAU;CACZ,GACA,aACF;AACF"}
package/dist/jsx/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from "./Collection.mjs";
2
- //# sourceMappingURL=index.js.map
1
+ export * from "./Collection.mjs"
@@ -1,2 +1 @@
1
- export * from "./Collection.mjs";
2
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Collection.mjs"
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ module.exports = __toCommonJS(index_exports);
21
+ __reExport(index_exports, require("./Collection.native.js"), module.exports);