@tamagui/select 3.0.7 → 3.0.9

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.
Files changed (57) hide show
  1. package/dist/cjs/Select.native.cjs +9 -9
  2. package/dist/cjs/Select.native.js +9 -9
  3. package/dist/cjs/Select.native.js.map +1 -1
  4. package/dist/cjs/SelectContent.native.cjs +1 -1
  5. package/dist/cjs/SelectContent.native.js +1 -1
  6. package/dist/cjs/SelectContent.native.js.map +1 -1
  7. package/dist/cjs/SelectImpl.native.cjs +1 -1
  8. package/dist/cjs/SelectImpl.native.js +1 -1
  9. package/dist/cjs/SelectImpl.native.js.map +1 -1
  10. package/dist/cjs/SelectItem.native.cjs +3 -3
  11. package/dist/cjs/SelectItem.native.js +3 -3
  12. package/dist/cjs/SelectItem.native.js.map +1 -1
  13. package/dist/cjs/SelectTrigger.native.cjs +1 -1
  14. package/dist/cjs/SelectTrigger.native.js +1 -1
  15. package/dist/cjs/SelectTrigger.native.js.map +1 -1
  16. package/dist/cjs/context.native.cjs +1 -1
  17. package/dist/cjs/context.native.js +1 -1
  18. package/dist/cjs/context.native.js.map +1 -1
  19. package/dist/cjs/selectionController.native.cjs +27 -27
  20. package/dist/cjs/selectionController.native.js +27 -27
  21. package/dist/cjs/selectionController.native.js.map +1 -1
  22. package/dist/esm/Select.native.js +9 -9
  23. package/dist/esm/Select.native.js.map +1 -1
  24. package/dist/esm/SelectContent.native.js +1 -1
  25. package/dist/esm/SelectContent.native.js.map +1 -1
  26. package/dist/esm/SelectImpl.native.js +1 -1
  27. package/dist/esm/SelectImpl.native.js.map +1 -1
  28. package/dist/esm/SelectItem.native.js +3 -3
  29. package/dist/esm/SelectItem.native.js.map +1 -1
  30. package/dist/esm/SelectTrigger.native.js +1 -1
  31. package/dist/esm/SelectTrigger.native.js.map +1 -1
  32. package/dist/esm/context.native.js +1 -1
  33. package/dist/esm/context.native.js.map +1 -1
  34. package/dist/esm/selectionController.native.js +27 -27
  35. package/dist/esm/selectionController.native.js.map +1 -1
  36. package/dist/jsx/Select.native.cjs +9 -9
  37. package/dist/jsx/Select.native.js +9 -9
  38. package/dist/jsx/Select.native.js.map +1 -1
  39. package/dist/jsx/SelectContent.native.cjs +1 -1
  40. package/dist/jsx/SelectContent.native.js +1 -1
  41. package/dist/jsx/SelectContent.native.js.map +1 -1
  42. package/dist/jsx/SelectImpl.native.cjs +1 -1
  43. package/dist/jsx/SelectImpl.native.js +1 -1
  44. package/dist/jsx/SelectImpl.native.js.map +1 -1
  45. package/dist/jsx/SelectItem.native.cjs +3 -3
  46. package/dist/jsx/SelectItem.native.js +3 -3
  47. package/dist/jsx/SelectItem.native.js.map +1 -1
  48. package/dist/jsx/SelectTrigger.native.cjs +1 -1
  49. package/dist/jsx/SelectTrigger.native.js +1 -1
  50. package/dist/jsx/SelectTrigger.native.js.map +1 -1
  51. package/dist/jsx/context.native.cjs +1 -1
  52. package/dist/jsx/context.native.js +1 -1
  53. package/dist/jsx/context.native.js.map +1 -1
  54. package/dist/jsx/selectionController.native.cjs +27 -27
  55. package/dist/jsx/selectionController.native.js +27 -27
  56. package/dist/jsx/selectionController.native.js.map +1 -1
  57. package/package.json +27 -27
