tamagui 1.130.5 → 1.130.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +11 -11
- package/dist/cjs/views/Input.cjs +1 -1
- package/dist/cjs/views/TextArea.cjs +2 -2
- package/dist/native.js +75 -13
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +75 -13
- package/dist/test.native.js.map +3 -3
- package/package.json +58 -56
package/dist/cjs/index.cjs
CHANGED
|
@@ -84,7 +84,7 @@ __export(index_exports, {
|
|
|
84
84
|
withStaticProperties: () => import_core.withStaticProperties
|
|
85
85
|
});
|
|
86
86
|
module.exports = __toCommonJS(index_exports);
|
|
87
|
-
var import_setup = require("./setup
|
|
87
|
+
var import_setup = require("./setup");
|
|
88
88
|
__reExport(index_exports, require("@tamagui/accordion"), module.exports);
|
|
89
89
|
__reExport(index_exports, require("@tamagui/adapt"), module.exports);
|
|
90
90
|
__reExport(index_exports, require("@tamagui/alert-dialog"), module.exports);
|
|
@@ -128,14 +128,14 @@ __reExport(index_exports, require("@tamagui/use-debounce"), module.exports);
|
|
|
128
128
|
__reExport(index_exports, require("@tamagui/use-force-update"), module.exports);
|
|
129
129
|
__reExport(index_exports, require("@tamagui/use-window-dimensions"), module.exports);
|
|
130
130
|
__reExport(index_exports, require("@tamagui/visually-hidden"), module.exports);
|
|
131
|
-
__reExport(index_exports, require("./createTamagui
|
|
132
|
-
__reExport(index_exports, require("./viewTypes
|
|
133
|
-
__reExport(index_exports, require("./views/TamaguiProvider
|
|
134
|
-
__reExport(index_exports, require("./views/Anchor
|
|
135
|
-
__reExport(index_exports, require("./views/EnsureFlexed
|
|
136
|
-
__reExport(index_exports, require("./views/Fieldset
|
|
137
|
-
__reExport(index_exports, require("./views/Input
|
|
138
|
-
__reExport(index_exports, require("./views/Spinner
|
|
139
|
-
__reExport(index_exports, require("./views/TextArea
|
|
140
|
-
__reExport(index_exports, require("./views/Text
|
|
131
|
+
__reExport(index_exports, require("./createTamagui"), module.exports);
|
|
132
|
+
__reExport(index_exports, require("./viewTypes"), module.exports);
|
|
133
|
+
__reExport(index_exports, require("./views/TamaguiProvider"), module.exports);
|
|
134
|
+
__reExport(index_exports, require("./views/Anchor"), module.exports);
|
|
135
|
+
__reExport(index_exports, require("./views/EnsureFlexed"), module.exports);
|
|
136
|
+
__reExport(index_exports, require("./views/Fieldset"), module.exports);
|
|
137
|
+
__reExport(index_exports, require("./views/Input"), module.exports);
|
|
138
|
+
__reExport(index_exports, require("./views/Spinner"), module.exports);
|
|
139
|
+
__reExport(index_exports, require("./views/TextArea"), module.exports);
|
|
140
|
+
__reExport(index_exports, require("./views/Text"), module.exports);
|
|
141
141
|
var import_core = require("@tamagui/core");
|
package/dist/cjs/views/Input.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var import_react = __toESM(require("react")),
|
|
|
42
42
|
import_core = require("@tamagui/core"),
|
|
43
43
|
import_focusable = require("@tamagui/focusable"),
|
|
44
44
|
import_react_native = require("react-native-web"),
|
|
45
|
-
import_inputHelpers = require("../helpers/inputHelpers
|
|
45
|
+
import_inputHelpers = require("../helpers/inputHelpers"),
|
|
46
46
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
47
47
|
const defaultStyles = {
|
|
48
48
|
size: "$true",
|
|
@@ -38,8 +38,8 @@ module.exports = __toCommonJS(TextArea_exports);
|
|
|
38
38
|
var import_react = __toESM(require("react")),
|
|
39
39
|
import_constants = require("@tamagui/constants"),
|
|
40
40
|
import_core = require("@tamagui/core"),
|
|
41
|
-
import_inputHelpers = require("../helpers/inputHelpers
|
|
42
|
-
import_Input = require("./Input
|
|
41
|
+
import_inputHelpers = require("../helpers/inputHelpers"),
|
|
42
|
+
import_Input = require("./Input"),
|
|
43
43
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
44
44
|
const TextAreaFrame = (0, import_core.styled)(import_Input.InputFrame, {
|
|
45
45
|
name: "TextArea",
|
package/dist/native.js
CHANGED
|
@@ -2205,6 +2205,58 @@ We have a CLI tool to help check this:
|
|
|
2205
2205
|
}
|
|
2206
2206
|
});
|
|
2207
2207
|
|
|
2208
|
+
// ../../core/web/dist/cjs/loadDuplicatedConfig.native.js
|
|
2209
|
+
var require_loadDuplicatedConfig_native = __commonJS({
|
|
2210
|
+
"../../core/web/dist/cjs/loadDuplicatedConfig.native.js"(exports2, module2) {
|
|
2211
|
+
"use strict";
|
|
2212
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2213
|
+
for (var name in all) __defProp2(target, name, {
|
|
2214
|
+
get: all[name],
|
|
2215
|
+
enumerable: !0
|
|
2216
|
+
});
|
|
2217
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2218
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2219
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2220
|
+
for (var _loop = function() {
|
|
2221
|
+
var key = _step.value;
|
|
2222
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2223
|
+
get: function() {
|
|
2224
|
+
return from[key];
|
|
2225
|
+
},
|
|
2226
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2227
|
+
});
|
|
2228
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2229
|
+
} catch (err) {
|
|
2230
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2231
|
+
} finally {
|
|
2232
|
+
try {
|
|
2233
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2234
|
+
} finally {
|
|
2235
|
+
if (_didIteratorError)
|
|
2236
|
+
throw _iteratorError;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
return to;
|
|
2240
|
+
}, __toCommonJS2 = function(mod) {
|
|
2241
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2242
|
+
value: !0
|
|
2243
|
+
}), mod);
|
|
2244
|
+
}, loadDuplicatedConfig_exports = {};
|
|
2245
|
+
__export2(loadDuplicatedConfig_exports, {
|
|
2246
|
+
loadDuplicatedConfig: function() {
|
|
2247
|
+
return loadDuplicatedConfig;
|
|
2248
|
+
}
|
|
2249
|
+
});
|
|
2250
|
+
module2.exports = __toCommonJS2(loadDuplicatedConfig_exports);
|
|
2251
|
+
var hasLogged = !1;
|
|
2252
|
+
function loadDuplicatedConfig() {
|
|
2253
|
+
return process.env.NODE_ENV !== "production" && globalThis.__tamaguiConfig ? (hasLogged = !0, hasLogged || console.warn(`Warning: You have duplicate Tamagui dependencies which can cause major, confusing issues.
|
|
2254
|
+
In dev/test, we're working around this by loading a previously loaded config.
|
|
2255
|
+
In production, this will error.`), globalThis.__tamaguiConfig) : null;
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
});
|
|
2259
|
+
|
|
2208
2260
|
// ../../core/web/dist/cjs/config.native.js
|
|
2209
2261
|
var require_config_native = __commonJS({
|
|
2210
2262
|
"../../core/web/dist/cjs/config.native.js"(exports2, module2) {
|
|
@@ -2299,7 +2351,7 @@ var require_config_native = __commonJS({
|
|
|
2299
2351
|
}
|
|
2300
2352
|
});
|
|
2301
2353
|
module2.exports = __toCommonJS2(config_exports);
|
|
2302
|
-
var import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
2354
|
+
var import_constants4 = require_index_native6(), import_constants22 = require_constants_native2(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
2303
2355
|
Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
2304
2356
|
` : "\u274C Error 001", getSetting2 = function(key) {
|
|
2305
2357
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
@@ -2314,6 +2366,8 @@ Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
|
2314
2366
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
2315
2367
|
conf.fonts[name] = font, conf.fontsParsed[`$${name}`] = fontParsed;
|
|
2316
2368
|
}, getConfig3 = function() {
|
|
2369
|
+
var dup = (0, import_loadDuplicatedConfig.loadDuplicatedConfig)();
|
|
2370
|
+
if (dup) return dup;
|
|
2317
2371
|
if (!conf) throw new Error(process.env.NODE_ENV !== "production" ? "Missing tamagui config, you either have a duplicate config, or haven't set it up. Be sure createTamagui is called before rendering. Also, make sure all of your tamagui dependencies are on the same version (`tamagui`, `@tamagui/package-name`, etc.) not just in your package.json, but in your lockfile." : "Err0");
|
|
2318
2372
|
return conf;
|
|
2319
2373
|
}, getConfigMaybe = function() {
|
|
@@ -10002,7 +10056,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
10002
10056
|
}
|
|
10003
10057
|
});
|
|
10004
10058
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
10005
|
-
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(),
|
|
10059
|
+
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), import_Tamagui = require_Tamagui_native();
|
|
10006
10060
|
function shouldTokenCategoryHaveUnits(category) {
|
|
10007
10061
|
var UNIT_CATEGORIES = /* @__PURE__ */ new Set([
|
|
10008
10062
|
"size",
|
|
@@ -10012,9 +10066,8 @@ var require_createTamagui_native = __commonJS({
|
|
|
10012
10066
|
return UNIT_CATEGORIES.has(category);
|
|
10013
10067
|
}
|
|
10014
10068
|
function createTamagui2(configIn) {
|
|
10015
|
-
var _configIn_settings;
|
|
10016
|
-
if (
|
|
10017
|
-
if (createdConfigs.has(configIn)) return configIn;
|
|
10069
|
+
var _configIn_settings, dup = (0, import_loadDuplicatedConfig.loadDuplicatedConfig)();
|
|
10070
|
+
if (dup) return dup;
|
|
10018
10071
|
var tokensParsed = {}, tokens = (0, import_createVariables.createVariables)(configIn.tokens || {});
|
|
10019
10072
|
if (configIn.tokens) {
|
|
10020
10073
|
var tokensMerged = {};
|
|
@@ -10165,7 +10218,7 @@ ${JSON.stringify(variable, null, 2)}`);
|
|
|
10165
10218
|
specificTokens,
|
|
10166
10219
|
defaultFontToken
|
|
10167
10220
|
};
|
|
10168
|
-
if ((0, import_config.setConfig)(config), (0, import_useMedia.configureMedia)(config),
|
|
10221
|
+
if ((0, import_config.setConfig)(config), (0, import_useMedia.configureMedia)(config), process.env.NODE_ENV === "test" && (globalThis.__tamaguiConfig = config), import_config.configListeners.size && (import_config.configListeners.forEach(function(cb) {
|
|
10169
10222
|
return cb(config);
|
|
10170
10223
|
}), import_config.configListeners.clear()), process.env.NODE_ENV === "development") {
|
|
10171
10224
|
var _process_env_DEBUG;
|
|
@@ -18225,6 +18278,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
18225
18278
|
if (!animationDriver) throw new Error(process.env.NODE_ENV === "production" ? "\u274C 008" : "Must set animations in tamagui.config.ts");
|
|
18226
18279
|
var scrollBridge = (0, import_use_constant.useConstant)(function() {
|
|
18227
18280
|
var parentDragListeners = /* @__PURE__ */ new Set(), bridge = {
|
|
18281
|
+
hasScrollableContent: !1,
|
|
18228
18282
|
enabled: !1,
|
|
18229
18283
|
y: 0,
|
|
18230
18284
|
paneY: 0,
|
|
@@ -18639,7 +18693,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18639
18693
|
screenSize,
|
|
18640
18694
|
frameSize
|
|
18641
18695
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18642
|
-
isAbleToPosition && animateTo(position);
|
|
18696
|
+
isAbleToPosition && (animateTo(position), position === -1 && (scrollBridge.scrollLock = !1, scrollBridge.scrollStartY = -1));
|
|
18643
18697
|
}, [
|
|
18644
18698
|
isAbleToPosition,
|
|
18645
18699
|
position
|
|
@@ -18671,9 +18725,13 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18671
18725
|
var { dy } = param;
|
|
18672
18726
|
function getShouldSet() {
|
|
18673
18727
|
if (e.target === providerProps.handleRef.current) return !0;
|
|
18674
|
-
if (scrollBridge.
|
|
18675
|
-
|
|
18676
|
-
|
|
18728
|
+
if (scrollBridge.hasScrollableContent === !0) {
|
|
18729
|
+
if (scrollBridge.scrollLock) return !1;
|
|
18730
|
+
var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
18731
|
+
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18732
|
+
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18733
|
+
}
|
|
18734
|
+
return Math.abs(dy) > 5;
|
|
18677
18735
|
}
|
|
18678
18736
|
var granted = getShouldSet();
|
|
18679
18737
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -19094,9 +19152,13 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
19094
19152
|
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
19095
19153
|
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
19096
19154
|
};
|
|
19097
|
-
return
|
|
19155
|
+
return (0, import_react3.useEffect)(function() {
|
|
19156
|
+
scrollBridge.hasScrollableContent = hasScrollableContent;
|
|
19157
|
+
}, [
|
|
19158
|
+
hasScrollableContent
|
|
19159
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
19098
19160
|
onLayout: function(e) {
|
|
19099
|
-
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
19161
|
+
parentHeight.current = Math.ceil(e.nativeEvent.layout.height), setIsScrollable();
|
|
19100
19162
|
},
|
|
19101
19163
|
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
19102
19164
|
flex: 1,
|
|
@@ -19151,7 +19213,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
19151
19213
|
pointerEvents: "none",
|
|
19152
19214
|
zIndex: -1,
|
|
19153
19215
|
onLayout: function(e) {
|
|
19154
|
-
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
19216
|
+
contentHeight.current = Math.floor(e.nativeEvent.layout.height), setIsScrollable();
|
|
19155
19217
|
}
|
|
19156
19218
|
}),
|
|
19157
19219
|
children
|