@tamagui/dismissable 3.0.0-beta.669.1 → 3.0.0-beta.728.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,4 +1,3 @@
1
-
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
6
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
6
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1 +1 @@
1
- {"version":3,"file":"Dismissable.native.js","names":[],"sources":["cjs/Dismissable.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 Dismissable_native_exports = {};\n__export(Dismissable_native_exports, {\n Dismissable: () => Dismissable,\n DismissableBranch: () => DismissableBranch,\n dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent,\n getDismissableLayerCount: () => getDismissableLayerCount,\n useDismissableLayersAbove: () => useDismissableLayersAbove,\n useHasDismissableLayers: () => useHasDismissableLayers,\n useIsInsideDismissable: () => useIsInsideDismissable\n});\nmodule.exports = __toCommonJS(Dismissable_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction dispatchDiscreteCustomEvent(_target, _event) {\n}\nfunction getDismissableLayerCount() {\n return 0;\n}\nfunction useHasDismissableLayers() {\n return false;\n}\nfunction useIsInsideDismissable(_ref) {\n return false;\n}\nfunction useDismissableLayersAbove(_ref) {\n return 0;\n}\nvar Dismissable = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\nvar DismissableBranch = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\n//# sourceMappingURL=Dismissable.native.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,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,mBAAmB;CACnB,yBAAyB;CACzB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,+BAA+B;CAC/B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,4BAA4B,SAAS,QAAQ,CACtD;AACA,SAAS,2BAA2B;CAClC,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,OAAO;AACT;AACA,SAAS,uBAAuB,MAAM;CACpC,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,OAAO;AACT;AACA,IAAI,eAAe,GAAG,YAAY,oBAAoB,SAAS,OAAO,MAAM;CAC1E,OAAO,MAAM;AACf,CAAC;AACD,IAAI,qBAAqB,GAAG,YAAY,oBAAoB,SAAS,OAAO,MAAM;CAChF,OAAO,MAAM;AACf,CAAC"}
1
+ {"version":3,"file":"Dismissable.native.js","names":[],"sources":["cjs/Dismissable.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 Dismissable_native_exports = {};\n__export(Dismissable_native_exports, {\n Dismissable: () => Dismissable,\n DismissableBranch: () => DismissableBranch,\n dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent,\n getDismissableLayerCount: () => getDismissableLayerCount,\n useDismissableLayersAbove: () => useDismissableLayersAbove,\n useHasDismissableLayers: () => useHasDismissableLayers,\n useIsInsideDismissable: () => useIsInsideDismissable\n});\nmodule.exports = __toCommonJS(Dismissable_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction dispatchDiscreteCustomEvent(_target, _event) {\n}\nfunction getDismissableLayerCount() {\n return 0;\n}\nfunction useHasDismissableLayers() {\n return false;\n}\nfunction useIsInsideDismissable(_ref) {\n return false;\n}\nfunction useDismissableLayersAbove(_ref) {\n return 0;\n}\nvar Dismissable = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\nvar DismissableBranch = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\n//# sourceMappingURL=Dismissable.native.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,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,mBAAmB;CACnB,yBAAyB;CACzB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,+BAA+B;CAC/B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,4BAA4B,SAAS,QAAQ,CACtD;AACA,SAAS,2BAA2B;CAClC,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,OAAO;AACT;AACA,SAAS,uBAAuB,MAAM;CACpC,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,OAAO;AACT;AACA,IAAI,eAAe,GAAG,YAAY,mBAAkB,CAAE,SAAS,OAAO,MAAM;CAC1E,OAAO,MAAM;AACf,CAAC;AACD,IAAI,qBAAqB,GAAG,YAAY,mBAAkB,CAAE,SAAS,OAAO,MAAM;CAChF,OAAO,MAAM;AACf,CAAC"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"DismissableProps.native.js","names":[],"sources":["cjs/DismissableProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 DismissableProps_exports = {};\nmodule.exports = __toCommonJS(DismissableProps_exports);\n//# sourceMappingURL=DismissableProps.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,2BAA2B,CAAC;AAChC,OAAO,UAAU,aAAa,wBAAwB"}
1
+ {"version":3,"file":"DismissableProps.native.js","names":[],"sources":["cjs/DismissableProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 DismissableProps_exports = {};\nmodule.exports = __toCommonJS(DismissableProps_exports);\n//# sourceMappingURL=DismissableProps.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,2BAA2B,CAAC;AAChC,OAAO,UAAU,aAAa,wBAAwB"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Dismissable\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Dismissable\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dismissable.js","names":[],"sources":["esm/Dismissable.js"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport {\n Slot,\n View,\n composeEventHandlers,\n createChangeEventDetails,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useEscapeKeydown } from \"@tamagui/use-escape-keydown\";\nimport { useEvent } from \"@tamagui/use-event\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nconst DISMISSABLE_LAYER_NAME = \"Dismissable\";\nconst CONTEXT_UPDATE = \"dismissable.update\";\nlet originalBodyPointerEvents;\nconst globalLayers = /* @__PURE__ */ new Set();\nconst layerChangeListeners = /* @__PURE__ */ new Set();\nlet layersWithPointerEventsDisabledCount = 0;\nfunction notifyLayerChange() {\n for (const listener of layerChangeListeners) {\n listener();\n }\n}\nfunction getDismissableLayerCount() {\n return globalLayers.size;\n}\nfunction debugDismissableLayers() {\n const layers = Array.from(globalLayers);\n console.log(\"[Dismissable] Active layers:\", layers.length, layers);\n return layers;\n}\nfunction useHasDismissableLayers() {\n const [count, setCount] = React.useState(() => globalLayers.size);\n React.useEffect(() => {\n setCount(globalLayers.size);\n const update = () => setCount(globalLayers.size);\n layerChangeListeners.add(update);\n return () => {\n layerChangeListeners.delete(update);\n };\n }, []);\n return count > 0;\n}\nconst DismissableContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nfunction useIsInsideDismissable(ref) {\n const context = React.useContext(DismissableContext);\n const [isInside, setIsInside] = React.useState(false);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setIsInside(false);\n return;\n }\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n setIsInside(true);\n return;\n }\n }\n setIsInside(false);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return isInside;\n}\nfunction useDismissableLayersAbove(ref) {\n const context = React.useContext(DismissableContext);\n const [count, setCount] = React.useState(0);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setCount(0);\n return;\n }\n let above = 0;\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n above++;\n }\n }\n setCount(above);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return count;\n}\nconst Dismissable = createRefComponent((props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n forceUnmount,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n asChild,\n children,\n branches: branchesProp,\n ...layerProps\n } = props;\n const Comp = asChild ? Slot : View;\n const context = React.useContext(DismissableContext);\n const [node, setNode] = React.useState(null);\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node2) => setNode(node2)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(\n highestLayerWithOutsidePointerEventsDisabled\n );\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isPointerDownOnBranch = [...branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n const details = createChangeEventDetails(\"outside-press\", event, event.target, {\n interaction: \"pointer\"\n });\n onPointerDownOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isFocusInBranch = [...branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n if (node && target.contains(node)) return;\n const details = createChangeEventDetails(\"focus-out\", event, event.target, {\n interaction: \"focus\"\n });\n onFocusOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const forceUnmountRef = React.useRef(forceUnmount);\n React.useEffect(() => {\n forceUnmountRef.current = forceUnmount;\n }, [forceUnmount]);\n useEscapeKeydown((event) => {\n if (event.defaultPrevented) return;\n if (forceUnmountRef.current) return;\n const currentLayers = Array.from(context.layers);\n const currentIndex = node ? currentLayers.indexOf(node) : -1;\n const isHighestLayer = currentIndex === currentLayers.length - 1;\n if (!isHighestLayer) return;\n const details = createChangeEventDetails(\"escape-key\", event, event.target);\n onEscapeKeyDown?.(details);\n if (!details.isCanceled && onDismiss) {\n event.preventDefault();\n onDismiss(details);\n }\n });\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n context.layers.add(node);\n globalLayers.add(node);\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layers.delete(node);\n globalLayers.delete(node);\n dispatchUpdate();\n notifyLayerChange();\n };\n }, [node, forceUnmount, context]);\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n if (!disableOutsidePointerEvents) return;\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n layersWithPointerEventsDisabledCount++;\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n dispatchUpdate();\n notifyLayerChange();\n layersWithPointerEventsDisabledCount--;\n };\n }, [node, disableOutsidePointerEvents, forceUnmount, context]);\n React.useEffect(() => {\n const handleUpdate = () => {\n if (layersWithPointerEventsDisabledCount > 0) {\n force({});\n }\n };\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Comp,\n {\n ...layerProps,\n ref: composedRefs,\n ...!asChild && {\n display: \"contents\"\n },\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n onFocusCapture: composeEventHandlers(\n props.onFocusCapture,\n focusOutside.onFocusCapture\n ),\n onBlurCapture: composeEventHandlers(\n props.onBlurCapture,\n focusOutside.onBlurCapture\n ),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n ),\n children\n }\n );\n});\nDismissable.displayName = DISMISSABLE_LAYER_NAME;\nconst BRANCH_NAME = \"DismissableBranch\";\nconst DismissableBranch = createRefComponent(\n (props, forwardedRef) => {\n const { branches: branchesProp, ...rest } = props;\n const context = React.useContext(DismissableContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (!(node instanceof HTMLElement)) return;\n const branches = branchesProp || context.branches;\n if (node && branches) {\n branches.add(node);\n return () => {\n branches.delete(node);\n };\n }\n }, [branchesProp, context.branches]);\n return /* @__PURE__ */ jsx(View, { asChild: \"except-style\", ...rest, ref: composedRefs });\n }\n);\nDismissableBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside) {\n const handlePointerDownOutside = useEvent(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handlePointerDownOutsideEvent = function() {\n if (handlePointerDownOutside) {\n ReactDOM.flushSync(() => handlePointerDownOutside(event));\n }\n };\n if (event.pointerType === \"touch\") {\n document.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handlePointerDownOutsideEvent;\n document.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handlePointerDownOutsideEvent();\n }\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = setTimeout(() => {\n document.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n document.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => {\n isPointerInsideReactTreeRef.current = true;\n }\n };\n}\nfunction useFocusOutside(onFocusOutside) {\n const handleFocusOutside = useEvent(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n handleFocusOutside?.(event);\n }\n };\n document.addEventListener(\"focusin\", handleFocus);\n return () => document.removeEventListener(\"focusin\", handleFocus);\n }, [handleFocusOutside]);\n return {\n onFocusCapture: () => {\n isFocusInsideReactTreeRef.current = true;\n },\n onBlurCapture: () => {\n isFocusInsideReactTreeRef.current = false;\n }\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nexport {\n Dismissable,\n DismissableBranch,\n debugDismissableLayers,\n dispatchDiscreteCustomEvent,\n getDismissableLayerCount,\n useDismissableLayersAbove,\n useHasDismissableLayers,\n useIsInsideDismissable\n};\n//# sourceMappingURL=Dismissable.js.map\n"],"mappings":";;;;;;;;;AAaA,SAAS,4BAA4B,QAAQ,OAAO;CAClD,IAAI,QAAQ,SAAS,gBAAgB,OAAO,cAAc,KAAK,CAAC;AAClE;AACA,MAAM,yBAAyB;AAC/B,MAAM,iBAAiB;AACvB,IAAI;AACJ,MAAM,+BAA+B,IAAI,IAAI;AAC7C,MAAM,uCAAuC,IAAI,IAAI;AACrD,IAAI,uCAAuC;AAC3C,SAAS,oBAAoB;CAC3B,KAAK,MAAM,YAAY,sBAAsB;EAC3C,SAAS;CACX;AACF;AACA,SAAS,2BAA2B;CAClC,OAAO,aAAa;AACtB;AACA,SAAS,yBAAyB;CAChC,MAAM,SAAS,MAAM,KAAK,YAAY;CACtC,QAAQ,IAAI,gCAAgC,OAAO,QAAQ,MAAM;CACjE,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,MAAM,CAAC,OAAO,YAAY,MAAM,eAAe,aAAa,IAAI;CAChE,MAAM,gBAAgB;EACpB,SAAS,aAAa,IAAI;EAC1B,MAAM,eAAe,SAAS,aAAa,IAAI;EAC/C,qBAAqB,IAAI,MAAM;EAC/B,aAAa;GACX,qBAAqB,OAAO,MAAM;EACpC;CACF,GAAG,CAAC,CAAC;CACL,OAAO,QAAQ;AACjB;AACA,MAAM,qBAAqB,MAAM,cAAc;CAC7C,wBAAwB,IAAI,IAAI;CAChC,wDAAwD,IAAI,IAAI;CAChE,0BAA0B,IAAI,IAAI;AACpC,CAAC;AACD,SAAS,uBAAuB,KAAK;CACnC,MAAM,UAAU,MAAM,WAAW,kBAAkB;CACnD,MAAM,CAAC,UAAU,eAAe,MAAM,SAAS,KAAK;CACpD,MAAM,gBAAgB;EACpB,MAAM,cAAc;GAClB,MAAM,KAAK,IAAI;GACf,IAAI,CAAC,IAAI;IACP,YAAY,KAAK;IACjB;GACF;GACA,KA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gBAAgB,SAAS;KACjC,SAAS,oBAAoB,SAAS,eAAe,OAAO;KAC5D,eAAe,UAAU;KACzB,SAAS,iBAAiB,SAAS,eAAe,SAAS,EAAE,MAAM,KAAK,CAAC;IAC3E,OAAO;KACL,8BAA8B;IAChC;GACF;GACA,4BAA4B,UAAU;EACxC;EACA,MAAM,UAAU,iBAAiB;GAC/B,SAAS,iBAAiB,eAAe,iBAAiB;EAC5D,GAAG,CAAC;EACJ,aAAa;GACX,OAAO,aAAa,OAAO;GAC3B,SAAS,oBAAoB,eAAe,iBAAiB;GAC7D,SAAS,oBAAoB,SAAS,eAAe,OAAO;EAC9D;CACF,GAAG,CAAC,wBAAwB,CAAC;CAC7B,OAAO,EAEL,4BAA4B;EAC1B,4BAA4B,UAAU;CACxC,EACF;AACF;AACA,SAAS,gBAAgB,gBAAgB;CACvC,MAAM,qBAAqB,SAAS,cAAc;CAClD,MAAM,4BAA4B,MAAM,OAAO,KAAK;CACpD,MAAM,gBAAgB;EACpB,MAAM,eAAe,UAAU;GAC7B,IAAI,MAAM,UAAU,CAAC,0BAA0B,SAAS;IACtD,qBAAqB,KAAK;GAC5B;EACF;EACA,SAAS,iBAAiB,WAAW,WAAW;EAChD,aAAa,SAAS,oBAAoB,WAAW,WAAW;CAClE,GAAG,CAAC,kBAAkB,CAAC;CACvB,OAAO;EACL,sBAAsB;GACpB,0BAA0B,UAAU;EACtC;EACA,qBAAqB;GACnB,0BAA0B,UAAU;EACtC;CACF;AACF;AACA,SAAS,iBAAiB;CACxB,MAAM,QAAQ,IAAI,YAAY,cAAc;CAC5C,SAAS,cAAc,KAAK;AAC9B"}
1
+ {"version":3,"file":"Dismissable.js","names":[],"sources":["esm/Dismissable.js"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport {\n Slot,\n View,\n composeEventHandlers,\n createChangeEventDetails,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useEscapeKeydown } from \"@tamagui/use-escape-keydown\";\nimport { useEvent } from \"@tamagui/use-event\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nconst DISMISSABLE_LAYER_NAME = \"Dismissable\";\nconst CONTEXT_UPDATE = \"dismissable.update\";\nlet originalBodyPointerEvents;\nconst globalLayers = /* @__PURE__ */ new Set();\nconst layerChangeListeners = /* @__PURE__ */ new Set();\nlet layersWithPointerEventsDisabledCount = 0;\nfunction notifyLayerChange() {\n for (const listener of layerChangeListeners) {\n listener();\n }\n}\nfunction getDismissableLayerCount() {\n return globalLayers.size;\n}\nfunction debugDismissableLayers() {\n const layers = Array.from(globalLayers);\n console.log(\"[Dismissable] Active layers:\", layers.length, layers);\n return layers;\n}\nfunction useHasDismissableLayers() {\n const [count, setCount] = React.useState(() => globalLayers.size);\n React.useEffect(() => {\n setCount(globalLayers.size);\n const update = () => setCount(globalLayers.size);\n layerChangeListeners.add(update);\n return () => {\n layerChangeListeners.delete(update);\n };\n }, []);\n return count > 0;\n}\nconst DismissableContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nfunction useIsInsideDismissable(ref) {\n const context = React.useContext(DismissableContext);\n const [isInside, setIsInside] = React.useState(false);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setIsInside(false);\n return;\n }\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n setIsInside(true);\n return;\n }\n }\n setIsInside(false);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return isInside;\n}\nfunction useDismissableLayersAbove(ref) {\n const context = React.useContext(DismissableContext);\n const [count, setCount] = React.useState(0);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setCount(0);\n return;\n }\n let above = 0;\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n above++;\n }\n }\n setCount(above);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return count;\n}\nconst Dismissable = createRefComponent((props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n forceUnmount,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n asChild,\n children,\n branches: branchesProp,\n ...layerProps\n } = props;\n const Comp = asChild ? Slot : View;\n const context = React.useContext(DismissableContext);\n const [node, setNode] = React.useState(null);\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node2) => setNode(node2)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(\n highestLayerWithOutsidePointerEventsDisabled\n );\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isPointerDownOnBranch = [...branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n const details = createChangeEventDetails(\"outside-press\", event, event.target, {\n interaction: \"pointer\"\n });\n onPointerDownOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isFocusInBranch = [...branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n if (node && target.contains(node)) return;\n const details = createChangeEventDetails(\"focus-out\", event, event.target, {\n interaction: \"focus\"\n });\n onFocusOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const forceUnmountRef = React.useRef(forceUnmount);\n React.useEffect(() => {\n forceUnmountRef.current = forceUnmount;\n }, [forceUnmount]);\n useEscapeKeydown((event) => {\n if (event.defaultPrevented) return;\n if (forceUnmountRef.current) return;\n const currentLayers = Array.from(context.layers);\n const currentIndex = node ? currentLayers.indexOf(node) : -1;\n const isHighestLayer = currentIndex === currentLayers.length - 1;\n if (!isHighestLayer) return;\n const details = createChangeEventDetails(\"escape-key\", event, event.target);\n onEscapeKeyDown?.(details);\n if (!details.isCanceled && onDismiss) {\n event.preventDefault();\n onDismiss(details);\n }\n });\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n context.layers.add(node);\n globalLayers.add(node);\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layers.delete(node);\n globalLayers.delete(node);\n dispatchUpdate();\n notifyLayerChange();\n };\n }, [node, forceUnmount, context]);\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n if (!disableOutsidePointerEvents) return;\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n layersWithPointerEventsDisabledCount++;\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n dispatchUpdate();\n notifyLayerChange();\n layersWithPointerEventsDisabledCount--;\n };\n }, [node, disableOutsidePointerEvents, forceUnmount, context]);\n React.useEffect(() => {\n const handleUpdate = () => {\n if (layersWithPointerEventsDisabledCount > 0) {\n force({});\n }\n };\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Comp,\n {\n ...layerProps,\n ref: composedRefs,\n ...!asChild && {\n display: \"contents\"\n },\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n onFocusCapture: composeEventHandlers(\n props.onFocusCapture,\n focusOutside.onFocusCapture\n ),\n onBlurCapture: composeEventHandlers(\n props.onBlurCapture,\n focusOutside.onBlurCapture\n ),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n ),\n children\n }\n );\n});\nDismissable.displayName = DISMISSABLE_LAYER_NAME;\nconst BRANCH_NAME = \"DismissableBranch\";\nconst DismissableBranch = createRefComponent(\n (props, forwardedRef) => {\n const { branches: branchesProp, ...rest } = props;\n const context = React.useContext(DismissableContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (!(node instanceof HTMLElement)) return;\n const branches = branchesProp || context.branches;\n if (node && branches) {\n branches.add(node);\n return () => {\n branches.delete(node);\n };\n }\n }, [branchesProp, context.branches]);\n return /* @__PURE__ */ jsx(View, { asChild: \"except-style\", ...rest, ref: composedRefs });\n }\n);\nDismissableBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside) {\n const handlePointerDownOutside = useEvent(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handlePointerDownOutsideEvent = function() {\n if (handlePointerDownOutside) {\n ReactDOM.flushSync(() => handlePointerDownOutside(event));\n }\n };\n if (event.pointerType === \"touch\") {\n document.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handlePointerDownOutsideEvent;\n document.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handlePointerDownOutsideEvent();\n }\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = setTimeout(() => {\n document.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n document.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => {\n isPointerInsideReactTreeRef.current = true;\n }\n };\n}\nfunction useFocusOutside(onFocusOutside) {\n const handleFocusOutside = useEvent(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n handleFocusOutside?.(event);\n }\n };\n document.addEventListener(\"focusin\", handleFocus);\n return () => document.removeEventListener(\"focusin\", handleFocus);\n }, [handleFocusOutside]);\n return {\n onFocusCapture: () => {\n isFocusInsideReactTreeRef.current = true;\n },\n onBlurCapture: () => {\n isFocusInsideReactTreeRef.current = false;\n }\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nexport {\n Dismissable,\n DismissableBranch,\n debugDismissableLayers,\n dispatchDiscreteCustomEvent,\n getDismissableLayerCount,\n useDismissableLayersAbove,\n useHasDismissableLayers,\n useIsInsideDismissable\n};\n//# sourceMappingURL=Dismissable.js.map\n"],"mappings":";;;;;;;;;AAaA,SAAS,4BAA4B,QAAQ,OAAO;CAClD,IAAI,QAAQ,SAAS,gBAAgB,OAAO,cAAc,KAAK,CAAC;AAClE;AACA,MAAM,yBAAyB;AAC/B,MAAM,iBAAiB;AACvB,IAAI;AACJ,MAAM,+BAA+B,IAAI,IAAI;AAC7C,MAAM,uCAAuC,IAAI,IAAI;AACrD,IAAI,uCAAuC;AAC3C,SAAS,oBAAoB;CAC3B,KAAK,MAAM,YAAY,sBAAsB;EAC3C,SAAS;CACX;AACF;AACA,SAAS,2BAA2B;CAClC,OAAO,aAAa;AACtB;A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A4B,UAAU;CACxC,EACF;AACF;AACA,SAAS,gBAAgB,gBAAgB;CACvC,MAAM,qBAAqB,SAAS,cAAc;CAClD,MAAM,4BAA4B,MAAM,OAAO,KAAK;CACpD,MAAM,gBAAgB;EACpB,MAAM,eAAe,UAAU;GAC7B,IAAI,MAAM,UAAU,CAAC,0BAA0B,SAAS;IACtD,qBAAqB,KAAK;GAC5B;EACF;EACA,SAAS,iBAAiB,WAAW,WAAW;EAChD,aAAa,SAAS,oBAAoB,WAAW,WAAW;CAClE,GAAG,CAAC,kBAAkB,CAAC;CACvB,OAAO;EACL,sBAAsB;GACpB,0BAA0B,UAAU;EACtC;EACA,qBAAqB;GACnB,0BAA0B,UAAU;EACtC;CACF;AACF;AACA,SAAS,iBAAiB;CACxB,MAAM,QAAQ,IAAI,YAAY,cAAc;CAC5C,SAAS,cAAc,KAAK;AAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dismissable.js","names":[],"sources":["jsx/Dismissable.js"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport {\n Slot,\n View,\n composeEventHandlers,\n createChangeEventDetails,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useEscapeKeydown } from \"@tamagui/use-escape-keydown\";\nimport { useEvent } from \"@tamagui/use-event\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nconst DISMISSABLE_LAYER_NAME = \"Dismissable\";\nconst CONTEXT_UPDATE = \"dismissable.update\";\nlet originalBodyPointerEvents;\nconst globalLayers = /* @__PURE__ */ new Set();\nconst layerChangeListeners = /* @__PURE__ */ new Set();\nlet layersWithPointerEventsDisabledCount = 0;\nfunction notifyLayerChange() {\n for (const listener of layerChangeListeners) {\n listener();\n }\n}\nfunction getDismissableLayerCount() {\n return globalLayers.size;\n}\nfunction debugDismissableLayers() {\n const layers = Array.from(globalLayers);\n console.log(\"[Dismissable] Active layers:\", layers.length, layers);\n return layers;\n}\nfunction useHasDismissableLayers() {\n const [count, setCount] = React.useState(() => globalLayers.size);\n React.useEffect(() => {\n setCount(globalLayers.size);\n const update = () => setCount(globalLayers.size);\n layerChangeListeners.add(update);\n return () => {\n layerChangeListeners.delete(update);\n };\n }, []);\n return count > 0;\n}\nconst DismissableContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nfunction useIsInsideDismissable(ref) {\n const context = React.useContext(DismissableContext);\n const [isInside, setIsInside] = React.useState(false);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setIsInside(false);\n return;\n }\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n setIsInside(true);\n return;\n }\n }\n setIsInside(false);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return isInside;\n}\nfunction useDismissableLayersAbove(ref) {\n const context = React.useContext(DismissableContext);\n const [count, setCount] = React.useState(0);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setCount(0);\n return;\n }\n let above = 0;\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n above++;\n }\n }\n setCount(above);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return count;\n}\nconst Dismissable = createRefComponent((props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n forceUnmount,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n asChild,\n children,\n branches: branchesProp,\n ...layerProps\n } = props;\n const Comp = asChild ? Slot : View;\n const context = React.useContext(DismissableContext);\n const [node, setNode] = React.useState(null);\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node2) => setNode(node2)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(\n highestLayerWithOutsidePointerEventsDisabled\n );\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isPointerDownOnBranch = [...branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n const details = createChangeEventDetails(\"outside-press\", event, event.target, {\n interaction: \"pointer\"\n });\n onPointerDownOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isFocusInBranch = [...branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n if (node && target.contains(node)) return;\n const details = createChangeEventDetails(\"focus-out\", event, event.target, {\n interaction: \"focus\"\n });\n onFocusOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const forceUnmountRef = React.useRef(forceUnmount);\n React.useEffect(() => {\n forceUnmountRef.current = forceUnmount;\n }, [forceUnmount]);\n useEscapeKeydown((event) => {\n if (event.defaultPrevented) return;\n if (forceUnmountRef.current) return;\n const currentLayers = Array.from(context.layers);\n const currentIndex = node ? currentLayers.indexOf(node) : -1;\n const isHighestLayer = currentIndex === currentLayers.length - 1;\n if (!isHighestLayer) return;\n const details = createChangeEventDetails(\"escape-key\", event, event.target);\n onEscapeKeyDown?.(details);\n if (!details.isCanceled && onDismiss) {\n event.preventDefault();\n onDismiss(details);\n }\n });\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n context.layers.add(node);\n globalLayers.add(node);\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layers.delete(node);\n globalLayers.delete(node);\n dispatchUpdate();\n notifyLayerChange();\n };\n }, [node, forceUnmount, context]);\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n if (!disableOutsidePointerEvents) return;\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n layersWithPointerEventsDisabledCount++;\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n dispatchUpdate();\n notifyLayerChange();\n layersWithPointerEventsDisabledCount--;\n };\n }, [node, disableOutsidePointerEvents, forceUnmount, context]);\n React.useEffect(() => {\n const handleUpdate = () => {\n if (layersWithPointerEventsDisabledCount > 0) {\n force({});\n }\n };\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Comp,\n {\n ...layerProps,\n ref: composedRefs,\n ...!asChild && {\n display: \"contents\"\n },\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n onFocusCapture: composeEventHandlers(\n props.onFocusCapture,\n focusOutside.onFocusCapture\n ),\n onBlurCapture: composeEventHandlers(\n props.onBlurCapture,\n focusOutside.onBlurCapture\n ),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n ),\n children\n }\n );\n});\nDismissable.displayName = DISMISSABLE_LAYER_NAME;\nconst BRANCH_NAME = \"DismissableBranch\";\nconst DismissableBranch = createRefComponent(\n (props, forwardedRef) => {\n const { branches: branchesProp, ...rest } = props;\n const context = React.useContext(DismissableContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (!(node instanceof HTMLElement)) return;\n const branches = branchesProp || context.branches;\n if (node && branches) {\n branches.add(node);\n return () => {\n branches.delete(node);\n };\n }\n }, [branchesProp, context.branches]);\n return /* @__PURE__ */ jsx(View, { asChild: \"except-style\", ...rest, ref: composedRefs });\n }\n);\nDismissableBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside) {\n const handlePointerDownOutside = useEvent(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handlePointerDownOutsideEvent = function() {\n if (handlePointerDownOutside) {\n ReactDOM.flushSync(() => handlePointerDownOutside(event));\n }\n };\n if (event.pointerType === \"touch\") {\n document.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handlePointerDownOutsideEvent;\n document.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handlePointerDownOutsideEvent();\n }\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = setTimeout(() => {\n document.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n document.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => {\n isPointerInsideReactTreeRef.current = true;\n }\n };\n}\nfunction useFocusOutside(onFocusOutside) {\n const handleFocusOutside = useEvent(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n handleFocusOutside?.(event);\n }\n };\n document.addEventListener(\"focusin\", handleFocus);\n return () => document.removeEventListener(\"focusin\", handleFocus);\n }, [handleFocusOutside]);\n return {\n onFocusCapture: () => {\n isFocusInsideReactTreeRef.current = true;\n },\n onBlurCapture: () => {\n isFocusInsideReactTreeRef.current = false;\n }\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nexport {\n Dismissable,\n DismissableBranch,\n debugDismissableLayers,\n dispatchDiscreteCustomEvent,\n getDismissableLayerCount,\n useDismissableLayersAbove,\n useHasDismissableLayers,\n useIsInsideDismissable\n};\n//# sourceMappingURL=Dismissable.js.map\n"],"mappings":";;;;;;;;;AAaA,SAAS,4BAA4B,QAAQ,OAAO;CAClD,IAAI,QAAQ,SAAS,gBAAgB,OAAO,cAAc,KAAK,CAAC;AAClE;AACA,MAAM,yBAAyB;AAC/B,MAAM,iBAAiB;AACvB,IAAI;AACJ,MAAM,+BAA+B,IAAI,IAAI;AAC7C,MAAM,uCAAuC,IAAI,IAAI;AACrD,IAAI,uCAAuC;AAC3C,SAAS,oBAAoB;CAC3B,KAAK,MAAM,YAAY,sBAAsB;EAC3C,SAAS;CACX;AACF;AACA,SAAS,2BAA2B;CAClC,OAAO,aAAa;AACtB;AACA,SAAS,yBAAyB;CAChC,MAAM,SAAS,MAAM,KAAK,YAAY;CACtC,QAAQ,IAAI,gCAAgC,OAAO,QAAQ,MAAM;CACjE,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,MAAM,CAAC,OAAO,YAAY,MAAM,eAAe,aAAa,IAAI;CAChE,MAAM,gBAAgB;EACpB,SAAS,aAAa,IAAI;EAC1B,MAAM,eAAe,SAAS,aAAa,IAAI;EAC/C,qBAAqB,IAAI,MAAM;EAC/B,aAAa;GACX,qBAAqB,OAAO,MAAM;EACpC;CACF,GAAG,CAAC,CAAC;CACL,OAAO,QAAQ;AACjB;AACA,MAAM,qBAAqB,MAAM,cAAc;CAC7C,wBAAwB,IAAI,IAAI;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;CACxB,MAAM,QAAQ,IAAI,YAAY,cAAc;CAC5C,SAAS,cAAc,KAAK;AAC9B"}
1
+ {"version":3,"file":"Dismissable.js","names":[],"sources":["jsx/Dismissable.js"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport {\n Slot,\n View,\n composeEventHandlers,\n createChangeEventDetails,\n createRefComponent\n} from \"@tamagui/core\";\nimport { useEscapeKeydown } from \"@tamagui/use-escape-keydown\";\nimport { useEvent } from \"@tamagui/use-event\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nconst DISMISSABLE_LAYER_NAME = \"Dismissable\";\nconst CONTEXT_UPDATE = \"dismissable.update\";\nlet originalBodyPointerEvents;\nconst globalLayers = /* @__PURE__ */ new Set();\nconst layerChangeListeners = /* @__PURE__ */ new Set();\nlet layersWithPointerEventsDisabledCount = 0;\nfunction notifyLayerChange() {\n for (const listener of layerChangeListeners) {\n listener();\n }\n}\nfunction getDismissableLayerCount() {\n return globalLayers.size;\n}\nfunction debugDismissableLayers() {\n const layers = Array.from(globalLayers);\n console.log(\"[Dismissable] Active layers:\", layers.length, layers);\n return layers;\n}\nfunction useHasDismissableLayers() {\n const [count, setCount] = React.useState(() => globalLayers.size);\n React.useEffect(() => {\n setCount(globalLayers.size);\n const update = () => setCount(globalLayers.size);\n layerChangeListeners.add(update);\n return () => {\n layerChangeListeners.delete(update);\n };\n }, []);\n return count > 0;\n}\nconst DismissableContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nfunction useIsInsideDismissable(ref) {\n const context = React.useContext(DismissableContext);\n const [isInside, setIsInside] = React.useState(false);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setIsInside(false);\n return;\n }\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n setIsInside(true);\n return;\n }\n }\n setIsInside(false);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return isInside;\n}\nfunction useDismissableLayersAbove(ref) {\n const context = React.useContext(DismissableContext);\n const [count, setCount] = React.useState(0);\n React.useEffect(() => {\n const check = () => {\n const el = ref.current;\n if (!el) {\n setCount(0);\n return;\n }\n let above = 0;\n for (const layer of context.layers) {\n if (layer.contains(el)) {\n above++;\n }\n }\n setCount(above);\n };\n check();\n document.addEventListener(CONTEXT_UPDATE, check);\n return () => document.removeEventListener(CONTEXT_UPDATE, check);\n }, [context.layers, ref]);\n return count;\n}\nconst Dismissable = createRefComponent((props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n forceUnmount,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n asChild,\n children,\n branches: branchesProp,\n ...layerProps\n } = props;\n const Comp = asChild ? Slot : View;\n const context = React.useContext(DismissableContext);\n const [node, setNode] = React.useState(null);\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node2) => setNode(node2)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(\n highestLayerWithOutsidePointerEventsDisabled\n );\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isPointerDownOnBranch = [...branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n const details = createChangeEventDetails(\"outside-press\", event, event.target, {\n interaction: \"pointer\"\n });\n onPointerDownOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const branches = branchesProp || context.branches;\n const isFocusInBranch = [...branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n if (node && target.contains(node)) return;\n const details = createChangeEventDetails(\"focus-out\", event, event.target, {\n interaction: \"focus\"\n });\n onFocusOutside?.(details);\n onInteractOutside?.(details);\n if (!details.isCanceled) onDismiss?.(details);\n });\n const forceUnmountRef = React.useRef(forceUnmount);\n React.useEffect(() => {\n forceUnmountRef.current = forceUnmount;\n }, [forceUnmount]);\n useEscapeKeydown((event) => {\n if (event.defaultPrevented) return;\n if (forceUnmountRef.current) return;\n const currentLayers = Array.from(context.layers);\n const currentIndex = node ? currentLayers.indexOf(node) : -1;\n const isHighestLayer = currentIndex === currentLayers.length - 1;\n if (!isHighestLayer) return;\n const details = createChangeEventDetails(\"escape-key\", event, event.target);\n onEscapeKeyDown?.(details);\n if (!details.isCanceled && onDismiss) {\n event.preventDefault();\n onDismiss(details);\n }\n });\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n context.layers.add(node);\n globalLayers.add(node);\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layers.delete(node);\n globalLayers.delete(node);\n dispatchUpdate();\n notifyLayerChange();\n };\n }, [node, forceUnmount, context]);\n React.useEffect(() => {\n if (!node) return;\n if (forceUnmount) return;\n if (!disableOutsidePointerEvents) return;\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n layersWithPointerEventsDisabledCount++;\n dispatchUpdate();\n notifyLayerChange();\n return () => {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n dispatchUpdate();\n notifyLayerChange();\n layersWithPointerEventsDisabledCount--;\n };\n }, [node, disableOutsidePointerEvents, forceUnmount, context]);\n React.useEffect(() => {\n const handleUpdate = () => {\n if (layersWithPointerEventsDisabledCount > 0) {\n force({});\n }\n };\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Comp,\n {\n ...layerProps,\n ref: composedRefs,\n ...!asChild && {\n display: \"contents\"\n },\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n onFocusCapture: composeEventHandlers(\n props.onFocusCapture,\n focusOutside.onFocusCapture\n ),\n onBlurCapture: composeEventHandlers(\n props.onBlurCapture,\n focusOutside.onBlurCapture\n ),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n ),\n children\n }\n );\n});\nDismissable.displayName = DISMISSABLE_LAYER_NAME;\nconst BRANCH_NAME = \"DismissableBranch\";\nconst DismissableBranch = createRefComponent(\n (props, forwardedRef) => {\n const { branches: branchesProp, ...rest } = props;\n const context = React.useContext(DismissableContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (!(node instanceof HTMLElement)) return;\n const branches = branchesProp || context.branches;\n if (node && branches) {\n branches.add(node);\n return () => {\n branches.delete(node);\n };\n }\n }, [branchesProp, context.branches]);\n return /* @__PURE__ */ jsx(View, { asChild: \"except-style\", ...rest, ref: composedRefs });\n }\n);\nDismissableBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside) {\n const handlePointerDownOutside = useEvent(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handlePointerDownOutsideEvent = function() {\n if (handlePointerDownOutside) {\n ReactDOM.flushSync(() => handlePointerDownOutside(event));\n }\n };\n if (event.pointerType === \"touch\") {\n document.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handlePointerDownOutsideEvent;\n document.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handlePointerDownOutsideEvent();\n }\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = setTimeout(() => {\n document.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n document.removeEventListener(\"pointerdown\", handlePointerDown);\n document.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => {\n isPointerInsideReactTreeRef.current = true;\n }\n };\n}\nfunction useFocusOutside(onFocusOutside) {\n const handleFocusOutside = useEvent(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n handleFocusOutside?.(event);\n }\n };\n document.addEventListener(\"focusin\", handleFocus);\n return () => document.removeEventListener(\"focusin\", handleFocus);\n }, [handleFocusOutside]);\n return {\n onFocusCapture: () => {\n isFocusInsideReactTreeRef.current = true;\n },\n onBlurCapture: () => {\n isFocusInsideReactTreeRef.current = false;\n }\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nexport {\n Dismissable,\n DismissableBranch,\n debugDismissableLayers,\n dispatchDiscreteCustomEvent,\n getDismissableLayerCount,\n useDismissableLayersAbove,\n useHasDismissableLayers,\n useIsInsideDismissable\n};\n//# sourceMappingURL=Dismissable.js.map\n"],"mappings":";;;;;;;;;AAaA,SAAS,4BAA4B,QAAQ,OAAO;CAClD,IAAI,QAAQ,SAAS,gB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GACF;GACA,4BAA4B,UAAU;EACxC;EACA,MAAM,UAAU,iBAAiB;GAC/B,SAAS,iBAAiB,eAAe,iBAAiB;EAC5D,GAAG,CAAC;EACJ,aAAa;GACX,OAAO,aAAa,OAAO;GAC3B,SAAS,oBAAoB,eAAe,iBAAiB;GAC7D,SAAS,oBAAoB,SAAS,eAAe,OAAO;EAC9D;CACF,GAAG,CAAC,wBAAwB,CAAC;CAC7B,OAAO,EAEL,4BAA4B;EAC1B,4BAA4B,UAAU;CACxC,EACF;AACF;AACA,SAAS,gBAAgB,gBAAgB;CACvC,MAAM,qBAAqB,SAAS,cAAc;CAClD,MAAM,4BAA4B,MAAM,OAAO,KAAK;CACpD,MAAM,gBAAgB;EACpB,MAAM,eAAe,UAAU;GAC7B,IAAI,MAAM,UAAU,CAAC,0BAA0B,SAAS;IACtD,qBAAqB,KAAK;GAC5B;EACF;EACA,SAAS,iBAAiB,WAAW,WAAW;EAChD,aAAa,SAAS,oBAAoB,WAAW,WAAW;CAClE,GAAG,CAAC,kBAAkB,CAAC;CACvB,OAAO;EACL,sBAAsB;GACpB,0BAA0B,UAAU;EACtC;EACA,qBAAqB;GACnB,0BAA0B,UAAU;EACtC;CACF;AACF;AACA,SAAS,iBAAiB;CACxB,MAAM,QAAQ,IAAI,YAAY,cAAc;CAC5C,SAAS,cAAc,KAAK;AAC9B"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
6
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __create = Object.create;
5
4
  var __defProp = Object.defineProperty;
6
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1 +1 @@
1
- {"version":3,"file":"Dismissable.native.js","names":[],"sources":["jsx/Dismissable.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 Dismissable_native_exports = {};\n__export(Dismissable_native_exports, {\n Dismissable: () => Dismissable,\n DismissableBranch: () => DismissableBranch,\n dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent,\n getDismissableLayerCount: () => getDismissableLayerCount,\n useDismissableLayersAbove: () => useDismissableLayersAbove,\n useHasDismissableLayers: () => useHasDismissableLayers,\n useIsInsideDismissable: () => useIsInsideDismissable\n});\nmodule.exports = __toCommonJS(Dismissable_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction dispatchDiscreteCustomEvent(_target, _event) {\n}\nfunction getDismissableLayerCount() {\n return 0;\n}\nfunction useHasDismissableLayers() {\n return false;\n}\nfunction useIsInsideDismissable(_ref) {\n return false;\n}\nfunction useDismissableLayersAbove(_ref) {\n return 0;\n}\nvar Dismissable = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\nvar DismissableBranch = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\n//# sourceMappingURL=Dismissable.native.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,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,mBAAmB;CACnB,yBAAyB;CACzB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,+BAA+B;CAC/B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,4BAA4B,SAAS,QAAQ,CACtD;AACA,SAAS,2BAA2B;CAClC,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,OAAO;AACT;AACA,SAAS,uBAAuB,MAAM;CACpC,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,OAAO;AACT;AACA,IAAI,eAAe,GAAG,YAAY,oBAAoB,SAAS,OAAO,MAAM;CAC1E,OAAO,MAAM;AACf,CAAC;AACD,IAAI,qBAAqB,GAAG,YAAY,oBAAoB,SAAS,OAAO,MAAM;CAChF,OAAO,MAAM;AACf,CAAC"}
1
+ {"version":3,"file":"Dismissable.native.js","names":[],"sources":["jsx/Dismissable.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 Dismissable_native_exports = {};\n__export(Dismissable_native_exports, {\n Dismissable: () => Dismissable,\n DismissableBranch: () => DismissableBranch,\n dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent,\n getDismissableLayerCount: () => getDismissableLayerCount,\n useDismissableLayersAbove: () => useDismissableLayersAbove,\n useHasDismissableLayers: () => useHasDismissableLayers,\n useIsInsideDismissable: () => useIsInsideDismissable\n});\nmodule.exports = __toCommonJS(Dismissable_native_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nfunction dispatchDiscreteCustomEvent(_target, _event) {\n}\nfunction getDismissableLayerCount() {\n return 0;\n}\nfunction useHasDismissableLayers() {\n return false;\n}\nfunction useIsInsideDismissable(_ref) {\n return false;\n}\nfunction useDismissableLayersAbove(_ref) {\n return 0;\n}\nvar Dismissable = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\nvar DismissableBranch = (0, import_core.createRefComponent)(function(props, _ref) {\n return props.children;\n});\n//# sourceMappingURL=Dismissable.native.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,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,mBAAmB;CACnB,yBAAyB;CACzB,mCAAmC;CACnC,gCAAgC;CAChC,iCAAiC;CACjC,+BAA+B;CAC/B,8BAA8B;AAChC,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,SAAS,4BAA4B,SAAS,QAAQ,CACtD;AACA,SAAS,2BAA2B;CAClC,OAAO;AACT;AACA,SAAS,0BAA0B;CACjC,OAAO;AACT;AACA,SAAS,uBAAuB,MAAM;CACpC,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,OAAO;AACT;AACA,IAAI,eAAe,GAAG,YAAY,mBAAkB,CAAE,SAAS,OAAO,MAAM;CAC1E,OAAO,MAAM;AACf,CAAC;AACD,IAAI,qBAAqB,GAAG,YAAY,mBAAkB,CAAE,SAAS,OAAO,MAAM;CAChF,OAAO,MAAM;AACf,CAAC"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"DismissableProps.native.js","names":[],"sources":["jsx/DismissableProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 DismissableProps_exports = {};\nmodule.exports = __toCommonJS(DismissableProps_exports);\n//# sourceMappingURL=DismissableProps.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,2BAA2B,CAAC;AAChC,OAAO,UAAU,aAAa,wBAAwB"}
1
+ {"version":3,"file":"DismissableProps.native.js","names":[],"sources":["jsx/DismissableProps.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 DismissableProps_exports = {};\nmodule.exports = __toCommonJS(DismissableProps_exports);\n//# sourceMappingURL=DismissableProps.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,2BAA2B,CAAC;AAChC,OAAO,UAAU,aAAa,wBAAwB"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Dismissable\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Dismissable\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/dismissable",
3
- "version": "3.0.0-beta.669.1",
3
+ "version": "3.0.0-beta.728.1",
4
4
  "source": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -34,16 +34,16 @@
34
34
  "clean:build": "tamagui-build clean:build"
35
35
  },
36
36
  "dependencies": {
37
- "@tamagui/compose-refs": "3.0.0-beta.669.1",
38
- "@tamagui/core": "3.0.0-beta.669.1",
39
- "@tamagui/helpers": "3.0.0-beta.669.1",
40
- "@tamagui/use-escape-keydown": "3.0.0-beta.669.1",
41
- "@tamagui/use-event": "3.0.0-beta.669.1"
37
+ "@tamagui/compose-refs": "3.0.0-beta.728.1",
38
+ "@tamagui/core": "3.0.0-beta.728.1",
39
+ "@tamagui/helpers": "3.0.0-beta.728.1",
40
+ "@tamagui/use-escape-keydown": "3.0.0-beta.728.1",
41
+ "@tamagui/use-event": "3.0.0-beta.728.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@tamagui/build": "3.0.0-beta.669.1",
45
- "react": ">=19",
46
- "react-dom": "*"
44
+ "@tamagui/build": "3.0.0-beta.728.1",
45
+ "react": "19.2.3",
46
+ "react-dom": "19.2.3"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": ">=19",