@@ -1 +1 @@
1
- {"version":3,"file":"context.native.js","names":[],"sources":["jsx/context.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar context_exports = {};\n__export(context_exports, {\n ForwardSelectContext: () => ForwardSelectContext,\n SelectItemParentProvider: () => SelectItemParentProvider,\n SelectNativeComponentContext: () => SelectNativeComponentContext,\n SelectProvider: () => SelectProvider,\n SelectZIndexContext: () => SelectZIndexContext,\n useSelectContext: () => useSelectContext,\n useSelectItemParentContext: () => useSelectItemParentContext\n});\nmodule.exports = __toCommonJS(context_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_react = require(\"react\");\nvar SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);\nvar SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, \"Select\");\nvar { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, \"SelectItem\");\nvar ForwardSelectContext = function(param) {\n var { context, itemContext, children } = param;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {\n scope: context.scopeName,\n ...context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {\n scope: context.scopeName,\n ...itemContext,\n children\n })\n });\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,QAAQ,SAAS;CAC5C,IAAI,QAAQ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f,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,0BAA0B;GAC9E,OAAO,QAAQ;GACf,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH"}
1
+ {"version":3,"file":"context.native.js","names":[],"sources":["jsx/context.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar context_exports = {};\n__export(context_exports, {\n ForwardSelectContext: () => ForwardSelectContext,\n SelectItemParentProvider: () => SelectItemParentProvider,\n SelectNativeComponentContext: () => SelectNativeComponentContext,\n SelectProvider: () => SelectProvider,\n SelectZIndexContext: () => SelectZIndexContext,\n useSelectContext: () => useSelectContext,\n useSelectItemParentContext: () => useSelectItemParentContext\n});\nmodule.exports = __toCommonJS(context_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_react = require(\"react\");\nvar SelectZIndexContext = /* @__PURE__ */ (0, import_react.createContext)(void 0);\nvar SelectNativeComponentContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core.createStyledContext)(null, \"Select\");\nvar { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core.createStyledContext)(null, \"SelectItem\");\nvar ForwardSelectContext = function ForwardSelectContext2(param) {\n var { context, itemContext, children } = param;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectProvider, {\n scope: context.scopeName,\n ...context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItemParentProvider, {\n scope: context.scopeName,\n ...itemContext,\n children\n })\n });\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kBAAkB,CAAC;AACvB,SAAS,iBAAiB;CACxB,4BAA4B;CAC5B,gCAAgC;CAChC,oCAAoC;CACpC,sBAAsB;CACtB,2BAA2B;CAC3B,wBAAwB;CACxB,kCAAkC;AACpC,CAAC;AACD,OAAO,UAAU,aAAa,eAAe;AAC7C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsC,iBAAC,GAAG,aAAa,cAAa,CAAE,KAAK,CAAC;AAChF,IAAI,+BAA+C,iBAAC,GAAG,aAAa,cAAa,CAAE,IAAI;AACvF,IAAI,EAAE,UAAU,gBAAgB,kBAAkB,sBAAsB,GAAG,YAAY,oBAAmB,CAAE,MAAM,QAAQ;AAC1H,IAAI,EAAE,UAAU,0BAA0B,kBAAkB,gCAAgC,GAAG,YAAY,oBAAmB,CAAE,MAAM,YAAY;AAClJ,IAAI,uBAAuB,SAAS,sBAAsB,OAAO;CAC/D,IAAI,EAAE,SAAS,aAAa,aAAa;CACzC,IAAI,eAAe,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CACjD,IAAI,YAAY,SAAS,YAAY;EACnC,OAAO;CACT;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB;EACjE,OAAO,QAAQ;EACf,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,0BAA0B;GAC9E,OAAO,QAAQ;GACf,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH"}
@@ -51,44 +51,44 @@ function createSelectItemRegistry(onChange) {
51
51
  var itemNodes = /* @__PURE__ */ new Map();
52
52
  var listeners = /* @__PURE__ */ new Set();
53
53
  var indexByValue = null;
54
- var notify = function() {
54
+ var notify = function notify2() {
55
55
  indexByValue = null;
56
56
  onChange === null || onChange === void 0 ? void 0 : onChange();
57
57
  listeners.forEach(function(listener) {
58
58
  return listener();
59
59
  });
60
60
  };
61
- var getItems = function() {
61
+ var getItems = function getItems2() {
62
62
  return items;
63
63
  };
64
- var getItem = function(value) {
64
+ var getItem = function getItem2(value) {
65
65
  return items.find(function(item) {
66
66
  return item.value === value;
67
67
  });
68
68
  };
69
- var getIndex = function(value) {
69
+ var getIndex = function getIndex2(value) {
70
+ var _indexByValue_get;
70
71
  if (!indexByValue) {
71
72
  indexByValue = /* @__PURE__ */ new Map();
72
73
  items.forEach(function(item, index) {
73
74
  if (!indexByValue.has(item.value)) indexByValue.set(item.value, index);
74
75
  });
75
76
  }
76
- var _indexByValue_get;
77
77
  return (_indexByValue_get = indexByValue.get(value)) !== null && _indexByValue_get !== void 0 ? _indexByValue_get : -1;
78
78
  };
79
- var getNodes = function() {
79
+ var getNodes = function getNodes2() {
80
80
  return items.map(function(item) {
81
81
  var _itemNodes_get;
82
82
  return (_itemNodes_get = itemNodes.get(item.id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null;
83
83
  });
84
84
  };
85
- var getRegisteredLabel = function(value) {
85
+ var getRegisteredLabel = function getRegisteredLabel2(value) {
86
86
  var registrations = labelRegistrations.get(value);
87
87
  if (!(registrations === null || registrations === void 0 ? void 0 : registrations.size)) return void 0;
88
88
  var values = Array.from(registrations.values());
89
89
  return values[values.length - 1];
90
90
  };
91
- var applyRegisteredLabel = function(value) {
91
+ var applyRegisteredLabel = function applyRegisteredLabel2(value) {
92
92
  var registeredLabel = getRegisteredLabel(value);
93
93
  var changed = false;
94
94
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
@@ -120,7 +120,7 @@ function createSelectItemRegistry(onChange) {
120
120
  }
121
121
  if (changed) notify();
122
122
  };
123
- var syncNodeOrder = function() {
123
+ var syncNodeOrder = function syncNodeOrder2() {
124
124
  items.sort(function(a, b) {
125
125
  var aNode = itemNodes.get(a.id);
126
126
  var bNode = itemNodes.get(b.id);
@@ -133,10 +133,10 @@ function createSelectItemRegistry(onChange) {
133
133
  return 0;
134
134
  });
135
135
  };
136
- var registerItem = function(item) {
136
+ var registerItem = function registerItem2(item) {
137
+ var _item_textValue;
137
138
  var id = Symbol(item.value);
138
139
  var registeredLabel = getRegisteredLabel(item.value);
139
- var _item_textValue;
140
140
  var registeredItem = {
141
141
  ...item,
142
142
  ...registeredLabel,
@@ -199,10 +199,10 @@ function createSelectItemRegistry(onChange) {
199
199
  }
200
200
  };
201
201
  };
202
- var registerLabel = function(value, label, textValue) {
202
+ var registerLabel = function registerLabel2(value, label, textValue) {
203
+ var _labelRegistrations_get;
203
204
  var id = Symbol(value);
204
205
  var normalizedTextValue = textValue || getSelectLabelText(label) || value;
205
- var _labelRegistrations_get;
206
206
  var registrations = (_labelRegistrations_get = labelRegistrations.get(value)) !== null && _labelRegistrations_get !== void 0 ? _labelRegistrations_get : (function() {
207
207
  var next = /* @__PURE__ */ new Map();
208
208
  labelRegistrations.set(value, next);
@@ -221,12 +221,12 @@ function createSelectItemRegistry(onChange) {
221
221
  applyRegisteredLabel(value);
222
222
  };
223
223
  };
224
- var firstEnabledIndex = function() {
224
+ var firstEnabledIndex = function firstEnabledIndex2() {
225
225
  return items.findIndex(function(item) {
226
226
  return !item.disabled;
227
227
  });
228
228
  };
229
- var nextEnabledIndex = function(fromIndex, direction) {
229
+ var nextEnabledIndex = function nextEnabledIndex2(fromIndex, direction) {
230
230
  if (!items.length) return -1;
231
231
  if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {
232
232
  if (direction === 1) return firstEnabledIndex();
@@ -242,7 +242,7 @@ function createSelectItemRegistry(onChange) {
242
242
  }
243
243
  return -1;
244
244
  };
245
- var findTypeaheadIndex = function(search, fromIndex) {
245
+ var findTypeaheadIndex = function findTypeaheadIndex2(search, fromIndex) {
246
246
  var normalizedSearch = search.trim().toLocaleLowerCase();
247
247
  if (!normalizedSearch) return -1;
248
248
  var start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;
@@ -272,12 +272,12 @@ function createSelectItemRegistry(onChange) {
272
272
  firstEnabledIndex,
273
273
  nextEnabledIndex,
274
274
  findTypeaheadIndex,
275
- getDisabledIndices: function() {
275
+ getDisabledIndices: function getDisabledIndices() {
276
276
  return items.flatMap(function(item, index) {
277
277
  return item.disabled ? [index] : [];
278
278
  });
279
279
  },
280
- getTypeaheadLabels: function() {
280
+ getTypeaheadLabels: function getTypeaheadLabels() {
281
281
  return items.map(function(item) {
282
282
  return item.textValue || getSelectLabelText(item.label) || item.value;
283
283
  });
@@ -300,23 +300,23 @@ function createSelectSelectionController(param) {
300
300
  var mode = initialMode;
301
301
  var value = normalizeSelectSelection(mode, initialValue);
302
302
  var activeIndex = null;
303
- var selectedValues = function() {
303
+ var selectedValues = function selectedValues2() {
304
304
  return selectedValuesFromSelection(mode, value);
305
305
  };
306
- var setMode = function(nextMode) {
306
+ var setMode = function setMode2(nextMode) {
307
307
  if (mode === nextMode) return value;
308
308
  mode = nextMode;
309
309
  value = normalizeSelectSelection(mode, value);
310
310
  return value;
311
311
  };
312
- var setValue = function(nextValue) {
312
+ var setValue = function setValue2(nextValue) {
313
313
  value = normalizeSelectSelection(mode, nextValue);
314
314
  return value;
315
315
  };
316
- var isSelected = function(itemValue) {
316
+ var isSelected = function isSelected2(itemValue) {
317
317
  return selectedValues().includes(itemValue);
318
318
  };
319
- var toggle = function(itemValue) {
319
+ var toggle = function toggle2(itemValue) {
320
320
  var item = registry.getItem(itemValue);
321
321
  if (!item || item.disabled) return value;
322
322
  if (mode === "single") {
@@ -329,7 +329,7 @@ function createSelectSelectionController(param) {
329
329
  }) : [...current, itemValue];
330
330
  return value;
331
331
  };
332
- var selectionAnchor = function() {
332
+ var selectionAnchor = function selectionAnchor2() {
333
333
  var values = selectedValues();
334
334
  for (var index = values.length - 1; index >= 0; index--) {
335
335
  var item = registry.getItem(values[index]);
@@ -338,16 +338,16 @@ function createSelectSelectionController(param) {
338
338
  var firstEnabledIndex = registry.firstEnabledIndex();
339
339
  return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];
340
340
  };
341
- var selectionAnchorIndex = function() {
341
+ var selectionAnchorIndex = function selectionAnchorIndex2() {
342
342
  var anchor = selectionAnchor();
343
343
  return anchor ? registry.getIndex(anchor.value) : -1;
344
344
  };
345
- var initialActiveIndex = function() {
345
+ var initialActiveIndex = function initialActiveIndex2() {
346
346
  var anchorIndex = selectionAnchorIndex();
347
347
  var anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];
348
348
  return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();
349
349
  };
350
- var moveActive = function(direction) {
350
+ var moveActive = function moveActive2(direction) {
351
351
  var nextIndex = registry.nextEnabledIndex(activeIndex, direction);
352
352
  activeIndex = nextIndex < 0 ? null : nextIndex;
353
353
  return activeIndex == null ? void 0 : registry.getItems()[activeIndex];
@@ -51,44 +51,44 @@ function createSelectItemRegistry(onChange) {
51
51
  var itemNodes = /* @__PURE__ */ new Map();
52
52
  var listeners = /* @__PURE__ */ new Set();
53
53
  var indexByValue = null;
54
- var notify = function() {
54
+ var notify = function notify2() {
55
55
  indexByValue = null;
56
56
  onChange === null || onChange === void 0 ? void 0 : onChange();
57
57
  listeners.forEach(function(listener) {
58
58
  return listener();
59
59
  });
60
60
  };
61
- var getItems = function() {
61
+ var getItems = function getItems2() {
62
62
  return items;
63
63
  };
64
- var getItem = function(value) {
64
+ var getItem = function getItem2(value) {
65
65
  return items.find(function(item) {
66
66
  return item.value === value;
67
67
  });
68
68
  };
69
- var getIndex = function(value) {
69
+ var getIndex = function getIndex2(value) {
70
+ var _indexByValue_get;
70
71
  if (!indexByValue) {
71
72
  indexByValue = /* @__PURE__ */ new Map();
72
73
  items.forEach(function(item, index) {
73
74
  if (!indexByValue.has(item.value)) indexByValue.set(item.value, index);
74
75
  });
75
76
  }
76
- var _indexByValue_get;
77
77
  return (_indexByValue_get = indexByValue.get(value)) !== null && _indexByValue_get !== void 0 ? _indexByValue_get : -1;
78
78
  };
79
- var getNodes = function() {
79
+ var getNodes = function getNodes2() {
80
80
  return items.map(function(item) {
81
81
  var _itemNodes_get;
82
82
  return (_itemNodes_get = itemNodes.get(item.id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null;
83
83
  });
84
84
  };
85
- var getRegisteredLabel = function(value) {
85
+ var getRegisteredLabel = function getRegisteredLabel2(value) {
86
86
  var registrations = labelRegistrations.get(value);
87
87
  if (!(registrations === null || registrations === void 0 ? void 0 : registrations.size)) return void 0;
88
88
  var values = Array.from(registrations.values());
89
89
  return values[values.length - 1];
90
90
  };
91
- var applyRegisteredLabel = function(value) {
91
+ var applyRegisteredLabel = function applyRegisteredLabel2(value) {
92
92
  var registeredLabel = getRegisteredLabel(value);
93
93
  var changed = false;
94
94
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
@@ -120,7 +120,7 @@ function createSelectItemRegistry(onChange) {
120
120
  }
121
121
  if (changed) notify();
122
122
  };
123
- var syncNodeOrder = function() {
123
+ var syncNodeOrder = function syncNodeOrder2() {
124
124
  items.sort(function(a, b) {
125
125
  var aNode = itemNodes.get(a.id);
126
126
  var bNode = itemNodes.get(b.id);
@@ -133,10 +133,10 @@ function createSelectItemRegistry(onChange) {
133
133
  return 0;
134
134
  });
135
135
  };
136
- var registerItem = function(item) {
136
+ var registerItem = function registerItem2(item) {
137
+ var _item_textValue;
137
138
  var id = Symbol(item.value);
138
139
  var registeredLabel = getRegisteredLabel(item.value);
139
- var _item_textValue;
140
140
  var registeredItem = {
141
141
  ...item,
142
142
  ...registeredLabel,
@@ -199,10 +199,10 @@ function createSelectItemRegistry(onChange) {
199
199
  }
200
200
  };
201
201
  };
202
- var registerLabel = function(value, label, textValue) {
202
+ var registerLabel = function registerLabel2(value, label, textValue) {
203
+ var _labelRegistrations_get;
203
204
  var id = Symbol(value);
204
205
  var normalizedTextValue = textValue || getSelectLabelText(label) || value;
205
- var _labelRegistrations_get;
206
206
  var registrations = (_labelRegistrations_get = labelRegistrations.get(value)) !== null && _labelRegistrations_get !== void 0 ? _labelRegistrations_get : (function() {
207
207
  var next = /* @__PURE__ */ new Map();
208
208
  labelRegistrations.set(value, next);
@@ -221,12 +221,12 @@ function createSelectItemRegistry(onChange) {
221
221
  applyRegisteredLabel(value);
222
222
  };
223
223
  };
224
- var firstEnabledIndex = function() {
224
+ var firstEnabledIndex = function firstEnabledIndex2() {
225
225
  return items.findIndex(function(item) {
226
226
  return !item.disabled;
227
227
  });
228
228
  };
229
- var nextEnabledIndex = function(fromIndex, direction) {
229
+ var nextEnabledIndex = function nextEnabledIndex2(fromIndex, direction) {
230
230
  if (!items.length) return -1;
231
231
  if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {
232
232
  if (direction === 1) return firstEnabledIndex();
@@ -242,7 +242,7 @@ function createSelectItemRegistry(onChange) {
242
242
  }
243
243
  return -1;
244
244
  };
245
- var findTypeaheadIndex = function(search, fromIndex) {
245
+ var findTypeaheadIndex = function findTypeaheadIndex2(search, fromIndex) {
246
246
  var normalizedSearch = search.trim().toLocaleLowerCase();
247
247
  if (!normalizedSearch) return -1;
248
248
  var start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;
@@ -272,12 +272,12 @@ function createSelectItemRegistry(onChange) {
272
272
  firstEnabledIndex,
273
273
  nextEnabledIndex,
274
274
  findTypeaheadIndex,
275
- getDisabledIndices: function() {
275
+ getDisabledIndices: function getDisabledIndices() {
276
276
  return items.flatMap(function(item, index) {
277
277
  return item.disabled ? [index] : [];
278
278
  });
279
279
  },
280
- getTypeaheadLabels: function() {
280
+ getTypeaheadLabels: function getTypeaheadLabels() {
281
281
  return items.map(function(item) {
282
282
  return item.textValue || getSelectLabelText(item.label) || item.value;
283
283
  });
@@ -300,23 +300,23 @@ function createSelectSelectionController(param) {
300
300
  var mode = initialMode;
301
301
  var value = normalizeSelectSelection(mode, initialValue);
302
302
  var activeIndex = null;
303
- var selectedValues = function() {
303
+ var selectedValues = function selectedValues2() {
304
304
  return selectedValuesFromSelection(mode, value);
305
305
  };
306
- var setMode = function(nextMode) {
306
+ var setMode = function setMode2(nextMode) {
307
307
  if (mode === nextMode) return value;
308
308
  mode = nextMode;
309
309
  value = normalizeSelectSelection(mode, value);
310
310
  return value;
311
311
  };
312
- var setValue = function(nextValue) {
312
+ var setValue = function setValue2(nextValue) {
313
313
  value = normalizeSelectSelection(mode, nextValue);
314
314
  return value;
315
315
  };
316
- var isSelected = function(itemValue) {
316
+ var isSelected = function isSelected2(itemValue) {
317
317
  return selectedValues().includes(itemValue);
318
318
  };
319
- var toggle = function(itemValue) {
319
+ var toggle = function toggle2(itemValue) {
320
320
  var item = registry.getItem(itemValue);
321
321
  if (!item || item.disabled) return value;
322
322
  if (mode === "single") {
@@ -329,7 +329,7 @@ function createSelectSelectionController(param) {
329
329
  }) : [...current, itemValue];
330
330
  return value;
331
331
  };
332
- var selectionAnchor = function() {
332
+ var selectionAnchor = function selectionAnchor2() {
333
333
  var values = selectedValues();
334
334
  for (var index = values.length - 1; index >= 0; index--) {
335
335
  var item = registry.getItem(values[index]);
@@ -338,16 +338,16 @@ function createSelectSelectionController(param) {
338
338
  var firstEnabledIndex = registry.firstEnabledIndex();
339
339
  return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];
340
340
  };
341
- var selectionAnchorIndex = function() {
341
+ var selectionAnchorIndex = function selectionAnchorIndex2() {
342
342
  var anchor = selectionAnchor();
343
343
  return anchor ? registry.getIndex(anchor.value) : -1;
344
344
  };
345
- var initialActiveIndex = function() {
345
+ var initialActiveIndex = function initialActiveIndex2() {
346
346
  var anchorIndex = selectionAnchorIndex();
347
347
  var anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];
348
348
  return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();
349
349
  };
350
- var moveActive = function(direction) {
350
+ var moveActive = function moveActive2(direction) {
351
351
  var nextIndex = registry.nextEnabledIndex(activeIndex, direction);
352
352
  activeIndex = nextIndex < 0 ? null : nextIndex;
353
353
  return activeIndex == null ? void 0 : registry.getItems()[activeIndex];
@@ -1 +1 @@
1
- {"version":3,"file":"selectionController.native.js","names":[],"sources":["jsx/selectionController.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar selectionController_exports = {};\n__export(selectionController_exports, {\n createSelectItemRegistry: () => createSelectItemRegistry,\n createSelectSelectionController: () => createSelectSelectionController,\n getSelectLabelText: () => getSelectLabelText,\n getSelectListboxProps: () => getSelectListboxProps,\n getSelectOptionProps: () => getSelectOptionProps,\n normalizeSelectSelection: () => normalizeSelectSelection,\n selectedValuesFromSelection: () => selectedValuesFromSelection\n});\nmodule.exports = __toCommonJS(selectionController_exports);\nfunction getSelectLabelText(label) {\n if (typeof label === \"string\" || typeof label === \"number\") {\n return String(label);\n }\n if (Array.isArray(label)) {\n return label.map(getSelectLabelText).join(\"\");\n }\n if (label && typeof label === \"object\" && \"props\" in label) {\n var _label_props;\n return getSelectLabelText((_label_props = label.props) === null || _label_props === void 0 ? void 0 : _label_props.children);\n }\n return \"\";\n}\nfunction createSelectItemRegistry(onChange) {\n var items = [];\n var labelRegistrations = /* @__PURE__ */ new Map();\n var explicitTextValues = /* @__PURE__ */ new Map();\n var itemNodes = /* @__PURE__ */ new Map();\n var listeners = /* @__PURE__ */ new Set();\n var indexByValue = null;\n var notify = function() {\n indexByValue = null;\n onChange === null || onChange === void 0 ? void 0 : onChange();\n listeners.forEach(function(listener) {\n return listener();\n });\n };\n var getItems = function() {\n return items;\n };\n var getItem = function(value) {\n return items.find(function(item) {\n return item.value === value;\n });\n };\n var getIndex = function(value) {\n if (!indexByValue) {\n indexByValue = /* @__PURE__ */ new Map();\n items.forEach(function(item, index) {\n if (!indexByValue.has(item.value)) indexByValue.set(item.value, index);\n });\n }\n var _indexByValue_get;\n return (_indexByValue_get = indexByValue.get(value)) !== null && _indexByValue_get !== void 0 ? _indexByValue_get : -1;\n };\n var getNodes = function() {\n return items.map(function(item) {\n var _itemNodes_get;\n return (_itemNodes_get = itemNodes.get(item.id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null;\n });\n };\n var getRegisteredLabel = function(value) {\n var registrations = labelRegistrations.get(value);\n if (!(registrations === null || registrations === void 0 ? void 0 : registrations.size)) return void 0;\n var values = Array.from(registrations.values());\n return values[values.length - 1];\n };\n var applyRegisteredLabel = function(value) {\n var registeredLabel = getRegisteredLabel(value);\n var changed = false;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var item = _step.value;\n if (item.value !== value) continue;\n var nextLabel = registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.label;\n var nextTextValue = explicitTextValues.get(item.id) || (registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.textValue);\n if (item.label !== nextLabel || item.textValue !== nextTextValue) {\n item.label = nextLabel;\n item.textValue = nextTextValue;\n changed = true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (changed) notify();\n };\n var syncNodeOrder = function() {\n items.sort(function(a, b) {\n var aNode = itemNodes.get(a.id);\n var bNode = itemNodes.get(b.id);\n if (!aNode || !bNode || typeof aNode.compareDocumentPosition !== \"function\") {\n return 0;\n }\n var position = aNode.compareDocumentPosition(bNode);\n if (position & 4) return -1;\n if (position & 2) return 1;\n return 0;\n });\n };\n var registerItem = function(item) {\n var id = Symbol(item.value);\n var registeredLabel = getRegisteredLabel(item.value);\n var _item_textValue;\n var registeredItem = {\n ...item,\n ...registeredLabel,\n textValue: (_item_textValue = item.textValue) !== null && _item_textValue !== void 0 ? _item_textValue : registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.textValue,\n id\n };\n explicitTextValues.set(id, item.textValue);\n items.push(registeredItem);\n notify();\n return {\n id,\n update(next) {\n var index = items.findIndex(function(current2) {\n return current2.id === id;\n });\n if (index < 0) return;\n var current = items[index];\n if (\"textValue\" in next) {\n explicitTextValues.set(id, next.textValue);\n }\n var nextItem = {\n ...current,\n ...next\n };\n if (next.value !== void 0 && next.value !== current.value) {\n var nextLabel = getRegisteredLabel(next.value);\n nextItem.label = nextLabel === null || nextLabel === void 0 ? void 0 : nextLabel.label;\n }\n var explicitTextValue = explicitTextValues.get(id);\n nextItem.textValue = explicitTextValue || getSelectLabelText(nextItem.label) || (nextItem.label ? nextItem.value : void 0);\n var changed = Object.entries(next).some(function(param) {\n var [key, value] = param;\n return current[key] !== value;\n });\n var textValueChanged = current.textValue !== nextItem.textValue;\n if (!changed && !textValueChanged) return;\n items[index] = nextItem;\n notify();\n },\n setNode(node) {\n var _itemNodes_get;\n if (((_itemNodes_get = itemNodes.get(id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null) === (node !== null && node !== void 0 ? node : null)) return;\n if (node) {\n itemNodes.set(id, node);\n syncNodeOrder();\n } else {\n itemNodes.delete(id);\n }\n notify();\n },\n unregister() {\n var index = items.findIndex(function(current) {\n return current.id === id;\n });\n if (index < 0) return;\n items.splice(index, 1);\n explicitTextValues.delete(id);\n itemNodes.delete(id);\n notify();\n }\n };\n };\n var registerLabel = function(value, label, textValue) {\n var id = Symbol(value);\n var normalizedTextValue = textValue || getSelectLabelText(label) || value;\n var _labelRegistrations_get;\n var registrations = (_labelRegistrations_get = labelRegistrations.get(value)) !== null && _labelRegistrations_get !== void 0 ? _labelRegistrations_get : (function() {\n var next = /* @__PURE__ */ new Map();\n labelRegistrations.set(value, next);\n return next;\n })();\n registrations.set(id, {\n label,\n textValue: normalizedTextValue\n });\n applyRegisteredLabel(value);\n return function() {\n registrations.delete(id);\n if (!registrations.size) {\n labelRegistrations.delete(value);\n }\n applyRegisteredLabel(value);\n };\n };\n var firstEnabledIndex = function() {\n return items.findIndex(function(item) {\n return !item.disabled;\n });\n };\n var nextEnabledIndex = function(fromIndex, direction) {\n if (!items.length) return -1;\n if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {\n if (direction === 1) return firstEnabledIndex();\n for (var index = items.length - 1; index >= 0; index--) {\n if (!items[index].disabled) return index;\n }\n return -1;\n }\n for (var offset = 1; offset <= items.length; offset++) {\n var _items_index;\n var index1 = (fromIndex + direction * offset + items.length) % items.length;\n if (!((_items_index = items[index1]) === null || _items_index === void 0 ? void 0 : _items_index.disabled)) return index1;\n }\n return -1;\n };\n var findTypeaheadIndex = function(search, fromIndex) {\n var normalizedSearch = search.trim().toLocaleLowerCase();\n if (!normalizedSearch) return -1;\n var start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;\n for (var offset = 1; offset <= items.length; offset++) {\n var index = (start + offset) % items.length;\n var item = items[index];\n var label = item.textValue || getSelectLabelText(item.label) || item.value;\n if (!item.disabled && label.toLocaleLowerCase().startsWith(normalizedSearch)) {\n return index;\n }\n }\n return -1;\n };\n return {\n subscribe(listener) {\n listeners.add(listener);\n return function() {\n listeners.delete(listener);\n };\n },\n registerItem,\n registerLabel,\n getItems,\n getItem,\n getIndex,\n getNodes,\n firstEnabledIndex,\n nextEnabledIndex,\n findTypeaheadIndex,\n getDisabledIndices: function() {\n return items.flatMap(function(item, index) {\n return item.disabled ? [\n index\n ] : [];\n });\n },\n getTypeaheadLabels: function() {\n return items.map(function(item) {\n return item.textValue || getSelectLabelText(item.label) || item.value;\n });\n }\n };\n}\nfunction normalizeSelectSelection(mode, value) {\n if (mode === \"single\") {\n return typeof value === \"string\" ? value : \"\";\n }\n var values = Array.isArray(value) ? value : [];\n return [\n ...new Set(values)\n ];\n}\nfunction selectedValuesFromSelection(mode, value) {\n var normalized = normalizeSelectSelection(mode, value);\n return mode === \"multiple\" ? normalized : normalized ? [\n normalized\n ] : [];\n}\nfunction createSelectSelectionController(param) {\n var { mode: initialMode, value: initialValue, registry } = param;\n var mode = initialMode;\n var value = normalizeSelectSelection(mode, initialValue);\n var activeIndex = null;\n var selectedValues = function() {\n return selectedValuesFromSelection(mode, value);\n };\n var setMode = function(nextMode) {\n if (mode === nextMode) return value;\n mode = nextMode;\n value = normalizeSelectSelection(mode, value);\n return value;\n };\n var setValue = function(nextValue) {\n value = normalizeSelectSelection(mode, nextValue);\n return value;\n };\n var isSelected = function(itemValue) {\n return selectedValues().includes(itemValue);\n };\n var toggle = function(itemValue) {\n var item = registry.getItem(itemValue);\n if (!item || item.disabled) return value;\n if (mode === \"single\") {\n value = itemValue;\n return value;\n }\n var current = selectedValues();\n value = current.includes(itemValue) ? current.filter(function(currentValue) {\n return currentValue !== itemValue;\n }) : [\n ...current,\n itemValue\n ];\n return value;\n };\n var selectionAnchor = function() {\n var values = selectedValues();\n for (var index = values.length - 1; index >= 0; index--) {\n var item = registry.getItem(values[index]);\n if (item) return item;\n }\n var firstEnabledIndex = registry.firstEnabledIndex();\n return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];\n };\n var selectionAnchorIndex = function() {\n var anchor = selectionAnchor();\n return anchor ? registry.getIndex(anchor.value) : -1;\n };\n var initialActiveIndex = function() {\n var anchorIndex = selectionAnchorIndex();\n var anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];\n return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();\n };\n var moveActive = function(direction) {\n var nextIndex = registry.nextEnabledIndex(activeIndex, direction);\n activeIndex = nextIndex < 0 ? null : nextIndex;\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n };\n return {\n registry,\n get mode() {\n return mode;\n },\n get value() {\n return value;\n },\n get activeIndex() {\n return activeIndex;\n },\n get activeItem() {\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n },\n get shouldCloseOnSelect() {\n return mode === \"single\";\n },\n setMode,\n setValue,\n isSelected,\n toggle,\n selectionAnchor,\n selectionAnchorIndex,\n initialActiveIndex,\n setActiveIndex(index) {\n activeIndex = index;\n },\n moveActive\n };\n}\nfunction getSelectListboxProps(mode) {\n return {\n role: \"listbox\",\n \"aria-multiselectable\": mode === \"multiple\" ? true : void 0\n };\n}\nfunction getSelectOptionProps(mode, selected, disabled, platform) {\n if (platform === \"native\") {\n return {\n accessibilityRole: mode === \"multiple\" ? \"checkbox\" : \"button\",\n accessibilityState: {\n selected: mode === \"single\" ? selected : void 0,\n checked: mode === \"multiple\" ? selected : void 0,\n disabled\n }\n };\n }\n return {\n role: \"option\",\n \"aria-selected\": selected,\n \"aria-disabled\": disabled || void 0\n };\n}\n//# sourceMappingURL=selectionController.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IA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AAiB,aAAa,SAAS;EAChE,cAAc,YAAY,IAAI,OAAO;EACrC,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,CAAC,CAAC;CAC5D;CACA,OAAO;EACL;EACA,IAAI,OAAO;GACT,OAAO;EACT;EACA,IAAI,QAAQ;GACV,OAAO;EACT;EACA,IAAI,cAAc;GAChB,OAAO;EACT;EACA,IAAI,aAAa;GACf,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,CAAC,CAAC;EAC5D;EACA,IAAI,sBAAsB;GACxB,OAAO,SAAS;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe,OAAO;GACpB,cAAc;EAChB;EACA;CACF;AACF;AACA,SAAS,sBAAsB,MAAM;CACnC,OAAO;EACL,MAAM;EACN,wBAAwB,SAAS,aAAa,OAAO,KAAK;CAC5D;AACF;AACA,SAAS,qBAAqB,MAAM,UAAU,UAAU,UAAU;CAChE,IAAI,aAAa,UAAU;EACzB,OAAO;GACL,mBAAmB,SAAS,aAAa,aAAa;GACtD,oBAAoB;IAClB,UAAU,SAAS,WAAW,WAAW,KAAK;IAC9C,SAAS,SAAS,aAAa,WAAW,KAAK;IAC/C;GACF;EACF;CACF;CACA,OAAO;EACL,MAAM;EACN,iBAAiB;EACjB,iBAAiB,YAAY,KAAK;CACpC;AACF"}
1
+ {"version":3,"file":"selectionController.native.js","names":[],"sources":["jsx/selectionController.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar selectionController_exports = {};\n__export(selectionController_exports, {\n createSelectItemRegistry: () => createSelectItemRegistry,\n createSelectSelectionController: () => createSelectSelectionController,\n getSelectLabelText: () => getSelectLabelText,\n getSelectListboxProps: () => getSelectListboxProps,\n getSelectOptionProps: () => getSelectOptionProps,\n normalizeSelectSelection: () => normalizeSelectSelection,\n selectedValuesFromSelection: () => selectedValuesFromSelection\n});\nmodule.exports = __toCommonJS(selectionController_exports);\nfunction getSelectLabelText(label) {\n if (typeof label === \"string\" || typeof label === \"number\") {\n return String(label);\n }\n if (Array.isArray(label)) {\n return label.map(getSelectLabelText).join(\"\");\n }\n if (label && typeof label === \"object\" && \"props\" in label) {\n var _label_props;\n return getSelectLabelText((_label_props = label.props) === null || _label_props === void 0 ? void 0 : _label_props.children);\n }\n return \"\";\n}\nfunction createSelectItemRegistry(onChange) {\n var items = [];\n var labelRegistrations = /* @__PURE__ */ new Map();\n var explicitTextValues = /* @__PURE__ */ new Map();\n var itemNodes = /* @__PURE__ */ new Map();\n var listeners = /* @__PURE__ */ new Set();\n var indexByValue = null;\n var notify = function notify2() {\n indexByValue = null;\n onChange === null || onChange === void 0 ? void 0 : onChange();\n listeners.forEach(function(listener) {\n return listener();\n });\n };\n var getItems = function getItems2() {\n return items;\n };\n var getItem = function getItem2(value) {\n return items.find(function(item) {\n return item.value === value;\n });\n };\n var getIndex = function getIndex2(value) {\n var _indexByValue_get;\n if (!indexByValue) {\n indexByValue = /* @__PURE__ */ new Map();\n items.forEach(function(item, index) {\n if (!indexByValue.has(item.value)) indexByValue.set(item.value, index);\n });\n }\n return (_indexByValue_get = indexByValue.get(value)) !== null && _indexByValue_get !== void 0 ? _indexByValue_get : -1;\n };\n var getNodes = function getNodes2() {\n return items.map(function(item) {\n var _itemNodes_get;\n return (_itemNodes_get = itemNodes.get(item.id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null;\n });\n };\n var getRegisteredLabel = function getRegisteredLabel2(value) {\n var registrations = labelRegistrations.get(value);\n if (!(registrations === null || registrations === void 0 ? void 0 : registrations.size)) return void 0;\n var values = Array.from(registrations.values());\n return values[values.length - 1];\n };\n var applyRegisteredLabel = function applyRegisteredLabel2(value) {\n var registeredLabel = getRegisteredLabel(value);\n var changed = false;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var item = _step.value;\n if (item.value !== value) continue;\n var nextLabel = registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.label;\n var nextTextValue = explicitTextValues.get(item.id) || (registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.textValue);\n if (item.label !== nextLabel || item.textValue !== nextTextValue) {\n item.label = nextLabel;\n item.textValue = nextTextValue;\n changed = true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (changed) notify();\n };\n var syncNodeOrder = function syncNodeOrder2() {\n items.sort(function(a, b) {\n var aNode = itemNodes.get(a.id);\n var bNode = itemNodes.get(b.id);\n if (!aNode || !bNode || typeof aNode.compareDocumentPosition !== \"function\") {\n return 0;\n }\n var position = aNode.compareDocumentPosition(bNode);\n if (position & 4) return -1;\n if (position & 2) return 1;\n return 0;\n });\n };\n var registerItem = function registerItem2(item) {\n var _item_textValue;\n var id = Symbol(item.value);\n var registeredLabel = getRegisteredLabel(item.value);\n var registeredItem = {\n ...item,\n ...registeredLabel,\n textValue: (_item_textValue = item.textValue) !== null && _item_textValue !== void 0 ? _item_textValue : registeredLabel === null || registeredLabel === void 0 ? void 0 : registeredLabel.textValue,\n id\n };\n explicitTextValues.set(id, item.textValue);\n items.push(registeredItem);\n notify();\n return {\n id,\n update(next) {\n var index = items.findIndex(function(current2) {\n return current2.id === id;\n });\n if (index < 0) return;\n var current = items[index];\n if (\"textValue\" in next) {\n explicitTextValues.set(id, next.textValue);\n }\n var nextItem = {\n ...current,\n ...next\n };\n if (next.value !== void 0 && next.value !== current.value) {\n var nextLabel = getRegisteredLabel(next.value);\n nextItem.label = nextLabel === null || nextLabel === void 0 ? void 0 : nextLabel.label;\n }\n var explicitTextValue = explicitTextValues.get(id);\n nextItem.textValue = explicitTextValue || getSelectLabelText(nextItem.label) || (nextItem.label ? nextItem.value : void 0);\n var changed = Object.entries(next).some(function(param) {\n var [key, value] = param;\n return current[key] !== value;\n });\n var textValueChanged = current.textValue !== nextItem.textValue;\n if (!changed && !textValueChanged) return;\n items[index] = nextItem;\n notify();\n },\n setNode(node) {\n var _itemNodes_get;\n if (((_itemNodes_get = itemNodes.get(id)) !== null && _itemNodes_get !== void 0 ? _itemNodes_get : null) === (node !== null && node !== void 0 ? node : null)) return;\n if (node) {\n itemNodes.set(id, node);\n syncNodeOrder();\n } else {\n itemNodes.delete(id);\n }\n notify();\n },\n unregister() {\n var index = items.findIndex(function(current) {\n return current.id === id;\n });\n if (index < 0) return;\n items.splice(index, 1);\n explicitTextValues.delete(id);\n itemNodes.delete(id);\n notify();\n }\n };\n };\n var registerLabel = function registerLabel2(value, label, textValue) {\n var _labelRegistrations_get;\n var id = Symbol(value);\n var normalizedTextValue = textValue || getSelectLabelText(label) || value;\n var registrations = (_labelRegistrations_get = labelRegistrations.get(value)) !== null && _labelRegistrations_get !== void 0 ? _labelRegistrations_get : (function() {\n var next = /* @__PURE__ */ new Map();\n labelRegistrations.set(value, next);\n return next;\n })();\n registrations.set(id, {\n label,\n textValue: normalizedTextValue\n });\n applyRegisteredLabel(value);\n return function() {\n registrations.delete(id);\n if (!registrations.size) {\n labelRegistrations.delete(value);\n }\n applyRegisteredLabel(value);\n };\n };\n var firstEnabledIndex = function firstEnabledIndex2() {\n return items.findIndex(function(item) {\n return !item.disabled;\n });\n };\n var nextEnabledIndex = function nextEnabledIndex2(fromIndex, direction) {\n if (!items.length) return -1;\n if (fromIndex == null || fromIndex < 0 || fromIndex >= items.length) {\n if (direction === 1) return firstEnabledIndex();\n for (var index = items.length - 1; index >= 0; index--) {\n if (!items[index].disabled) return index;\n }\n return -1;\n }\n for (var offset = 1; offset <= items.length; offset++) {\n var _items_index;\n var index1 = (fromIndex + direction * offset + items.length) % items.length;\n if (!((_items_index = items[index1]) === null || _items_index === void 0 ? void 0 : _items_index.disabled)) return index1;\n }\n return -1;\n };\n var findTypeaheadIndex = function findTypeaheadIndex2(search, fromIndex) {\n var normalizedSearch = search.trim().toLocaleLowerCase();\n if (!normalizedSearch) return -1;\n var start = fromIndex == null || fromIndex < 0 ? -1 : fromIndex;\n for (var offset = 1; offset <= items.length; offset++) {\n var index = (start + offset) % items.length;\n var item = items[index];\n var label = item.textValue || getSelectLabelText(item.label) || item.value;\n if (!item.disabled && label.toLocaleLowerCase().startsWith(normalizedSearch)) {\n return index;\n }\n }\n return -1;\n };\n return {\n subscribe(listener) {\n listeners.add(listener);\n return function() {\n listeners.delete(listener);\n };\n },\n registerItem,\n registerLabel,\n getItems,\n getItem,\n getIndex,\n getNodes,\n firstEnabledIndex,\n nextEnabledIndex,\n findTypeaheadIndex,\n getDisabledIndices: function getDisabledIndices() {\n return items.flatMap(function(item, index) {\n return item.disabled ? [\n index\n ] : [];\n });\n },\n getTypeaheadLabels: function getTypeaheadLabels() {\n return items.map(function(item) {\n return item.textValue || getSelectLabelText(item.label) || item.value;\n });\n }\n };\n}\nfunction normalizeSelectSelection(mode, value) {\n if (mode === \"single\") {\n return typeof value === \"string\" ? value : \"\";\n }\n var values = Array.isArray(value) ? value : [];\n return [\n ...new Set(values)\n ];\n}\nfunction selectedValuesFromSelection(mode, value) {\n var normalized = normalizeSelectSelection(mode, value);\n return mode === \"multiple\" ? normalized : normalized ? [\n normalized\n ] : [];\n}\nfunction createSelectSelectionController(param) {\n var { mode: initialMode, value: initialValue, registry } = param;\n var mode = initialMode;\n var value = normalizeSelectSelection(mode, initialValue);\n var activeIndex = null;\n var selectedValues = function selectedValues2() {\n return selectedValuesFromSelection(mode, value);\n };\n var setMode = function setMode2(nextMode) {\n if (mode === nextMode) return value;\n mode = nextMode;\n value = normalizeSelectSelection(mode, value);\n return value;\n };\n var setValue = function setValue2(nextValue) {\n value = normalizeSelectSelection(mode, nextValue);\n return value;\n };\n var isSelected = function isSelected2(itemValue) {\n return selectedValues().includes(itemValue);\n };\n var toggle = function toggle2(itemValue) {\n var item = registry.getItem(itemValue);\n if (!item || item.disabled) return value;\n if (mode === \"single\") {\n value = itemValue;\n return value;\n }\n var current = selectedValues();\n value = current.includes(itemValue) ? current.filter(function(currentValue) {\n return currentValue !== itemValue;\n }) : [\n ...current,\n itemValue\n ];\n return value;\n };\n var selectionAnchor = function selectionAnchor2() {\n var values = selectedValues();\n for (var index = values.length - 1; index >= 0; index--) {\n var item = registry.getItem(values[index]);\n if (item) return item;\n }\n var firstEnabledIndex = registry.firstEnabledIndex();\n return firstEnabledIndex < 0 ? void 0 : registry.getItems()[firstEnabledIndex];\n };\n var selectionAnchorIndex = function selectionAnchorIndex2() {\n var anchor = selectionAnchor();\n return anchor ? registry.getIndex(anchor.value) : -1;\n };\n var initialActiveIndex = function initialActiveIndex2() {\n var anchorIndex = selectionAnchorIndex();\n var anchor = anchorIndex < 0 ? void 0 : registry.getItems()[anchorIndex];\n return anchor && !anchor.disabled ? anchorIndex : registry.firstEnabledIndex();\n };\n var moveActive = function moveActive2(direction) {\n var nextIndex = registry.nextEnabledIndex(activeIndex, direction);\n activeIndex = nextIndex < 0 ? null : nextIndex;\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n };\n return {\n registry,\n get mode() {\n return mode;\n },\n get value() {\n return value;\n },\n get activeIndex() {\n return activeIndex;\n },\n get activeItem() {\n return activeIndex == null ? void 0 : registry.getItems()[activeIndex];\n },\n get shouldCloseOnSelect() {\n return mode === \"single\";\n },\n setMode,\n setValue,\n isSelected,\n toggle,\n selectionAnchor,\n selectionAnchorIndex,\n initialActiveIndex,\n setActiveIndex(index) {\n activeIndex = index;\n },\n moveActive\n };\n}\nfunction getSelectListboxProps(mode) {\n return {\n role: \"listbox\",\n \"aria-multiselectable\": mode === \"multiple\" ? true : void 0\n };\n}\nfunction getSelectOptionProps(mode, selected, disabled, platform) {\n if (platform === \"native\") {\n return {\n accessibilityRole: mode === \"multiple\" ? \"checkbox\" : \"button\",\n accessibilityState: {\n selected: mode === \"single\" ? selected : void 0,\n checked: mode === \"multiple\" ? selected : void 0,\n disabled\n }\n };\n }\n return {\n role: \"option\",\n \"aria-selected\": selected,\n \"aria-disabled\": disabled || void 0\n };\n}\n//# sourceMappingURL=selectionController.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,8B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IAAI,KAAK,IAAI,SAAS,SAAS,CAAC,CAAC;EAC5D,OAAO,UAAU,CAAC,OAAO,WAAW,cAAc,SAAS,kBAAkB;CAC/E;CACA,IAAI,aAAa,SAAS,YAAY,WAAW;EAC/C,IAAI,YAAY,SAAS,iBAAiB,aAAa,SAAS;EAChE,cAAc,YAAY,IAAI,OAAO;EACrC,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,CAAC,CAAC;CAC5D;CACA,OAAO;EACL;EACA,IAAI,OAAO;GACT,OAAO;EACT;EACA,IAAI,QAAQ;GACV,OAAO;EACT;EACA,IAAI,cAAc;GAChB,OAAO;EACT;EACA,IAAI,aAAa;GACf,OAAO,eAAe,OAAO,KAAK,IAAI,SAAS,SAAS,CAAC,CAAC;EAC5D;EACA,IAAI,sBAAsB;GACxB,OAAO,SAAS;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe,OAAO;GACpB,cAAc;EAChB;EACA;CACF;AACF;AACA,SAAS,sBAAsB,MAAM;CACnC,OAAO;EACL,MAAM;EACN,wBAAwB,SAAS,aAAa,OAAO,KAAK;CAC5D;AACF;AACA,SAAS,qBAAqB,MAAM,UAAU,UAAU,UAAU;CAChE,IAAI,aAAa,UAAU;EACzB,OAAO;GACL,mBAAmB,SAAS,aAAa,aAAa;GACtD,oBAAoB;IAClB,UAAU,SAAS,WAAW,WAAW,KAAK;IAC9C,SAAS,SAAS,aAAa,WAAW,KAAK;IAC/C;GACF;EACF;CACF;CACA,OAAO;EACL,MAAM;EACN,iBAAiB;EACjB,iBAAiB,YAAY,KAAK;CACpC;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/select",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "license": "MIT",
5
5
  "source": "src/index.tsx",
6
6
  "files": [
@@ -35,33 +35,33 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/adapt": "3.0.7",
39
- "@tamagui/animate-presence": "3.0.7",
40
- "@tamagui/compose-refs": "3.0.7",
41
- "@tamagui/constants": "3.0.7",
42
- "@tamagui/core": "3.0.7",
43
- "@tamagui/create-context": "3.0.7",
44
- "@tamagui/dismissable": "3.0.7",
45
- "@tamagui/floating": "3.0.7",
46
- "@tamagui/focus-scope": "3.0.7",
47
- "@tamagui/focusable": "3.0.7",
48
- "@tamagui/get-token": "3.0.7",
49
- "@tamagui/helpers": "3.0.7",
50
- "@tamagui/list-item": "3.0.7",
51
- "@tamagui/native": "3.0.7",
52
- "@tamagui/portal": "3.0.7",
53
- "@tamagui/remove-scroll": "3.0.7",
54
- "@tamagui/separator": "3.0.7",
55
- "@tamagui/sheet": "3.0.7",
56
- "@tamagui/stacks": "3.0.7",
57
- "@tamagui/text": "3.0.7",
58
- "@tamagui/use-controllable-state": "3.0.7",
59
- "@tamagui/use-debounce": "3.0.7",
60
- "@tamagui/use-event": "3.0.7",
61
- "@tamagui/z-index-stack": "3.0.7"
38
+ "@tamagui/adapt": "3.0.9",
39
+ "@tamagui/animate-presence": "3.0.9",
40
+ "@tamagui/compose-refs": "3.0.9",
41
+ "@tamagui/constants": "3.0.9",
42
+ "@tamagui/core": "3.0.9",
43
+ "@tamagui/create-context": "3.0.9",
44
+ "@tamagui/dismissable": "3.0.9",
45
+ "@tamagui/floating": "3.0.9",
46
+ "@tamagui/focus-scope": "3.0.9",
47
+ "@tamagui/focusable": "3.0.9",
48
+ "@tamagui/get-token": "3.0.9",
49
+ "@tamagui/helpers": "3.0.9",
50
+ "@tamagui/list-item": "3.0.9",
51
+ "@tamagui/native": "3.0.9",
52
+ "@tamagui/portal": "3.0.9",
53
+ "@tamagui/remove-scroll": "3.0.9",
54
+ "@tamagui/separator": "3.0.9",
55
+ "@tamagui/sheet": "3.0.9",
56
+ "@tamagui/stacks": "3.0.9",
57
+ "@tamagui/text": "3.0.9",
58
+ "@tamagui/use-controllable-state": "3.0.9",
59
+ "@tamagui/use-debounce": "3.0.9",
60
+ "@tamagui/use-event": "3.0.9",
61
+ "@tamagui/z-index-stack": "3.0.9"
62
62
  },
63
63
  "devDependencies": {
64
- "@tamagui/build": "3.0.7",
64
+ "@tamagui/build": "3.0.9",
65
65
  "react": "19.2.3",
66
66
  "react-dom": "19.2.3",
67
67
  "react-native": "0.87.1"
@@ -77,5 +77,5 @@
77
77
  "url": "git+https://github.com/tamagui/tamagui.git",
78
78
  "directory": "code/ui/select"
79
79
  },
80
- "releaseSourceCommit": "96f8bc1f222af0381729a2e2202370aa4a9808ef"
80
+ "releaseSourceCommit": "1971272fa9915450004c84ea48188100fdf278ff"
81
81
  }