tamagui 1.123.17 → 1.124.0
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/native.js +1353 -1648
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +969 -1231
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -3116,11 +3116,11 @@ var require_useMedia_native = __commonJS({
|
|
|
3116
3116
|
}
|
|
3117
3117
|
});
|
|
3118
3118
|
|
|
3119
|
-
// ../../core/web/dist/cjs/
|
|
3120
|
-
var
|
|
3121
|
-
"../../core/web/dist/cjs/
|
|
3119
|
+
// ../../core/web/dist/cjs/Tamagui.native.js
|
|
3120
|
+
var require_Tamagui_native = __commonJS({
|
|
3121
|
+
"../../core/web/dist/cjs/Tamagui.native.js"(exports2, module2) {
|
|
3122
3122
|
"use strict";
|
|
3123
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3123
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3124
3124
|
for (var name in all) __defProp2(target, name, {
|
|
3125
3125
|
get: all[name],
|
|
3126
3126
|
enumerable: !0
|
|
@@ -3148,48 +3148,51 @@ var require_constants_native2 = __commonJS({
|
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
3150
3150
|
return to;
|
|
3151
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
3152
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
3153
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
3154
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
3155
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3156
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3157
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
3158
|
+
value: mod,
|
|
3159
|
+
enumerable: !0
|
|
3160
|
+
}) : target,
|
|
3161
|
+
mod
|
|
3162
|
+
);
|
|
3151
3163
|
}, __toCommonJS2 = function(mod) {
|
|
3152
3164
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3153
3165
|
value: !0
|
|
3154
3166
|
}), mod);
|
|
3155
|
-
},
|
|
3156
|
-
__export2(
|
|
3157
|
-
|
|
3158
|
-
return
|
|
3159
|
-
},
|
|
3160
|
-
THEME_CLASSNAME_PREFIX: function() {
|
|
3161
|
-
return THEME_CLASSNAME_PREFIX;
|
|
3162
|
-
},
|
|
3163
|
-
THEME_NAME_SEPARATOR: function() {
|
|
3164
|
-
return THEME_NAME_SEPARATOR;
|
|
3167
|
+
}, Tamagui_exports = {};
|
|
3168
|
+
__export2(Tamagui_exports, {
|
|
3169
|
+
Tamagui: function() {
|
|
3170
|
+
return Tamagui;
|
|
3165
3171
|
},
|
|
3166
|
-
|
|
3167
|
-
return
|
|
3172
|
+
getValueFromIdentifier: function() {
|
|
3173
|
+
return getValueFromIdentifier;
|
|
3168
3174
|
},
|
|
3169
|
-
|
|
3170
|
-
return
|
|
3175
|
+
setIdentifierValue: function() {
|
|
3176
|
+
return setIdentifierValue;
|
|
3171
3177
|
}
|
|
3172
3178
|
});
|
|
3173
|
-
module2.exports = __toCommonJS2(
|
|
3174
|
-
var
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
minHeight: 0,
|
|
3182
|
-
minWidth: 0,
|
|
3183
|
-
flexShrink: 0
|
|
3179
|
+
module2.exports = __toCommonJS2(Tamagui_exports);
|
|
3180
|
+
var Helpers = __toESM2(require_index_native7()), import_config = require_config_native(), import_insertStyleRule = require_insertStyleRule_native(), import_useMedia = require_useMedia_native(), Tamagui = function() {
|
|
3181
|
+
if (0)
|
|
3182
|
+
var TamaguiManager;
|
|
3183
|
+
}(), identifierToValue = /* @__PURE__ */ new Map(), getValueFromIdentifier = function(identifier) {
|
|
3184
|
+
return identifierToValue.get(identifier);
|
|
3185
|
+
}, setIdentifierValue = function(identifier, value) {
|
|
3186
|
+
identifierToValue.set(identifier, value);
|
|
3184
3187
|
};
|
|
3185
3188
|
}
|
|
3186
3189
|
});
|
|
3187
3190
|
|
|
3188
|
-
// ../../core/
|
|
3189
|
-
var
|
|
3190
|
-
"../../core/
|
|
3191
|
+
// ../../core/compose-refs/dist/cjs/compose-refs.native.js
|
|
3192
|
+
var require_compose_refs_native = __commonJS({
|
|
3193
|
+
"../../core/compose-refs/dist/cjs/compose-refs.native.js"(exports2, module2) {
|
|
3191
3194
|
"use strict";
|
|
3192
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3195
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3193
3196
|
for (var name in all) __defProp2(target, name, {
|
|
3194
3197
|
get: all[name],
|
|
3195
3198
|
enumerable: !0
|
|
@@ -3217,276 +3220,59 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3217
3220
|
}
|
|
3218
3221
|
}
|
|
3219
3222
|
return to;
|
|
3223
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
3224
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
3225
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
3226
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
3227
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3228
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3229
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
3230
|
+
value: mod,
|
|
3231
|
+
enumerable: !0
|
|
3232
|
+
}) : target,
|
|
3233
|
+
mod
|
|
3234
|
+
);
|
|
3220
3235
|
}, __toCommonJS2 = function(mod) {
|
|
3221
3236
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3222
3237
|
value: !0
|
|
3223
3238
|
}), mod);
|
|
3224
|
-
},
|
|
3225
|
-
__export2(
|
|
3226
|
-
|
|
3227
|
-
return
|
|
3239
|
+
}, compose_refs_exports = {};
|
|
3240
|
+
__export2(compose_refs_exports, {
|
|
3241
|
+
composeRefs: function() {
|
|
3242
|
+
return composeRefs;
|
|
3228
3243
|
},
|
|
3229
|
-
|
|
3230
|
-
return
|
|
3244
|
+
setRef: function() {
|
|
3245
|
+
return setRef;
|
|
3231
3246
|
},
|
|
3232
|
-
|
|
3233
|
-
return
|
|
3247
|
+
useComposedRefs: function() {
|
|
3248
|
+
return useComposedRefs3;
|
|
3234
3249
|
}
|
|
3235
3250
|
});
|
|
3236
|
-
module2.exports = __toCommonJS2(
|
|
3237
|
-
var
|
|
3238
|
-
function
|
|
3239
|
-
|
|
3240
|
-
}
|
|
3241
|
-
function _defineProperties(target, props) {
|
|
3242
|
-
for (var i = 0; i < props.length; i++) {
|
|
3243
|
-
var descriptor = props[i];
|
|
3244
|
-
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
|
|
3245
|
-
}
|
|
3246
|
-
}
|
|
3247
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
3248
|
-
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
3249
|
-
}
|
|
3250
|
-
function _define_property(obj, key, value) {
|
|
3251
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
3252
|
-
value,
|
|
3253
|
-
enumerable: !0,
|
|
3254
|
-
configurable: !0,
|
|
3255
|
-
writable: !0
|
|
3256
|
-
}) : obj[key] = value, obj;
|
|
3257
|
-
}
|
|
3258
|
-
var emptyState = {
|
|
3259
|
-
name: ""
|
|
3260
|
-
};
|
|
3261
|
-
function getHasThemeUpdatingProps(props) {
|
|
3262
|
-
return !!(props.name || props.componentName || props.inverse || props.reset);
|
|
3251
|
+
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
3252
|
+
var React4 = __toESM2(require("react"));
|
|
3253
|
+
function setRef(ref, value) {
|
|
3254
|
+
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
3263
3255
|
}
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
function
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
this.updateStateFromProps(props, !1);
|
|
3270
|
-
return;
|
|
3271
|
-
}
|
|
3272
|
-
if (!parentManager) throw new Error("No parent manager given, this is likely due to duplicated Tamagui dependencies. Check your lockfile for mis-matched versions. It could also be from an error somewhere else in your stack causing Tamagui to recieve undefined context, you can try putting some ErrorBoundary components around other areas of your app, or a Suspense boundary.");
|
|
3273
|
-
if (this.parentManager = parentManager, !this.updateStateFromProps(props, !1)) return parentManager;
|
|
3274
|
-
}
|
|
3275
|
-
return _create_class(ThemeManager2, [
|
|
3276
|
-
{
|
|
3277
|
-
key: "updateStateFromProps",
|
|
3278
|
-
value: function() {
|
|
3279
|
-
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props || {}, shouldNotify = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
3280
|
-
if (this.props = props, props.forceTheme) return this.state.theme = props.forceTheme, this.state.name = props.name || "", this.updateState(this.state, !0), this.state;
|
|
3281
|
-
var nextState = this.getStateIfChanged(props);
|
|
3282
|
-
if (nextState) return this.updateState(nextState, shouldNotify), nextState;
|
|
3283
|
-
}
|
|
3284
|
-
},
|
|
3285
|
-
{
|
|
3286
|
-
key: "getParents",
|
|
3287
|
-
value: function() {
|
|
3288
|
-
for (var parents = [], current = this; current; ) parents.push(current), current = current.parentManager;
|
|
3289
|
-
return parents;
|
|
3290
|
-
}
|
|
3291
|
-
},
|
|
3292
|
-
{
|
|
3293
|
-
key: "updateState",
|
|
3294
|
-
value: function(nextState) {
|
|
3295
|
-
var shouldNotify = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
3296
|
-
this.state = nextState, this._allKeys = null;
|
|
3297
|
-
}
|
|
3298
|
-
},
|
|
3299
|
-
{
|
|
3300
|
-
// if (shouldNotify) {
|
|
3301
|
-
// if (process.env.TAMAGUI_TARGET === 'native') {
|
|
3302
|
-
// // native is way slower with queueMicrotask
|
|
3303
|
-
// this.notify()
|
|
3304
|
-
// } else {
|
|
3305
|
-
// // web is way faster this way
|
|
3306
|
-
// queueMicrotask(() => {
|
|
3307
|
-
// this.notify()
|
|
3308
|
-
// })
|
|
3309
|
-
// }
|
|
3310
|
-
// }
|
|
3311
|
-
key: "getStateIfChanged",
|
|
3312
|
-
value: function() {
|
|
3313
|
-
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, state = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, parentManager = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.parentManager, _ = this.getState(props, parentManager);
|
|
3314
|
-
if (state && state !== emptyState && !_) return parentManager == null ? void 0 : parentManager.state;
|
|
3315
|
-
if (this.getStateShouldChange(_, state)) return _;
|
|
3316
|
-
}
|
|
3317
|
-
},
|
|
3318
|
-
{
|
|
3319
|
-
key: "getStateShouldChange",
|
|
3320
|
-
value: function(nextState) {
|
|
3321
|
-
var state = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
|
|
3322
|
-
return !(!(nextState != null && nextState.theme) || nextState.theme === (state == null ? void 0 : state.theme));
|
|
3323
|
-
}
|
|
3324
|
-
},
|
|
3325
|
-
{
|
|
3326
|
-
key: "getState",
|
|
3327
|
-
value: function() {
|
|
3328
|
-
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, parentManager = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.parentManager, next = getState(props, parentManager) || (parentManager == null ? void 0 : parentManager.state) || null;
|
|
3329
|
-
return next;
|
|
3330
|
-
}
|
|
3331
|
-
},
|
|
3332
|
-
{
|
|
3333
|
-
key: "allKeys",
|
|
3334
|
-
get: function() {
|
|
3335
|
-
var _this_parentManager;
|
|
3336
|
-
return this._allKeys || (this._allKeys = /* @__PURE__ */ new Set([
|
|
3337
|
-
...((_this_parentManager = this.parentManager) === null || _this_parentManager === void 0 ? void 0 : _this_parentManager.allKeys) || [],
|
|
3338
|
-
...Object.keys(this.state.theme || {})
|
|
3339
|
-
])), this._allKeys;
|
|
3340
|
-
}
|
|
3341
|
-
},
|
|
3342
|
-
{
|
|
3343
|
-
key: "notify",
|
|
3344
|
-
value: function() {
|
|
3345
|
-
var _this = this, forced = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
3346
|
-
this.themeListeners.forEach(function(cb) {
|
|
3347
|
-
return cb(_this.state.name, _this, forced);
|
|
3348
|
-
});
|
|
3349
|
-
var _numChangeEventsSent, _this_;
|
|
3350
|
-
(_this_ = this[_numChangeEventsSent = "_numChangeEventsSent"]) !== null && _this_ !== void 0 || (this[_numChangeEventsSent] = 0), this._numChangeEventsSent++;
|
|
3351
|
-
}
|
|
3352
|
-
},
|
|
3353
|
-
{
|
|
3354
|
-
key: "selfUpdate",
|
|
3355
|
-
value: function() {
|
|
3356
|
-
var _this__selfListener, _this;
|
|
3357
|
-
(_this__selfListener = (_this = this)._selfListener) === null || _this__selfListener === void 0 || _this__selfListener.call(_this, this.state.name, this, "self");
|
|
3358
|
-
}
|
|
3359
|
-
},
|
|
3360
|
-
{
|
|
3361
|
-
key: "onChangeTheme",
|
|
3362
|
-
value: function(cb, debugId) {
|
|
3363
|
-
var _this = this;
|
|
3364
|
-
if (debugId) {
|
|
3365
|
-
var _this__listeningIds;
|
|
3366
|
-
(_this__listeningIds = this._listeningIds) !== null && _this__listeningIds !== void 0 || (this._listeningIds = /* @__PURE__ */ new Set()), this._listeningIds.add(debugId);
|
|
3367
|
-
}
|
|
3368
|
-
return debugId === !0 && (this._selfListener = cb), this.themeListeners.add(cb), function() {
|
|
3369
|
-
_this.themeListeners.delete(cb);
|
|
3370
|
-
};
|
|
3371
|
-
}
|
|
3372
|
-
}
|
|
3373
|
-
]), ThemeManager2;
|
|
3374
|
-
}(), cache = {};
|
|
3375
|
-
function getState(props, manager) {
|
|
3376
|
-
if (!getHasThemeUpdatingProps(props)) return null;
|
|
3377
|
-
var [allManagers] = getManagers(manager), cacheKey = `${props.name || ""}${props.componentName || ""}${props.inverse || ""}${props.reset || ""}${allManagers.map(function(x) {
|
|
3378
|
-
return (x == null ? void 0 : x.state.name) || ".";
|
|
3379
|
-
}).join("")}`, cached = cache[cacheKey];
|
|
3380
|
-
if (!cached) {
|
|
3381
|
-
var res = getStateUncached(props, manager);
|
|
3382
|
-
return cache[cacheKey] = res, res;
|
|
3383
|
-
}
|
|
3384
|
-
return cached;
|
|
3385
|
-
}
|
|
3386
|
-
function getStateUncached(props, manager) {
|
|
3387
|
-
if (props.name && props.reset) throw new Error("Cannot reset and set a new name at the same time.");
|
|
3388
|
-
var themes = (0, import_config.getThemes)(), [allManagers, componentManagers] = getManagers(manager), isDirectParentAComponentTheme = !!(manager != null && manager.state.isComponent), startIndex = props.reset && !isDirectParentAComponentTheme ? 1 : 0, baseManager = allManagers[startIndex], parentManager = allManagers[startIndex + 1];
|
|
3389
|
-
if (!baseManager && props.reset) return console.warn("Cannot reset, no parent theme exists"), null;
|
|
3390
|
-
var { componentName } = props, result = null, baseName = (baseManager == null ? void 0 : baseManager.state.name) || "";
|
|
3391
|
-
baseManager != null && baseManager.state.isComponent && (baseName = baseName.replace(/_[A-Z][A-Za-z]+/, ""));
|
|
3392
|
-
var nextName = props.reset ? baseName : props.name || "", allComponentThemes = componentManagers.map(function(x) {
|
|
3393
|
-
return (x == null ? void 0 : x.state.name) || "";
|
|
3394
|
-
});
|
|
3395
|
-
isDirectParentAComponentTheme && allComponentThemes.shift();
|
|
3396
|
-
for (var base = baseName.split(import_constants22.THEME_NAME_SEPARATOR), max2 = base.length, min2 = props.componentName && !nextName ? max2 : (
|
|
3397
|
-
// component name only don't search upwards
|
|
3398
|
-
0
|
|
3399
|
-
), i = max2; i >= min2; i--) {
|
|
3400
|
-
var prefix = base.slice(0, i).join(import_constants22.THEME_NAME_SEPARATOR);
|
|
3401
|
-
props.inverse && (prefix = inverseThemeName(prefix));
|
|
3402
|
-
var potentials = [];
|
|
3403
|
-
if (prefix && prefix !== baseName && prefix.includes(nextName) && potentials.push(prefix), nextName && potentials.unshift(prefix ? `${prefix}_${nextName}` : nextName), i === 1) {
|
|
3404
|
-
var lastSegment = potentials.findIndex(function(x) {
|
|
3405
|
-
return !x.includes("_");
|
|
3406
|
-
});
|
|
3407
|
-
lastSegment > 0 && potentials.splice(lastSegment, 0, nextName);
|
|
3408
|
-
}
|
|
3409
|
-
if (componentName && !props.reset) {
|
|
3410
|
-
var baseLen = base.length, componentPotentials = [];
|
|
3411
|
-
if (nextName && baseLen > 1) {
|
|
3412
|
-
var beforeSeparator = base[0];
|
|
3413
|
-
componentPotentials.push(`${beforeSeparator}_${nextName}_${componentName}`);
|
|
3414
|
-
}
|
|
3415
|
-
if (componentPotentials.push(`${prefix}_${componentName}`), nextName) {
|
|
3416
|
-
if (i > baseLen) {
|
|
3417
|
-
var prefixLessOne = base.slice(0, i - 1).join(import_constants22.THEME_NAME_SEPARATOR);
|
|
3418
|
-
if (prefixLessOne) {
|
|
3419
|
-
var lessSpecific = `${prefixLessOne}_${nextName}_${componentName}`;
|
|
3420
|
-
componentPotentials.unshift(lessSpecific);
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
var moreSpecific = `${prefix}_${nextName}_${componentName}`;
|
|
3424
|
-
componentPotentials.unshift(moreSpecific);
|
|
3425
|
-
}
|
|
3426
|
-
potentials = [
|
|
3427
|
-
...componentPotentials,
|
|
3428
|
-
...potentials,
|
|
3429
|
-
...allComponentThemes
|
|
3430
|
-
];
|
|
3431
|
-
}
|
|
3432
|
-
var found = potentials.find(function(t) {
|
|
3433
|
-
return t in themes;
|
|
3256
|
+
function composeRefs() {
|
|
3257
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
3258
|
+
return function(node) {
|
|
3259
|
+
return refs.forEach(function(ref) {
|
|
3260
|
+
return setRef(ref, node);
|
|
3434
3261
|
});
|
|
3435
|
-
|
|
3436
|
-
props,
|
|
3437
|
-
found,
|
|
3438
|
-
potentials,
|
|
3439
|
-
baseManager,
|
|
3440
|
-
nextName,
|
|
3441
|
-
baseName,
|
|
3442
|
-
prefix
|
|
3443
|
-
}), found) {
|
|
3444
|
-
var _this, names = found.split("_"), [firstName, ...restNames] = names, lastName = names[names.length - 1], isComponent = lastName[0] === lastName[0].toUpperCase(), scheme = firstName === "light" ? "light" : firstName === "dark" ? "dark" : void 0, pre = import_constants22.THEME_CLASSNAME_PREFIX, className = import_constants4.isWeb ? `${pre}sub_theme ${pre}${!scheme || !restNames.length ? firstName : restNames.join("_")}` : "", parentState = (_this = baseManager || parentManager) === null || _this === void 0 ? void 0 : _this.state, parentName = parentState == null ? void 0 : parentState.name;
|
|
3445
|
-
result = {
|
|
3446
|
-
name: found,
|
|
3447
|
-
parentName,
|
|
3448
|
-
theme: themes[found],
|
|
3449
|
-
className,
|
|
3450
|
-
isComponent,
|
|
3451
|
-
isSchemeFixed: props.name === "light" || props.name === "dark",
|
|
3452
|
-
scheme
|
|
3453
|
-
};
|
|
3454
|
-
break;
|
|
3455
|
-
}
|
|
3456
|
-
}
|
|
3457
|
-
return props.debug === "verbose" && import_constants4.isClient && (console.groupCollapsed("ThemeManager.getState()"), console.info({
|
|
3458
|
-
props,
|
|
3459
|
-
baseName,
|
|
3460
|
-
base,
|
|
3461
|
-
min: min2,
|
|
3462
|
-
max: max2
|
|
3463
|
-
}), console.warn("result", {
|
|
3464
|
-
result
|
|
3465
|
-
}), console.trace(), console.groupEnd()), result;
|
|
3262
|
+
};
|
|
3466
3263
|
}
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
function getManagers(themeManager) {
|
|
3471
|
-
for (var comp = [], all = [], cur = themeManager; cur; ) all.push(cur), cur.state.isComponent && comp.push(cur), cur = cur.parentManager;
|
|
3472
|
-
return [
|
|
3473
|
-
all,
|
|
3474
|
-
comp
|
|
3475
|
-
];
|
|
3264
|
+
function useComposedRefs3() {
|
|
3265
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
3266
|
+
return React4.useCallback(composeRefs(...refs), refs);
|
|
3476
3267
|
}
|
|
3477
3268
|
}
|
|
3478
3269
|
});
|
|
3479
3270
|
|
|
3480
|
-
// ../../core/
|
|
3481
|
-
var
|
|
3482
|
-
"../../core/
|
|
3271
|
+
// ../../core/compose-refs/dist/cjs/index.native.js
|
|
3272
|
+
var require_index_native12 = __commonJS({
|
|
3273
|
+
"../../core/compose-refs/dist/cjs/index.native.js"(exports2, module2) {
|
|
3483
3274
|
"use strict";
|
|
3484
|
-
var
|
|
3485
|
-
for (var name in all) __defProp2(target, name, {
|
|
3486
|
-
get: all[name],
|
|
3487
|
-
enumerable: !0
|
|
3488
|
-
});
|
|
3489
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
3275
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
3490
3276
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3491
3277
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
3492
3278
|
for (var _loop = function() {
|
|
@@ -3509,36 +3295,21 @@ var require_ThemeManagerContext_native = __commonJS({
|
|
|
3509
3295
|
}
|
|
3510
3296
|
}
|
|
3511
3297
|
return to;
|
|
3512
|
-
},
|
|
3513
|
-
return target
|
|
3514
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
3515
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
3516
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3517
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3518
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
3519
|
-
value: mod,
|
|
3520
|
-
enumerable: !0
|
|
3521
|
-
}) : target,
|
|
3522
|
-
mod
|
|
3523
|
-
);
|
|
3298
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
3299
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
3524
3300
|
}, __toCommonJS2 = function(mod) {
|
|
3525
3301
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3526
3302
|
value: !0
|
|
3527
3303
|
}), mod);
|
|
3528
|
-
},
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
return ThemeManagerContext;
|
|
3532
|
-
}
|
|
3533
|
-
});
|
|
3534
|
-
module2.exports = __toCommonJS2(ThemeManagerContext_exports);
|
|
3535
|
-
var import_react3 = __toESM2(require("react")), ThemeManagerContext = /* @__PURE__ */ import_react3.default.createContext(null);
|
|
3304
|
+
}, index_exports2 = {};
|
|
3305
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
3306
|
+
__reExport2(index_exports2, require_compose_refs_native(), module2.exports);
|
|
3536
3307
|
}
|
|
3537
3308
|
});
|
|
3538
3309
|
|
|
3539
|
-
// ../../core/web/dist/cjs/
|
|
3540
|
-
var
|
|
3541
|
-
"../../core/web/dist/cjs/
|
|
3310
|
+
// ../../core/web/dist/cjs/constants/constants.native.js
|
|
3311
|
+
var require_constants_native2 = __commonJS({
|
|
3312
|
+
"../../core/web/dist/cjs/constants/constants.native.js"(exports2, module2) {
|
|
3542
3313
|
"use strict";
|
|
3543
3314
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3544
3315
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -3572,48 +3343,42 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
3572
3343
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3573
3344
|
value: !0
|
|
3574
3345
|
}), mod);
|
|
3575
|
-
},
|
|
3576
|
-
__export2(
|
|
3577
|
-
|
|
3578
|
-
return
|
|
3346
|
+
}, constants_exports = {};
|
|
3347
|
+
__export2(constants_exports, {
|
|
3348
|
+
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
3349
|
+
return FONT_DATA_ATTRIBUTE_NAME;
|
|
3579
3350
|
},
|
|
3580
|
-
|
|
3581
|
-
return
|
|
3351
|
+
THEME_CLASSNAME_PREFIX: function() {
|
|
3352
|
+
return THEME_CLASSNAME_PREFIX;
|
|
3582
3353
|
},
|
|
3583
|
-
|
|
3584
|
-
return
|
|
3354
|
+
THEME_NAME_SEPARATOR: function() {
|
|
3355
|
+
return THEME_NAME_SEPARATOR;
|
|
3356
|
+
},
|
|
3357
|
+
stackDefaultStyles: function() {
|
|
3358
|
+
return stackDefaultStyles;
|
|
3359
|
+
},
|
|
3360
|
+
webViewFlexCompatStyles: function() {
|
|
3361
|
+
return webViewFlexCompatStyles;
|
|
3585
3362
|
}
|
|
3586
3363
|
});
|
|
3587
|
-
module2.exports = __toCommonJS2(
|
|
3588
|
-
var
|
|
3589
|
-
|
|
3364
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
3365
|
+
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
3366
|
+
display: "flex",
|
|
3367
|
+
alignItems: "stretch",
|
|
3368
|
+
flexDirection: "column",
|
|
3369
|
+
flexBasis: "auto",
|
|
3370
|
+
boxSizing: "border-box",
|
|
3371
|
+
position: "relative",
|
|
3372
|
+
minHeight: 0,
|
|
3373
|
+
minWidth: 0,
|
|
3374
|
+
flexShrink: 0
|
|
3590
3375
|
};
|
|
3591
|
-
function createShallowSetState(setter, isDisabled, transition, debug) {
|
|
3592
|
-
return function(next) {
|
|
3593
|
-
var wrap = transition ? import_react3.startTransition : callImmediate;
|
|
3594
|
-
wrap(function() {
|
|
3595
|
-
setter(function(prev) {
|
|
3596
|
-
return mergeIfNotShallowEqual(prev, next, isDisabled, debug);
|
|
3597
|
-
});
|
|
3598
|
-
});
|
|
3599
|
-
};
|
|
3600
|
-
}
|
|
3601
|
-
function mergeIfNotShallowEqual(prev, next, isDisabled, debug) {
|
|
3602
|
-
return isDisabled || !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
3603
|
-
...prev,
|
|
3604
|
-
...next
|
|
3605
|
-
};
|
|
3606
|
-
}
|
|
3607
|
-
function isEqualShallow(prev, next) {
|
|
3608
|
-
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
3609
|
-
return !0;
|
|
3610
|
-
}
|
|
3611
3376
|
}
|
|
3612
3377
|
});
|
|
3613
3378
|
|
|
3614
|
-
// ../../core/web/dist/cjs/
|
|
3615
|
-
var
|
|
3616
|
-
"../../core/web/dist/cjs/
|
|
3379
|
+
// ../../core/web/dist/cjs/constants/isDevTools.native.js
|
|
3380
|
+
var require_isDevTools_native = __commonJS({
|
|
3381
|
+
"../../core/web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
3617
3382
|
"use strict";
|
|
3618
3383
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3619
3384
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -3647,41 +3412,22 @@ var require_shouldDeoptDueToParentScheme_native = __commonJS({
|
|
|
3647
3412
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3648
3413
|
value: !0
|
|
3649
3414
|
}), mod);
|
|
3650
|
-
},
|
|
3651
|
-
__export2(
|
|
3652
|
-
|
|
3653
|
-
return
|
|
3415
|
+
}, isDevTools_exports = {};
|
|
3416
|
+
__export2(isDevTools_exports, {
|
|
3417
|
+
isDevTools: function() {
|
|
3418
|
+
return isDevTools;
|
|
3654
3419
|
}
|
|
3655
3420
|
});
|
|
3656
|
-
module2.exports = __toCommonJS2(
|
|
3657
|
-
var
|
|
3658
|
-
function shouldDeoptDueToParentScheme(manager) {
|
|
3659
|
-
var _parents_, parents = ((manager == null ? void 0 : manager.getParents()) || []).reverse(), rootScheme = (_parents_ = parents[0]) === null || _parents_ === void 0 ? void 0 : _parents_.state.scheme;
|
|
3660
|
-
if (!rootScheme || import_react_native4.Appearance.getColorScheme() !== rootScheme) return !0;
|
|
3661
|
-
var lastParentScheme = rootScheme, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3662
|
-
try {
|
|
3663
|
-
for (var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3664
|
-
var parent = _step.value;
|
|
3665
|
-
if (parent.state.scheme !== lastParentScheme) return !0;
|
|
3666
|
-
lastParentScheme = parent.state.scheme;
|
|
3667
|
-
}
|
|
3668
|
-
} catch (err) {
|
|
3669
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
3670
|
-
} finally {
|
|
3671
|
-
try {
|
|
3672
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3673
|
-
} finally {
|
|
3674
|
-
if (_didIteratorError) throw _iteratorError;
|
|
3675
|
-
}
|
|
3676
|
-
}
|
|
3421
|
+
module2.exports = __toCommonJS2(isDevTools_exports);
|
|
3422
|
+
var isDevTools = /* @__PURE__ */ function() {
|
|
3677
3423
|
return !1;
|
|
3678
|
-
}
|
|
3424
|
+
}();
|
|
3679
3425
|
}
|
|
3680
3426
|
});
|
|
3681
3427
|
|
|
3682
|
-
// ../../core/web/dist/cjs/
|
|
3683
|
-
var
|
|
3684
|
-
"../../core/web/dist/cjs/
|
|
3428
|
+
// ../../core/web/dist/cjs/helpers/objectIdentityKey.native.js
|
|
3429
|
+
var require_objectIdentityKey_native = __commonJS({
|
|
3430
|
+
"../../core/web/dist/cjs/helpers/objectIdentityKey.native.js"(exports2, module2) {
|
|
3685
3431
|
"use strict";
|
|
3686
3432
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3687
3433
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -3715,221 +3461,34 @@ var require_useTheme_native = __commonJS({
|
|
|
3715
3461
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3716
3462
|
value: !0
|
|
3717
3463
|
}), mod);
|
|
3718
|
-
},
|
|
3719
|
-
__export2(
|
|
3720
|
-
|
|
3721
|
-
return
|
|
3722
|
-
},
|
|
3723
|
-
getThemeManager: function() {
|
|
3724
|
-
return getThemeManager;
|
|
3725
|
-
},
|
|
3726
|
-
useChangeThemeEffect: function() {
|
|
3727
|
-
return useChangeThemeEffect;
|
|
3728
|
-
},
|
|
3729
|
-
useTheme: function() {
|
|
3730
|
-
return useTheme4;
|
|
3731
|
-
},
|
|
3732
|
-
useThemeWithState: function() {
|
|
3733
|
-
return useThemeWithState;
|
|
3464
|
+
}, objectIdentityKey_exports = {};
|
|
3465
|
+
__export2(objectIdentityKey_exports, {
|
|
3466
|
+
objectIdentityKey: function() {
|
|
3467
|
+
return objectIdentityKey;
|
|
3734
3468
|
}
|
|
3735
3469
|
});
|
|
3736
|
-
module2.exports = __toCommonJS2(
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
];
|
|
3748
|
-
}, emptyObject = {}, ProxiedThemes = /* @__PURE__ */ new Map(), curKeys, curProps, curThemeManger;
|
|
3749
|
-
function getThemeProxied(_props, state, _keys, _themeManager) {
|
|
3750
|
-
var theme = state == null ? void 0 : state.theme;
|
|
3751
|
-
if (!theme || !_themeManager) return emptyObject;
|
|
3752
|
-
if (curKeys = _keys, curProps = _props, curThemeManger = _themeManager, ProxiedThemes.has(theme)) {
|
|
3753
|
-
var proxied = ProxiedThemes.get(theme);
|
|
3754
|
-
return proxied;
|
|
3755
|
-
}
|
|
3756
|
-
var { name, scheme } = state, config = (0, import_config.getConfig)();
|
|
3757
|
-
function track(key) {
|
|
3758
|
-
curKeys && (curKeys.current || (curKeys.current = []), curKeys.current.push(key));
|
|
3759
|
-
}
|
|
3760
|
-
var proxied1 = Object.fromEntries(Object.entries(theme).flatMap(function(param) {
|
|
3761
|
-
var [key, value] = param, proxied2 = {
|
|
3762
|
-
...value,
|
|
3763
|
-
get val() {
|
|
3764
|
-
return globalThis.tamaguiAvoidTracking || track(key), value.val;
|
|
3765
|
-
},
|
|
3766
|
-
get(platform2) {
|
|
3767
|
-
var outVal = (0, import_createVariable.getVariable)(value);
|
|
3768
|
-
if (platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && !(0, import_shouldDeoptDueToParentScheme.shouldDeoptDueToParentScheme)(curThemeManger) && scheme) {
|
|
3769
|
-
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = {
|
|
3770
|
-
dynamic: {
|
|
3771
|
-
[scheme]: color,
|
|
3772
|
-
[oppositeScheme]: oppositeColor
|
|
3773
|
-
}
|
|
3774
|
-
};
|
|
3775
|
-
return dynamicVal;
|
|
3776
|
-
}
|
|
3777
|
-
return track(key), outVal;
|
|
3778
|
-
}
|
|
3779
|
-
};
|
|
3780
|
-
return [
|
|
3781
|
-
[
|
|
3782
|
-
key,
|
|
3783
|
-
proxied2
|
|
3784
|
-
],
|
|
3785
|
-
[
|
|
3786
|
-
`$${key}`,
|
|
3787
|
-
proxied2
|
|
3788
|
-
]
|
|
3789
|
-
];
|
|
3790
|
-
}));
|
|
3791
|
-
return ProxiedThemes.set(theme, proxied1), proxied1;
|
|
3792
|
-
}
|
|
3793
|
-
var activeThemeManagers = /* @__PURE__ */ new Set(), _uidToManager = /* @__PURE__ */ new WeakMap(), _idToUID = {}, getId = function(id) {
|
|
3794
|
-
return _idToUID[id];
|
|
3795
|
-
}, getThemeManager = function(id) {
|
|
3796
|
-
return _uidToManager.get(getId(id));
|
|
3797
|
-
}, registerThemeManager = function(t) {
|
|
3798
|
-
if (!_idToUID[t.id]) {
|
|
3799
|
-
var id = _idToUID[t.id] = {};
|
|
3800
|
-
_uidToManager.set(id, t);
|
|
3801
|
-
}
|
|
3802
|
-
}, ogLog = console.error, preventWarnSetState = (
|
|
3803
|
-
// temporary fix for logs, they are harmless in that i've tried to rewrite this
|
|
3804
|
-
// a few times using the "right" ways, but they are always slower. maybe skill issue
|
|
3805
|
-
function(a) {
|
|
3806
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
|
|
3807
|
-
if (!(typeof a == "string" && a.includes("Cannot update a component"))) return ogLog(a, ...args);
|
|
3808
|
-
}
|
|
3809
|
-
);
|
|
3810
|
-
function getShouldUpdateTheme(props, parentManager, keys, themeState, nextState) {
|
|
3811
|
-
var forceShouldChange = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, _themeState_themeManager, _themeState_state;
|
|
3812
|
-
if (!import_constants4.isServer && !(!forceShouldChange && !(keys != null && keys.current) && (!themeState || !themeState.isNewTheme) && !(0, import_ThemeManager.getHasThemeUpdatingProps)(props))) {
|
|
3813
|
-
var next = nextState || (themeState == null || (_themeState_themeManager = themeState.themeManager) === null || _themeState_themeManager === void 0 ? void 0 : _themeState_themeManager.getState(props, parentManager));
|
|
3814
|
-
if (forceShouldChange || !(!next || next.theme === (themeState == null || (_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.theme))) return next;
|
|
3815
|
-
}
|
|
3816
|
-
}
|
|
3817
|
-
var useChangeThemeEffect = function(props) {
|
|
3818
|
-
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = arguments.length > 2 ? arguments[2] : void 0, _props_needsUpdate, { disable } = props, parentManager = (0, import_react3.useContext)(import_ThemeManagerContext.ThemeManagerContext), shouldAlwaysUpdate = ((_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props)) === !0 ? !0 : void 0;
|
|
3819
|
-
if (!isRoot && !parentManager || disable) return {
|
|
3820
|
-
isNewTheme: !1,
|
|
3821
|
-
state: parentManager == null ? void 0 : parentManager.state,
|
|
3822
|
-
themeManager: parentManager
|
|
3823
|
-
};
|
|
3824
|
-
var [themeState, setThemeState] = (0, import_react3.useState)(createState), { state, mounted, isNewTheme, themeManager, prevState } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
|
|
3825
|
-
if (themeManager) {
|
|
3826
|
-
var nextState = getShouldUpdateTheme(props, parentManager, keys, themeState, void 0, shouldAlwaysUpdate);
|
|
3827
|
-
if (nextState) {
|
|
3828
|
-
var _next_state, _themeState_state, next = createState(themeState, void 0, nextState);
|
|
3829
|
-
((_next_state = next.state) === null || _next_state === void 0 ? void 0 : _next_state.name) !== ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) && (setThemeState(next), console.error = preventWarnSetState, themeManager.notify(), console.error = ogLog);
|
|
3830
|
-
}
|
|
3831
|
-
}
|
|
3832
|
-
if (import_constants4.isServer || (0, import_react3.useEffect)(function() {
|
|
3833
|
-
if (themeManager) {
|
|
3834
|
-
if (props.inverse && !mounted) {
|
|
3835
|
-
setThemeState(function(prev) {
|
|
3836
|
-
return createState({
|
|
3837
|
-
...prev,
|
|
3838
|
-
mounted: !0
|
|
3839
|
-
});
|
|
3840
|
-
});
|
|
3841
|
-
return;
|
|
3842
|
-
}
|
|
3843
|
-
if ((isNewTheme || isRoot) && (activeThemeManagers.add(themeManager), !1))
|
|
3844
|
-
var _globalThis, _TamaguiRootThemeManager;
|
|
3845
|
-
var updated = getShouldUpdateTheme(props, parentManager, keys, themeState, void 0, shouldAlwaysUpdate);
|
|
3846
|
-
updated && setThemeState(function(prev) {
|
|
3847
|
-
return createState(prev, void 0, updated);
|
|
3848
|
-
});
|
|
3849
|
-
var selfListenerDispose = themeManager.onChangeTheme(function(_a, _b, forced) {
|
|
3850
|
-
forced && setThemeState(function(prev) {
|
|
3851
|
-
var next2 = createState(prev, forced !== "self");
|
|
3852
|
-
return next2;
|
|
3853
|
-
});
|
|
3854
|
-
}, !0), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme(function(name, manager, forced) {
|
|
3855
|
-
var force = forced || (import_constants4.isServer ? void 0 : keys != null && keys.current ? !0 : void 0) || props.deopt || props["disable-child-theme"], shouldTryUpdate = force ?? !!(keys != null && keys.current || isNewTheme);
|
|
3856
|
-
shouldTryUpdate && setThemeState(function(prev) {
|
|
3857
|
-
return createState(prev, !0);
|
|
3858
|
-
});
|
|
3859
|
-
}, themeManager.id);
|
|
3860
|
-
return function() {
|
|
3861
|
-
selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), isNewTheme && activeThemeManagers.delete(themeManager);
|
|
3862
|
-
};
|
|
3863
|
-
}
|
|
3864
|
-
}, [
|
|
3865
|
-
themeManager,
|
|
3866
|
-
parentManager,
|
|
3867
|
-
isNewTheme,
|
|
3868
|
-
props.componentName,
|
|
3869
|
-
props.inverse,
|
|
3870
|
-
props.name,
|
|
3871
|
-
props.reset,
|
|
3872
|
-
mounted
|
|
3873
|
-
]), import_constants4.isWeb && isInversingOnMount) return {
|
|
3874
|
-
isNewTheme: !1,
|
|
3875
|
-
inversed: !1,
|
|
3876
|
-
themeManager: parentManager,
|
|
3877
|
-
state: {
|
|
3878
|
-
name: "",
|
|
3879
|
-
...parentManager == null ? void 0 : parentManager.state,
|
|
3880
|
-
className: ""
|
|
3881
|
-
}
|
|
3882
|
-
};
|
|
3883
|
-
return {
|
|
3884
|
-
state,
|
|
3885
|
-
isNewTheme,
|
|
3886
|
-
inversed: !!props.inverse,
|
|
3887
|
-
themeManager
|
|
3888
|
-
};
|
|
3889
|
-
function createState(prev) {
|
|
3890
|
-
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, foundNextState = arguments.length > 2 ? arguments[2] : void 0;
|
|
3891
|
-
if (prev && !foundNextState && !(keys != null && keys.current) && !force) return prev;
|
|
3892
|
-
var themeManager2 = parentManager, state2, hasThemeUpdatingProps = (0, import_ThemeManager.getHasThemeUpdatingProps)(props);
|
|
3893
|
-
if (hasThemeUpdatingProps) {
|
|
3894
|
-
var parentManagerProp = isRoot ? "root" : parentManager;
|
|
3895
|
-
if (prev != null && prev.themeManager) {
|
|
3896
|
-
themeManager2 = prev.themeManager;
|
|
3897
|
-
var forceChange = force || shouldAlwaysUpdate || (keys != null && keys.current ? !0 : void 0), nextState2 = null;
|
|
3898
|
-
if (foundNextState) nextState2 = foundNextState;
|
|
3899
|
-
else {
|
|
3900
|
-
var next2 = themeManager2.getState(props, parentManager);
|
|
3901
|
-
nextState2 = getShouldUpdateTheme(props, parentManager, keys, prev, next2, forceChange);
|
|
3902
|
-
}
|
|
3903
|
-
nextState2 ? (state2 = nextState2, !prev.isNewTheme && !isRoot ? themeManager2 = new import_ThemeManager.ThemeManager(props, parentManagerProp) : themeManager2.updateState(nextState2)) : prev.isNewTheme && parentManager && !nextState2 && (themeManager2 = parentManager);
|
|
3904
|
-
} else themeManager2 = new import_ThemeManager.ThemeManager(props, parentManagerProp), state2 = {
|
|
3905
|
-
...themeManager2.state
|
|
3906
|
-
};
|
|
3470
|
+
module2.exports = __toCommonJS2(objectIdentityKey_exports);
|
|
3471
|
+
function objectIdentityKey(obj) {
|
|
3472
|
+
var k = "";
|
|
3473
|
+
for (var key in obj) {
|
|
3474
|
+
k += key;
|
|
3475
|
+
var arg = obj[key], type = typeof arg;
|
|
3476
|
+
if (!arg || type !== "object" && type !== "function") k += type + arg;
|
|
3477
|
+
else if (cache.has(arg)) k += cache.get(arg);
|
|
3478
|
+
else {
|
|
3479
|
+
var v = Math.random();
|
|
3480
|
+
cache.set(arg, v), k += v;
|
|
3907
3481
|
}
|
|
3908
|
-
var isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse);
|
|
3909
|
-
isNewTheme2 && registerThemeManager(themeManager2);
|
|
3910
|
-
var isWebSSR = import_constants4.isWeb ? !(0, import_config.getSetting)("disableSSR") : !1, mounted2 = isWebSSR ? isRoot || (prev == null ? void 0 : prev.mounted) : !0;
|
|
3911
|
-
state2 || (isNewTheme2 ? state2 = themeManager2.state : (state2 = parentManager.state, themeManager2 = parentManager));
|
|
3912
|
-
var response = {
|
|
3913
|
-
themeManager: themeManager2,
|
|
3914
|
-
isNewTheme: isNewTheme2,
|
|
3915
|
-
mounted: mounted2
|
|
3916
|
-
};
|
|
3917
|
-
props.inverse && (response.inversed = !0);
|
|
3918
|
-
var shouldReturnPrev = prev && !force && // isEqualShallow uses the second arg as the keys so this should compare without state first...
|
|
3919
|
-
(0, import_createShallowSetState.isEqualShallow)(prev, response) && // ... and then compare just the state, because we make a new state obj but is likely the same
|
|
3920
|
-
(0, import_createShallowSetState.isEqualShallow)(prev.state, state2);
|
|
3921
|
-
if (prev && shouldReturnPrev) return prev;
|
|
3922
|
-
if (response.state = state2, response.prevState = prev == null ? void 0 : prev.state, !1)
|
|
3923
|
-
var parentState, parentId, themeManagerState;
|
|
3924
|
-
return response;
|
|
3925
3482
|
}
|
|
3926
|
-
|
|
3483
|
+
return k;
|
|
3484
|
+
}
|
|
3485
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
3927
3486
|
}
|
|
3928
3487
|
});
|
|
3929
3488
|
|
|
3930
|
-
// ../../core/web/dist/cjs/
|
|
3931
|
-
var
|
|
3932
|
-
"../../core/web/dist/cjs/
|
|
3489
|
+
// ../../core/web/dist/cjs/helpers/createStyledContext.native.js
|
|
3490
|
+
var require_createStyledContext_native = __commonJS({
|
|
3491
|
+
"../../core/web/dist/cjs/helpers/createStyledContext.native.js"(exports2, module2) {
|
|
3933
3492
|
"use strict";
|
|
3934
3493
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
3935
3494
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -3975,35 +3534,48 @@ var require_Tamagui_native = __commonJS({
|
|
|
3975
3534
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3976
3535
|
value: !0
|
|
3977
3536
|
}), mod);
|
|
3978
|
-
},
|
|
3979
|
-
__export2(
|
|
3980
|
-
|
|
3981
|
-
return
|
|
3982
|
-
},
|
|
3983
|
-
getValueFromIdentifier: function() {
|
|
3984
|
-
return getValueFromIdentifier;
|
|
3985
|
-
},
|
|
3986
|
-
setIdentifierValue: function() {
|
|
3987
|
-
return setIdentifierValue;
|
|
3537
|
+
}, createStyledContext_exports = {};
|
|
3538
|
+
__export2(createStyledContext_exports, {
|
|
3539
|
+
createStyledContext: function() {
|
|
3540
|
+
return createStyledContext2;
|
|
3988
3541
|
}
|
|
3989
3542
|
});
|
|
3990
|
-
module2.exports = __toCommonJS2(
|
|
3991
|
-
var
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3543
|
+
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
3544
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native(), createReactContext = import_react3.default[Math.random(), "createContext"];
|
|
3545
|
+
function createStyledContext2(defaultValues) {
|
|
3546
|
+
var OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
3547
|
+
function getOrCreateScopedContext(scope) {
|
|
3548
|
+
var ScopedContext = scopedContexts.get(scope);
|
|
3549
|
+
return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
|
|
3550
|
+
}
|
|
3551
|
+
var Provider = function(param) {
|
|
3552
|
+
var { children, scope, ...values } = param, next = import_react3.default.useMemo(function() {
|
|
3553
|
+
return {
|
|
3554
|
+
// this ! is a workaround for ts error
|
|
3555
|
+
...defaultValues,
|
|
3556
|
+
...values
|
|
3557
|
+
};
|
|
3558
|
+
}, [
|
|
3559
|
+
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
3560
|
+
]), Provider22 = OGProvider2;
|
|
3561
|
+
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
|
|
3562
|
+
value: next,
|
|
3563
|
+
children
|
|
3564
|
+
});
|
|
3565
|
+
}, useStyledContext = function(scope) {
|
|
3566
|
+
var context = scope ? getOrCreateScopedContext(scope) : OGContext;
|
|
3567
|
+
return import_react3.default.useContext(context);
|
|
3568
|
+
};
|
|
3569
|
+
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
3570
|
+
}
|
|
3999
3571
|
}
|
|
4000
3572
|
});
|
|
4001
3573
|
|
|
4002
|
-
// ../../core/
|
|
4003
|
-
var
|
|
4004
|
-
"../../core/
|
|
3574
|
+
// ../../core/web/dist/cjs/contexts/ComponentContext.native.js
|
|
3575
|
+
var require_ComponentContext_native = __commonJS({
|
|
3576
|
+
"../../core/web/dist/cjs/contexts/ComponentContext.native.js"(exports2, module2) {
|
|
4005
3577
|
"use strict";
|
|
4006
|
-
var
|
|
3578
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4007
3579
|
for (var name in all) __defProp2(target, name, {
|
|
4008
3580
|
get: all[name],
|
|
4009
3581
|
enumerable: !0
|
|
@@ -4031,96 +3603,35 @@ var require_compose_refs_native = __commonJS({
|
|
|
4031
3603
|
}
|
|
4032
3604
|
}
|
|
4033
3605
|
return to;
|
|
4034
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
4035
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
4036
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
4037
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
4038
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
4039
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
4040
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
4041
|
-
value: mod,
|
|
4042
|
-
enumerable: !0
|
|
4043
|
-
}) : target,
|
|
4044
|
-
mod
|
|
4045
|
-
);
|
|
4046
3606
|
}, __toCommonJS2 = function(mod) {
|
|
4047
3607
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4048
3608
|
value: !0
|
|
4049
3609
|
}), mod);
|
|
4050
|
-
},
|
|
4051
|
-
__export2(
|
|
4052
|
-
|
|
4053
|
-
return
|
|
4054
|
-
}
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
3610
|
+
}, ComponentContext_exports = {};
|
|
3611
|
+
__export2(ComponentContext_exports, {
|
|
3612
|
+
ComponentContext: function() {
|
|
3613
|
+
return ComponentContext2;
|
|
3614
|
+
}
|
|
3615
|
+
});
|
|
3616
|
+
module2.exports = __toCommonJS2(ComponentContext_exports);
|
|
3617
|
+
var import_createStyledContext = require_createStyledContext_native(), ComponentContext2 = (0, import_createStyledContext.createStyledContext)({
|
|
3618
|
+
disableSSR: void 0,
|
|
3619
|
+
inText: !1,
|
|
3620
|
+
language: null,
|
|
3621
|
+
animationDriver: null,
|
|
3622
|
+
setParentFocusState: null,
|
|
3623
|
+
groups: {
|
|
3624
|
+
emit: null,
|
|
3625
|
+
subscribe: null,
|
|
3626
|
+
state: {}
|
|
4060
3627
|
}
|
|
4061
3628
|
});
|
|
4062
|
-
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
4063
|
-
var React4 = __toESM2(require("react"));
|
|
4064
|
-
function setRef(ref, value) {
|
|
4065
|
-
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
4066
|
-
}
|
|
4067
|
-
function composeRefs() {
|
|
4068
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
4069
|
-
return function(node) {
|
|
4070
|
-
return refs.forEach(function(ref) {
|
|
4071
|
-
return setRef(ref, node);
|
|
4072
|
-
});
|
|
4073
|
-
};
|
|
4074
|
-
}
|
|
4075
|
-
function useComposedRefs3() {
|
|
4076
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
4077
|
-
return React4.useCallback(composeRefs(...refs), refs);
|
|
4078
|
-
}
|
|
4079
3629
|
}
|
|
4080
3630
|
});
|
|
4081
3631
|
|
|
4082
|
-
// ../../core/
|
|
4083
|
-
var
|
|
4084
|
-
"../../core/
|
|
4085
|
-
"use strict";
|
|
4086
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
4087
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4088
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
4089
|
-
for (var _loop = function() {
|
|
4090
|
-
var key = _step.value;
|
|
4091
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
4092
|
-
get: function() {
|
|
4093
|
-
return from[key];
|
|
4094
|
-
},
|
|
4095
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
4096
|
-
});
|
|
4097
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
4098
|
-
} catch (err) {
|
|
4099
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
4100
|
-
} finally {
|
|
4101
|
-
try {
|
|
4102
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
4103
|
-
} finally {
|
|
4104
|
-
if (_didIteratorError)
|
|
4105
|
-
throw _iteratorError;
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
return to;
|
|
4109
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
4110
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
4111
|
-
}, __toCommonJS2 = function(mod) {
|
|
4112
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4113
|
-
value: !0
|
|
4114
|
-
}), mod);
|
|
4115
|
-
}, index_exports2 = {};
|
|
4116
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
4117
|
-
__reExport2(index_exports2, require_compose_refs_native(), module2.exports);
|
|
4118
|
-
}
|
|
4119
|
-
});
|
|
4120
|
-
|
|
4121
|
-
// ../../core/web/dist/cjs/constants/isDevTools.native.js
|
|
4122
|
-
var require_isDevTools_native = __commonJS({
|
|
4123
|
-
"../../core/web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
3632
|
+
// ../../core/web/dist/cjs/defaultComponentState.native.js
|
|
3633
|
+
var require_defaultComponentState_native = __commonJS({
|
|
3634
|
+
"../../core/web/dist/cjs/defaultComponentState.native.js"(exports2, module2) {
|
|
4124
3635
|
"use strict";
|
|
4125
3636
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4126
3637
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -4154,22 +3665,41 @@ var require_isDevTools_native = __commonJS({
|
|
|
4154
3665
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4155
3666
|
value: !0
|
|
4156
3667
|
}), mod);
|
|
4157
|
-
},
|
|
4158
|
-
__export2(
|
|
4159
|
-
|
|
4160
|
-
return
|
|
3668
|
+
}, defaultComponentState_exports = {};
|
|
3669
|
+
__export2(defaultComponentState_exports, {
|
|
3670
|
+
defaultComponentState: function() {
|
|
3671
|
+
return defaultComponentState;
|
|
3672
|
+
},
|
|
3673
|
+
defaultComponentStateMounted: function() {
|
|
3674
|
+
return defaultComponentStateMounted;
|
|
3675
|
+
},
|
|
3676
|
+
defaultComponentStateShouldEnter: function() {
|
|
3677
|
+
return defaultComponentStateShouldEnter;
|
|
4161
3678
|
}
|
|
4162
3679
|
});
|
|
4163
|
-
module2.exports = __toCommonJS2(
|
|
4164
|
-
var
|
|
4165
|
-
|
|
4166
|
-
|
|
3680
|
+
module2.exports = __toCommonJS2(defaultComponentState_exports);
|
|
3681
|
+
var defaultComponentState = {
|
|
3682
|
+
hover: !1,
|
|
3683
|
+
press: !1,
|
|
3684
|
+
pressIn: !1,
|
|
3685
|
+
focus: !1,
|
|
3686
|
+
focusVisible: !1,
|
|
3687
|
+
focusWithin: !1,
|
|
3688
|
+
unmounted: !0,
|
|
3689
|
+
disabled: !1
|
|
3690
|
+
}, defaultComponentStateMounted = {
|
|
3691
|
+
...defaultComponentState,
|
|
3692
|
+
unmounted: !1
|
|
3693
|
+
}, defaultComponentStateShouldEnter = {
|
|
3694
|
+
...defaultComponentState,
|
|
3695
|
+
unmounted: "should-enter"
|
|
3696
|
+
};
|
|
4167
3697
|
}
|
|
4168
3698
|
});
|
|
4169
3699
|
|
|
4170
|
-
// ../../core/web/dist/cjs/helpers/
|
|
4171
|
-
var
|
|
4172
|
-
"../../core/web/dist/cjs/helpers/
|
|
3700
|
+
// ../../core/web/dist/cjs/helpers/getShorthandValue.native.js
|
|
3701
|
+
var require_getShorthandValue_native = __commonJS({
|
|
3702
|
+
"../../core/web/dist/cjs/helpers/getShorthandValue.native.js"(exports2, module2) {
|
|
4173
3703
|
"use strict";
|
|
4174
3704
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4175
3705
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -4203,36 +3733,26 @@ var require_objectIdentityKey_native = __commonJS({
|
|
|
4203
3733
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4204
3734
|
value: !0
|
|
4205
3735
|
}), mod);
|
|
4206
|
-
},
|
|
4207
|
-
__export2(
|
|
4208
|
-
|
|
4209
|
-
return
|
|
3736
|
+
}, getShorthandValue_exports = {};
|
|
3737
|
+
__export2(getShorthandValue_exports, {
|
|
3738
|
+
getShorthandValue: function() {
|
|
3739
|
+
return getShorthandValue;
|
|
4210
3740
|
}
|
|
4211
3741
|
});
|
|
4212
|
-
module2.exports = __toCommonJS2(
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
if (!arg || type !== "object" && type !== "function") k += type + arg;
|
|
4219
|
-
else if (cache.has(arg)) k += cache.get(arg);
|
|
4220
|
-
else {
|
|
4221
|
-
var v = Math.random();
|
|
4222
|
-
cache.set(arg, v), k += v;
|
|
4223
|
-
}
|
|
4224
|
-
}
|
|
4225
|
-
return k;
|
|
4226
|
-
}
|
|
4227
|
-
var cache = /* @__PURE__ */ new WeakMap();
|
|
3742
|
+
module2.exports = __toCommonJS2(getShorthandValue_exports);
|
|
3743
|
+
var import_config = require_config_native(), inverseShorthands = null, getShorthandValue = function(props, key) {
|
|
3744
|
+
inverseShorthands || (inverseShorthands = (0, import_config.getConfig)().inverseShorthands);
|
|
3745
|
+
var _props_key;
|
|
3746
|
+
return (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : inverseShorthands ? props[inverseShorthands[key]] : void 0;
|
|
3747
|
+
};
|
|
4228
3748
|
}
|
|
4229
3749
|
});
|
|
4230
3750
|
|
|
4231
|
-
// ../../core/web/dist/cjs/
|
|
4232
|
-
var
|
|
4233
|
-
"../../core/web/dist/cjs/
|
|
3751
|
+
// ../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
3752
|
+
var require_accessibilityDirectMap_native = __commonJS({
|
|
3753
|
+
"../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
4234
3754
|
"use strict";
|
|
4235
|
-
var
|
|
3755
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4236
3756
|
for (var name in all) __defProp2(target, name, {
|
|
4237
3757
|
get: all[name],
|
|
4238
3758
|
enumerable: !0
|
|
@@ -4260,62 +3780,36 @@ var require_createStyledContext_native = __commonJS({
|
|
|
4260
3780
|
}
|
|
4261
3781
|
}
|
|
4262
3782
|
return to;
|
|
4263
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
4264
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
4265
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
4266
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
4267
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
4268
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
4269
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
4270
|
-
value: mod,
|
|
4271
|
-
enumerable: !0
|
|
4272
|
-
}) : target,
|
|
4273
|
-
mod
|
|
4274
|
-
);
|
|
4275
3783
|
}, __toCommonJS2 = function(mod) {
|
|
4276
3784
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4277
3785
|
value: !0
|
|
4278
3786
|
}), mod);
|
|
4279
|
-
},
|
|
4280
|
-
__export2(
|
|
4281
|
-
|
|
4282
|
-
return
|
|
3787
|
+
}, accessibilityDirectMap_native_exports = {};
|
|
3788
|
+
__export2(accessibilityDirectMap_native_exports, {
|
|
3789
|
+
accessibilityDirectMap: function() {
|
|
3790
|
+
return accessibilityDirectMap;
|
|
3791
|
+
},
|
|
3792
|
+
accessibilityWebRoleToNativeRole: function() {
|
|
3793
|
+
return accessibilityWebRoleToNativeRole;
|
|
3794
|
+
},
|
|
3795
|
+
nativeAccessibilityState: function() {
|
|
3796
|
+
return nativeAccessibilityState;
|
|
3797
|
+
},
|
|
3798
|
+
nativeAccessibilityValue: function() {
|
|
3799
|
+
return nativeAccessibilityValue;
|
|
3800
|
+
},
|
|
3801
|
+
webToNativeAccessibilityDirectMap: function() {
|
|
3802
|
+
return webToNativeAccessibilityDirectMap;
|
|
4283
3803
|
}
|
|
4284
3804
|
});
|
|
4285
|
-
module2.exports = __toCommonJS2(
|
|
4286
|
-
var
|
|
4287
|
-
function createStyledContext2(defaultValues) {
|
|
4288
|
-
var OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
4289
|
-
function getOrCreateScopedContext(scope) {
|
|
4290
|
-
var ScopedContext = scopedContexts.get(scope);
|
|
4291
|
-
return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
|
|
4292
|
-
}
|
|
4293
|
-
var Provider = function(param) {
|
|
4294
|
-
var { children, scope, ...values } = param, next = import_react3.default.useMemo(function() {
|
|
4295
|
-
return {
|
|
4296
|
-
// this ! is a workaround for ts error
|
|
4297
|
-
...defaultValues,
|
|
4298
|
-
...values
|
|
4299
|
-
};
|
|
4300
|
-
}, [
|
|
4301
|
-
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
4302
|
-
]), Provider22 = OGProvider2;
|
|
4303
|
-
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
|
|
4304
|
-
value: next,
|
|
4305
|
-
children
|
|
4306
|
-
});
|
|
4307
|
-
}, useStyledContext = function(scope) {
|
|
4308
|
-
var context = scope ? getOrCreateScopedContext(scope) : OGContext;
|
|
4309
|
-
return import_react3.default.useContext(context);
|
|
4310
|
-
};
|
|
4311
|
-
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
4312
|
-
}
|
|
3805
|
+
module2.exports = __toCommonJS2(accessibilityDirectMap_native_exports);
|
|
3806
|
+
var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {}, nativeAccessibilityValue = {}, nativeAccessibilityState = {}, accessibilityWebRoleToNativeRole = {};
|
|
4313
3807
|
}
|
|
4314
3808
|
});
|
|
4315
3809
|
|
|
4316
|
-
// ../../core/web/dist/cjs/
|
|
4317
|
-
var
|
|
4318
|
-
"../../core/web/dist/cjs/
|
|
3810
|
+
// ../../core/web/dist/cjs/helpers/getGroupPropParts.native.js
|
|
3811
|
+
var require_getGroupPropParts_native = __commonJS({
|
|
3812
|
+
"../../core/web/dist/cjs/helpers/getGroupPropParts.native.js"(exports2, module2) {
|
|
4319
3813
|
"use strict";
|
|
4320
3814
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4321
3815
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -4349,31 +3843,28 @@ var require_ComponentContext_native = __commonJS({
|
|
|
4349
3843
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4350
3844
|
value: !0
|
|
4351
3845
|
}), mod);
|
|
4352
|
-
},
|
|
4353
|
-
__export2(
|
|
4354
|
-
|
|
4355
|
-
return
|
|
4356
|
-
}
|
|
4357
|
-
});
|
|
4358
|
-
module2.exports = __toCommonJS2(ComponentContext_exports);
|
|
4359
|
-
var import_createStyledContext = require_createStyledContext_native(), ComponentContext2 = (0, import_createStyledContext.createStyledContext)({
|
|
4360
|
-
disableSSR: void 0,
|
|
4361
|
-
inText: !1,
|
|
4362
|
-
language: null,
|
|
4363
|
-
animationDriver: null,
|
|
4364
|
-
setParentFocusState: null,
|
|
4365
|
-
groups: {
|
|
4366
|
-
emit: null,
|
|
4367
|
-
subscribe: null,
|
|
4368
|
-
state: {}
|
|
3846
|
+
}, getGroupPropParts_exports = {};
|
|
3847
|
+
__export2(getGroupPropParts_exports, {
|
|
3848
|
+
getGroupPropParts: function() {
|
|
3849
|
+
return getGroupPropParts;
|
|
4369
3850
|
}
|
|
4370
3851
|
});
|
|
3852
|
+
module2.exports = __toCommonJS2(getGroupPropParts_exports);
|
|
3853
|
+
var import_useMedia = require_useMedia_native();
|
|
3854
|
+
function getGroupPropParts(groupProp) {
|
|
3855
|
+
var mediaQueries = (0, import_useMedia.getMedia)(), [_, name, part3, part4] = groupProp.split("-"), pseudo, media = part3 in mediaQueries ? part3 : void 0;
|
|
3856
|
+
return media ? pseudo = part4 : pseudo = part3, {
|
|
3857
|
+
name,
|
|
3858
|
+
pseudo,
|
|
3859
|
+
media
|
|
3860
|
+
};
|
|
3861
|
+
}
|
|
4371
3862
|
}
|
|
4372
3863
|
});
|
|
4373
3864
|
|
|
4374
|
-
// ../../core/web/dist/cjs/
|
|
4375
|
-
var
|
|
4376
|
-
"../../core/web/dist/cjs/
|
|
3865
|
+
// ../../core/web/dist/cjs/helpers/createMediaStyle.native.js
|
|
3866
|
+
var require_createMediaStyle_native = __commonJS({
|
|
3867
|
+
"../../core/web/dist/cjs/helpers/createMediaStyle.native.js"(exports2, module2) {
|
|
4377
3868
|
"use strict";
|
|
4378
3869
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4379
3870
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -4407,246 +3898,13 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
4407
3898
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4408
3899
|
value: !0
|
|
4409
3900
|
}), mod);
|
|
4410
|
-
},
|
|
4411
|
-
__export2(
|
|
4412
|
-
|
|
4413
|
-
return
|
|
4414
|
-
},
|
|
4415
|
-
defaultComponentStateMounted: function() {
|
|
4416
|
-
return defaultComponentStateMounted;
|
|
3901
|
+
}, createMediaStyle_exports = {};
|
|
3902
|
+
__export2(createMediaStyle_exports, {
|
|
3903
|
+
MEDIA_SEP: function() {
|
|
3904
|
+
return MEDIA_SEP;
|
|
4417
3905
|
},
|
|
4418
|
-
|
|
4419
|
-
return
|
|
4420
|
-
}
|
|
4421
|
-
});
|
|
4422
|
-
module2.exports = __toCommonJS2(defaultComponentState_exports);
|
|
4423
|
-
var defaultComponentState = {
|
|
4424
|
-
hover: !1,
|
|
4425
|
-
press: !1,
|
|
4426
|
-
pressIn: !1,
|
|
4427
|
-
focus: !1,
|
|
4428
|
-
focusVisible: !1,
|
|
4429
|
-
focusWithin: !1,
|
|
4430
|
-
unmounted: !0,
|
|
4431
|
-
disabled: !1
|
|
4432
|
-
}, defaultComponentStateMounted = {
|
|
4433
|
-
...defaultComponentState,
|
|
4434
|
-
unmounted: !1
|
|
4435
|
-
}, defaultComponentStateShouldEnter = {
|
|
4436
|
-
...defaultComponentState,
|
|
4437
|
-
unmounted: "should-enter"
|
|
4438
|
-
};
|
|
4439
|
-
}
|
|
4440
|
-
});
|
|
4441
|
-
|
|
4442
|
-
// ../../core/web/dist/cjs/helpers/getShorthandValue.native.js
|
|
4443
|
-
var require_getShorthandValue_native = __commonJS({
|
|
4444
|
-
"../../core/web/dist/cjs/helpers/getShorthandValue.native.js"(exports2, module2) {
|
|
4445
|
-
"use strict";
|
|
4446
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4447
|
-
for (var name in all) __defProp2(target, name, {
|
|
4448
|
-
get: all[name],
|
|
4449
|
-
enumerable: !0
|
|
4450
|
-
});
|
|
4451
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
4452
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4453
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
4454
|
-
for (var _loop = function() {
|
|
4455
|
-
var key = _step.value;
|
|
4456
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
4457
|
-
get: function() {
|
|
4458
|
-
return from[key];
|
|
4459
|
-
},
|
|
4460
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
4461
|
-
});
|
|
4462
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
4463
|
-
} catch (err) {
|
|
4464
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
4465
|
-
} finally {
|
|
4466
|
-
try {
|
|
4467
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
4468
|
-
} finally {
|
|
4469
|
-
if (_didIteratorError)
|
|
4470
|
-
throw _iteratorError;
|
|
4471
|
-
}
|
|
4472
|
-
}
|
|
4473
|
-
return to;
|
|
4474
|
-
}, __toCommonJS2 = function(mod) {
|
|
4475
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4476
|
-
value: !0
|
|
4477
|
-
}), mod);
|
|
4478
|
-
}, getShorthandValue_exports = {};
|
|
4479
|
-
__export2(getShorthandValue_exports, {
|
|
4480
|
-
getShorthandValue: function() {
|
|
4481
|
-
return getShorthandValue;
|
|
4482
|
-
}
|
|
4483
|
-
});
|
|
4484
|
-
module2.exports = __toCommonJS2(getShorthandValue_exports);
|
|
4485
|
-
var import_config = require_config_native(), inverseShorthands = null, getShorthandValue = function(props, key) {
|
|
4486
|
-
inverseShorthands || (inverseShorthands = (0, import_config.getConfig)().inverseShorthands);
|
|
4487
|
-
var _props_key;
|
|
4488
|
-
return (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : inverseShorthands ? props[inverseShorthands[key]] : void 0;
|
|
4489
|
-
};
|
|
4490
|
-
}
|
|
4491
|
-
});
|
|
4492
|
-
|
|
4493
|
-
// ../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
4494
|
-
var require_accessibilityDirectMap_native = __commonJS({
|
|
4495
|
-
"../../core/web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
4496
|
-
"use strict";
|
|
4497
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4498
|
-
for (var name in all) __defProp2(target, name, {
|
|
4499
|
-
get: all[name],
|
|
4500
|
-
enumerable: !0
|
|
4501
|
-
});
|
|
4502
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
4503
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4504
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
4505
|
-
for (var _loop = function() {
|
|
4506
|
-
var key = _step.value;
|
|
4507
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
4508
|
-
get: function() {
|
|
4509
|
-
return from[key];
|
|
4510
|
-
},
|
|
4511
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
4512
|
-
});
|
|
4513
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
4514
|
-
} catch (err) {
|
|
4515
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
4516
|
-
} finally {
|
|
4517
|
-
try {
|
|
4518
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
4519
|
-
} finally {
|
|
4520
|
-
if (_didIteratorError)
|
|
4521
|
-
throw _iteratorError;
|
|
4522
|
-
}
|
|
4523
|
-
}
|
|
4524
|
-
return to;
|
|
4525
|
-
}, __toCommonJS2 = function(mod) {
|
|
4526
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4527
|
-
value: !0
|
|
4528
|
-
}), mod);
|
|
4529
|
-
}, accessibilityDirectMap_native_exports = {};
|
|
4530
|
-
__export2(accessibilityDirectMap_native_exports, {
|
|
4531
|
-
accessibilityDirectMap: function() {
|
|
4532
|
-
return accessibilityDirectMap;
|
|
4533
|
-
},
|
|
4534
|
-
accessibilityWebRoleToNativeRole: function() {
|
|
4535
|
-
return accessibilityWebRoleToNativeRole;
|
|
4536
|
-
},
|
|
4537
|
-
nativeAccessibilityState: function() {
|
|
4538
|
-
return nativeAccessibilityState;
|
|
4539
|
-
},
|
|
4540
|
-
nativeAccessibilityValue: function() {
|
|
4541
|
-
return nativeAccessibilityValue;
|
|
4542
|
-
},
|
|
4543
|
-
webToNativeAccessibilityDirectMap: function() {
|
|
4544
|
-
return webToNativeAccessibilityDirectMap;
|
|
4545
|
-
}
|
|
4546
|
-
});
|
|
4547
|
-
module2.exports = __toCommonJS2(accessibilityDirectMap_native_exports);
|
|
4548
|
-
var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {}, nativeAccessibilityValue = {}, nativeAccessibilityState = {}, accessibilityWebRoleToNativeRole = {};
|
|
4549
|
-
}
|
|
4550
|
-
});
|
|
4551
|
-
|
|
4552
|
-
// ../../core/web/dist/cjs/helpers/getGroupPropParts.native.js
|
|
4553
|
-
var require_getGroupPropParts_native = __commonJS({
|
|
4554
|
-
"../../core/web/dist/cjs/helpers/getGroupPropParts.native.js"(exports2, module2) {
|
|
4555
|
-
"use strict";
|
|
4556
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4557
|
-
for (var name in all) __defProp2(target, name, {
|
|
4558
|
-
get: all[name],
|
|
4559
|
-
enumerable: !0
|
|
4560
|
-
});
|
|
4561
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
4562
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4563
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
4564
|
-
for (var _loop = function() {
|
|
4565
|
-
var key = _step.value;
|
|
4566
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
4567
|
-
get: function() {
|
|
4568
|
-
return from[key];
|
|
4569
|
-
},
|
|
4570
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
4571
|
-
});
|
|
4572
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
4573
|
-
} catch (err) {
|
|
4574
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
4575
|
-
} finally {
|
|
4576
|
-
try {
|
|
4577
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
4578
|
-
} finally {
|
|
4579
|
-
if (_didIteratorError)
|
|
4580
|
-
throw _iteratorError;
|
|
4581
|
-
}
|
|
4582
|
-
}
|
|
4583
|
-
return to;
|
|
4584
|
-
}, __toCommonJS2 = function(mod) {
|
|
4585
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4586
|
-
value: !0
|
|
4587
|
-
}), mod);
|
|
4588
|
-
}, getGroupPropParts_exports = {};
|
|
4589
|
-
__export2(getGroupPropParts_exports, {
|
|
4590
|
-
getGroupPropParts: function() {
|
|
4591
|
-
return getGroupPropParts;
|
|
4592
|
-
}
|
|
4593
|
-
});
|
|
4594
|
-
module2.exports = __toCommonJS2(getGroupPropParts_exports);
|
|
4595
|
-
var import_useMedia = require_useMedia_native();
|
|
4596
|
-
function getGroupPropParts(groupProp) {
|
|
4597
|
-
var mediaQueries = (0, import_useMedia.getMedia)(), [_, name, part3, part4] = groupProp.split("-"), pseudo, media = part3 in mediaQueries ? part3 : void 0;
|
|
4598
|
-
return media ? pseudo = part4 : pseudo = part3, {
|
|
4599
|
-
name,
|
|
4600
|
-
pseudo,
|
|
4601
|
-
media
|
|
4602
|
-
};
|
|
4603
|
-
}
|
|
4604
|
-
}
|
|
4605
|
-
});
|
|
4606
|
-
|
|
4607
|
-
// ../../core/web/dist/cjs/helpers/createMediaStyle.native.js
|
|
4608
|
-
var require_createMediaStyle_native = __commonJS({
|
|
4609
|
-
"../../core/web/dist/cjs/helpers/createMediaStyle.native.js"(exports2, module2) {
|
|
4610
|
-
"use strict";
|
|
4611
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
4612
|
-
for (var name in all) __defProp2(target, name, {
|
|
4613
|
-
get: all[name],
|
|
4614
|
-
enumerable: !0
|
|
4615
|
-
});
|
|
4616
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
4617
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
4618
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
4619
|
-
for (var _loop = function() {
|
|
4620
|
-
var key = _step.value;
|
|
4621
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
4622
|
-
get: function() {
|
|
4623
|
-
return from[key];
|
|
4624
|
-
},
|
|
4625
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
4626
|
-
});
|
|
4627
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
4628
|
-
} catch (err) {
|
|
4629
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
4630
|
-
} finally {
|
|
4631
|
-
try {
|
|
4632
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
4633
|
-
} finally {
|
|
4634
|
-
if (_didIteratorError)
|
|
4635
|
-
throw _iteratorError;
|
|
4636
|
-
}
|
|
4637
|
-
}
|
|
4638
|
-
return to;
|
|
4639
|
-
}, __toCommonJS2 = function(mod) {
|
|
4640
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
4641
|
-
value: !0
|
|
4642
|
-
}), mod);
|
|
4643
|
-
}, createMediaStyle_exports = {};
|
|
4644
|
-
__export2(createMediaStyle_exports, {
|
|
4645
|
-
MEDIA_SEP: function() {
|
|
4646
|
-
return MEDIA_SEP;
|
|
4647
|
-
},
|
|
4648
|
-
createMediaStyle: function() {
|
|
4649
|
-
return createMediaStyle;
|
|
3906
|
+
createMediaStyle: function() {
|
|
3907
|
+
return createMediaStyle;
|
|
4650
3908
|
}
|
|
4651
3909
|
});
|
|
4652
3910
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
@@ -7320,37 +6578,516 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7320
6578
|
...viewProps[key],
|
|
7321
6579
|
...val
|
|
7322
6580
|
};
|
|
7323
|
-
delete viewProps[key], viewProps[key] = next;
|
|
7324
|
-
} else viewProps[key] = val;
|
|
7325
|
-
}
|
|
7326
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
|
|
7327
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
|
|
7328
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
7329
|
-
if (importancesUsed[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
7330
|
-
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
7331
|
-
if (isDisabled) return !1;
|
|
7332
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
7333
|
-
} else mergeStyle(styleState, key, value);
|
|
7334
|
-
return !0;
|
|
7335
|
-
}
|
|
7336
|
-
function normalizeStyle(style) {
|
|
7337
|
-
var out = {};
|
|
7338
|
-
for (var key in style) {
|
|
7339
|
-
var val = style[key];
|
|
7340
|
-
key in import_helpers.stylePropsTransform ? mergeTransform(out, key, val) : out[key] = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key);
|
|
6581
|
+
delete viewProps[key], viewProps[key] = next;
|
|
6582
|
+
} else viewProps[key] = val;
|
|
6583
|
+
}
|
|
6584
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
|
|
6585
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
|
|
6586
|
+
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
6587
|
+
if (importancesUsed[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
6588
|
+
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
6589
|
+
if (isDisabled) return !1;
|
|
6590
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
6591
|
+
} else mergeStyle(styleState, key, value);
|
|
6592
|
+
return !0;
|
|
6593
|
+
}
|
|
6594
|
+
function normalizeStyle(style) {
|
|
6595
|
+
var out = {};
|
|
6596
|
+
for (var key in style) {
|
|
6597
|
+
var val = style[key];
|
|
6598
|
+
key in import_helpers.stylePropsTransform ? mergeTransform(out, key, val) : out[key] = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key);
|
|
6599
|
+
}
|
|
6600
|
+
return import_constants4.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
|
|
6601
|
+
}
|
|
6602
|
+
function applyDefaultStyle(pkey, styleState) {
|
|
6603
|
+
var defaultValues = animatableDefaults[pkey];
|
|
6604
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
});
|
|
6608
|
+
|
|
6609
|
+
// ../../core/web/dist/cjs/helpers/mergeProps.native.js
|
|
6610
|
+
var require_mergeProps_native = __commonJS({
|
|
6611
|
+
"../../core/web/dist/cjs/helpers/mergeProps.native.js"(exports2, module2) {
|
|
6612
|
+
"use strict";
|
|
6613
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6614
|
+
for (var name in all) __defProp2(target, name, {
|
|
6615
|
+
get: all[name],
|
|
6616
|
+
enumerable: !0
|
|
6617
|
+
});
|
|
6618
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6619
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6620
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6621
|
+
for (var _loop = function() {
|
|
6622
|
+
var key = _step.value;
|
|
6623
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6624
|
+
get: function() {
|
|
6625
|
+
return from[key];
|
|
6626
|
+
},
|
|
6627
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6628
|
+
});
|
|
6629
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6630
|
+
} catch (err) {
|
|
6631
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6632
|
+
} finally {
|
|
6633
|
+
try {
|
|
6634
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6635
|
+
} finally {
|
|
6636
|
+
if (_didIteratorError)
|
|
6637
|
+
throw _iteratorError;
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
return to;
|
|
6641
|
+
}, __toCommonJS2 = function(mod) {
|
|
6642
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6643
|
+
value: !0
|
|
6644
|
+
}), mod);
|
|
6645
|
+
}, mergeProps_exports = {};
|
|
6646
|
+
__export2(mergeProps_exports, {
|
|
6647
|
+
mergeProps: function() {
|
|
6648
|
+
return mergeProps;
|
|
6649
|
+
}
|
|
6650
|
+
});
|
|
6651
|
+
module2.exports = __toCommonJS2(mergeProps_exports);
|
|
6652
|
+
var import_useMedia = require_useMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), mergeProps = function(a, b, inverseShorthands) {
|
|
6653
|
+
var out = {};
|
|
6654
|
+
for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
|
|
6655
|
+
if (b) for (var key1 in b) mergeProp(out, b, void 0, key1, inverseShorthands);
|
|
6656
|
+
return out;
|
|
6657
|
+
};
|
|
6658
|
+
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
6659
|
+
var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
|
|
6660
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
|
|
6661
|
+
out[key] = {
|
|
6662
|
+
...out[key],
|
|
6663
|
+
...val
|
|
6664
|
+
};
|
|
6665
|
+
return;
|
|
6666
|
+
}
|
|
6667
|
+
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
});
|
|
6671
|
+
|
|
6672
|
+
// ../../core/web/dist/cjs/helpers/setElementProps.native.js
|
|
6673
|
+
var require_setElementProps_native = __commonJS({
|
|
6674
|
+
"../../core/web/dist/cjs/helpers/setElementProps.native.js"(exports2, module2) {
|
|
6675
|
+
"use strict";
|
|
6676
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6677
|
+
for (var name in all) __defProp2(target, name, {
|
|
6678
|
+
get: all[name],
|
|
6679
|
+
enumerable: !0
|
|
6680
|
+
});
|
|
6681
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6682
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6683
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6684
|
+
for (var _loop = function() {
|
|
6685
|
+
var key = _step.value;
|
|
6686
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6687
|
+
get: function() {
|
|
6688
|
+
return from[key];
|
|
6689
|
+
},
|
|
6690
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6691
|
+
});
|
|
6692
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6693
|
+
} catch (err) {
|
|
6694
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6695
|
+
} finally {
|
|
6696
|
+
try {
|
|
6697
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6698
|
+
} finally {
|
|
6699
|
+
if (_didIteratorError)
|
|
6700
|
+
throw _iteratorError;
|
|
6701
|
+
}
|
|
6702
|
+
}
|
|
6703
|
+
return to;
|
|
6704
|
+
}, __toCommonJS2 = function(mod) {
|
|
6705
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6706
|
+
value: !0
|
|
6707
|
+
}), mod);
|
|
6708
|
+
}, setElementProps_native_exports = {};
|
|
6709
|
+
__export2(setElementProps_native_exports, {
|
|
6710
|
+
setElementProps: function() {
|
|
6711
|
+
return setElementProps;
|
|
6712
|
+
}
|
|
6713
|
+
});
|
|
6714
|
+
module2.exports = __toCommonJS2(setElementProps_native_exports);
|
|
6715
|
+
function setElementProps(element) {
|
|
6716
|
+
element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
|
|
6717
|
+
if (element.unstable_getBoundingClientRect != null) return element.unstable_getBoundingClientRect();
|
|
6718
|
+
});
|
|
6719
|
+
}
|
|
6720
|
+
}
|
|
6721
|
+
});
|
|
6722
|
+
|
|
6723
|
+
// ../../core/web/dist/cjs/helpers/createShallowSetState.native.js
|
|
6724
|
+
var require_createShallowSetState_native = __commonJS({
|
|
6725
|
+
"../../core/web/dist/cjs/helpers/createShallowSetState.native.js"(exports2, module2) {
|
|
6726
|
+
"use strict";
|
|
6727
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6728
|
+
for (var name in all) __defProp2(target, name, {
|
|
6729
|
+
get: all[name],
|
|
6730
|
+
enumerable: !0
|
|
6731
|
+
});
|
|
6732
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6733
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6734
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6735
|
+
for (var _loop = function() {
|
|
6736
|
+
var key = _step.value;
|
|
6737
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6738
|
+
get: function() {
|
|
6739
|
+
return from[key];
|
|
6740
|
+
},
|
|
6741
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6742
|
+
});
|
|
6743
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6744
|
+
} catch (err) {
|
|
6745
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6746
|
+
} finally {
|
|
6747
|
+
try {
|
|
6748
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6749
|
+
} finally {
|
|
6750
|
+
if (_didIteratorError)
|
|
6751
|
+
throw _iteratorError;
|
|
6752
|
+
}
|
|
6753
|
+
}
|
|
6754
|
+
return to;
|
|
6755
|
+
}, __toCommonJS2 = function(mod) {
|
|
6756
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6757
|
+
value: !0
|
|
6758
|
+
}), mod);
|
|
6759
|
+
}, createShallowSetState_exports = {};
|
|
6760
|
+
__export2(createShallowSetState_exports, {
|
|
6761
|
+
createShallowSetState: function() {
|
|
6762
|
+
return createShallowSetState;
|
|
6763
|
+
},
|
|
6764
|
+
isEqualShallow: function() {
|
|
6765
|
+
return isEqualShallow;
|
|
6766
|
+
},
|
|
6767
|
+
mergeIfNotShallowEqual: function() {
|
|
6768
|
+
return mergeIfNotShallowEqual;
|
|
6769
|
+
}
|
|
6770
|
+
});
|
|
6771
|
+
module2.exports = __toCommonJS2(createShallowSetState_exports);
|
|
6772
|
+
var import_react3 = require("react"), callImmediate = function(cb) {
|
|
6773
|
+
return cb();
|
|
6774
|
+
};
|
|
6775
|
+
function createShallowSetState(setter, isDisabled, transition, debug, callback) {
|
|
6776
|
+
return (0, import_react3.useCallback)(function(next) {
|
|
6777
|
+
var wrap = transition ? import_react3.startTransition : callImmediate;
|
|
6778
|
+
wrap(function() {
|
|
6779
|
+
setter(function(prev) {
|
|
6780
|
+
var out = mergeIfNotShallowEqual(prev, next, isDisabled, debug);
|
|
6781
|
+
return callback == null || callback(out), out;
|
|
6782
|
+
});
|
|
6783
|
+
});
|
|
6784
|
+
}, [
|
|
6785
|
+
setter,
|
|
6786
|
+
isDisabled,
|
|
6787
|
+
transition,
|
|
6788
|
+
debug
|
|
6789
|
+
]);
|
|
6790
|
+
}
|
|
6791
|
+
function mergeIfNotShallowEqual(prev, next, isDisabled, debug) {
|
|
6792
|
+
return isDisabled || !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
6793
|
+
...prev,
|
|
6794
|
+
...next
|
|
6795
|
+
};
|
|
6796
|
+
}
|
|
6797
|
+
function isEqualShallow(prev, next) {
|
|
6798
|
+
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
6799
|
+
return !0;
|
|
6800
|
+
}
|
|
6801
|
+
}
|
|
6802
|
+
});
|
|
6803
|
+
|
|
6804
|
+
// ../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
6805
|
+
var require_subscribeToContextGroup_native = __commonJS({
|
|
6806
|
+
"../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
6807
|
+
"use strict";
|
|
6808
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6809
|
+
for (var name in all) __defProp2(target, name, {
|
|
6810
|
+
get: all[name],
|
|
6811
|
+
enumerable: !0
|
|
6812
|
+
});
|
|
6813
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6814
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6815
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6816
|
+
for (var _loop = function() {
|
|
6817
|
+
var key = _step.value;
|
|
6818
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6819
|
+
get: function() {
|
|
6820
|
+
return from[key];
|
|
6821
|
+
},
|
|
6822
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6823
|
+
});
|
|
6824
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6825
|
+
} catch (err) {
|
|
6826
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6827
|
+
} finally {
|
|
6828
|
+
try {
|
|
6829
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6830
|
+
} finally {
|
|
6831
|
+
if (_didIteratorError)
|
|
6832
|
+
throw _iteratorError;
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
return to;
|
|
6836
|
+
}, __toCommonJS2 = function(mod) {
|
|
6837
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6838
|
+
value: !0
|
|
6839
|
+
}), mod);
|
|
6840
|
+
}, subscribeToContextGroup_exports = {};
|
|
6841
|
+
__export2(subscribeToContextGroup_exports, {
|
|
6842
|
+
subscribeToContextGroup: function() {
|
|
6843
|
+
return subscribeToContextGroup;
|
|
6844
|
+
}
|
|
6845
|
+
});
|
|
6846
|
+
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6847
|
+
var import_createShallowSetState = require_createShallowSetState_native(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(param) {
|
|
6848
|
+
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
6849
|
+
if (pseudoGroups || mediaGroups) {
|
|
6850
|
+
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
6851
|
+
pseudo: {},
|
|
6852
|
+
media: {}
|
|
6853
|
+
};
|
|
6854
|
+
return (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
6855
|
+
var { layout, pseudo } = param2;
|
|
6856
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
6857
|
+
else if (layout && mediaGroups) {
|
|
6858
|
+
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState3);
|
|
6859
|
+
next !== current.media && (Object.assign(current.media, next), persist());
|
|
6860
|
+
}
|
|
6861
|
+
function persist() {
|
|
6862
|
+
var group = {
|
|
6863
|
+
...state.group,
|
|
6864
|
+
[name]: current
|
|
6865
|
+
};
|
|
6866
|
+
setStateShallow({
|
|
6867
|
+
group
|
|
6868
|
+
});
|
|
6869
|
+
}
|
|
6870
|
+
});
|
|
6871
|
+
}
|
|
6872
|
+
};
|
|
6873
|
+
}
|
|
6874
|
+
});
|
|
6875
|
+
|
|
6876
|
+
// ../../core/web/dist/cjs/hooks/useThemeState.native.js
|
|
6877
|
+
var require_useThemeState_native = __commonJS({
|
|
6878
|
+
"../../core/web/dist/cjs/hooks/useThemeState.native.js"(exports2, module2) {
|
|
6879
|
+
"use strict";
|
|
6880
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6881
|
+
for (var name in all) __defProp2(target, name, {
|
|
6882
|
+
get: all[name],
|
|
6883
|
+
enumerable: !0
|
|
6884
|
+
});
|
|
6885
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6886
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6887
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6888
|
+
for (var _loop = function() {
|
|
6889
|
+
var key = _step.value;
|
|
6890
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6891
|
+
get: function() {
|
|
6892
|
+
return from[key];
|
|
6893
|
+
},
|
|
6894
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6895
|
+
});
|
|
6896
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6897
|
+
} catch (err) {
|
|
6898
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6899
|
+
} finally {
|
|
6900
|
+
try {
|
|
6901
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6902
|
+
} finally {
|
|
6903
|
+
if (_didIteratorError)
|
|
6904
|
+
throw _iteratorError;
|
|
6905
|
+
}
|
|
6906
|
+
}
|
|
6907
|
+
return to;
|
|
6908
|
+
}, __toCommonJS2 = function(mod) {
|
|
6909
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6910
|
+
value: !0
|
|
6911
|
+
}), mod);
|
|
6912
|
+
}, useThemeState_exports = {};
|
|
6913
|
+
__export2(useThemeState_exports, {
|
|
6914
|
+
ThemeStateContext: function() {
|
|
6915
|
+
return ThemeStateContext;
|
|
6916
|
+
},
|
|
6917
|
+
forceUpdateThemes: function() {
|
|
6918
|
+
return forceUpdateThemes2;
|
|
6919
|
+
},
|
|
6920
|
+
getRootThemeState: function() {
|
|
6921
|
+
return getRootThemeState;
|
|
6922
|
+
},
|
|
6923
|
+
getThemeState: function() {
|
|
6924
|
+
return getThemeState;
|
|
6925
|
+
},
|
|
6926
|
+
hasThemeUpdatingProps: function() {
|
|
6927
|
+
return hasThemeUpdatingProps;
|
|
6928
|
+
},
|
|
6929
|
+
useThemeState: function() {
|
|
6930
|
+
return useThemeState;
|
|
6931
|
+
}
|
|
6932
|
+
});
|
|
6933
|
+
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
6934
|
+
var import_react3 = require("react"), import_config = require_config_native(), ThemeStateContext = (0, import_react3.createContext)(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, states = /* @__PURE__ */ new Map(), forceUpdateThemes2 = function() {
|
|
6935
|
+
allListeners.forEach(function(cb) {
|
|
6936
|
+
return cb();
|
|
6937
|
+
});
|
|
6938
|
+
}, getThemeState = function(id) {
|
|
6939
|
+
return states.get(id);
|
|
6940
|
+
}, rootThemeState = null, getRootThemeState = function() {
|
|
6941
|
+
return rootThemeState;
|
|
6942
|
+
}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), useThemeState = function(props) {
|
|
6943
|
+
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = arguments.length > 2 ? arguments[2] : void 0, { disable } = props, parentId = (0, import_react3.useContext)(ThemeStateContext);
|
|
6944
|
+
if (disable) return states.get(parentId) || {
|
|
6945
|
+
id: "",
|
|
6946
|
+
name: "light",
|
|
6947
|
+
theme: (0, import_config.getConfig)().themes.light,
|
|
6948
|
+
inverses: 0
|
|
6949
|
+
};
|
|
6950
|
+
var id = (0, import_react3.useId)(), subscribe = (0, import_react3.useCallback)(function(cb) {
|
|
6951
|
+
var _listenersByParent, _parentId;
|
|
6952
|
+
return (_listenersByParent = listenersByParent)[_parentId = parentId] || (_listenersByParent[_parentId] = /* @__PURE__ */ new Set()), listenersByParent[parentId].add(id), allListeners.set(id, cb), function() {
|
|
6953
|
+
allListeners.delete(id), listenersByParent[parentId].delete(id);
|
|
6954
|
+
};
|
|
6955
|
+
}, [
|
|
6956
|
+
id,
|
|
6957
|
+
parentId,
|
|
6958
|
+
keys
|
|
6959
|
+
]), propsKey = getPropsKey(props), getSnapshot = function() {
|
|
6960
|
+
return getSnapshotFrom(props, propsKey, isRoot, id, parentId, keys);
|
|
6961
|
+
}, state = (0, import_react3.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
6962
|
+
return (0, import_react3.useLayoutEffect)(function() {
|
|
6963
|
+
if (propsKey) {
|
|
6964
|
+
if (!HasRenderedOnce.has(keys)) {
|
|
6965
|
+
HasRenderedOnce.set(keys, !0);
|
|
6966
|
+
return;
|
|
6967
|
+
}
|
|
6968
|
+
if (0)
|
|
6969
|
+
var _states_get;
|
|
6970
|
+
scheduleUpdate(id);
|
|
6971
|
+
}
|
|
6972
|
+
}, [
|
|
6973
|
+
keys,
|
|
6974
|
+
propsKey
|
|
6975
|
+
]), state.id === id ? {
|
|
6976
|
+
...state,
|
|
6977
|
+
isNew: !0
|
|
6978
|
+
} : state;
|
|
6979
|
+
}, themes = null, getSnapshotFrom = function(props, propsKey) {
|
|
6980
|
+
var isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, id = arguments.length > 3 ? arguments[3] : void 0, parentId = arguments.length > 4 ? arguments[4] : void 0, keys = arguments.length > 5 ? arguments[5] : void 0, _keys_current, _props_needsUpdate, needsUpdate = (keys == null || (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) || ((_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props)), parentState = states.get(parentId);
|
|
6981
|
+
themes || (themes = (0, import_config.getConfig)().themes);
|
|
6982
|
+
var lastState = states.get(id), name = propsKey ? getNewThemeName(parentState == null ? void 0 : parentState.name, props, !!needsUpdate) : null;
|
|
6983
|
+
if (0)
|
|
6984
|
+
var message;
|
|
6985
|
+
var isSameAsParent = !name && propsKey;
|
|
6986
|
+
if (parentState && isSameAsParent) return parentState;
|
|
6987
|
+
if (!name) return lastState && !needsUpdate ? lastState : (states.set(id, parentState), parentState);
|
|
6988
|
+
if (lastState && lastState.name === name) return lastState;
|
|
6989
|
+
var scheme = getScheme(name), _parentState_inverses, parentInverses = (_parentState_inverses = parentState == null ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0, isInverse = parentState && scheme !== parentState.scheme, inverses = parentInverses + (isInverse ? 1 : 0), nextState = {
|
|
6990
|
+
id,
|
|
6991
|
+
name,
|
|
6992
|
+
theme: themes[name],
|
|
6993
|
+
scheme,
|
|
6994
|
+
parentId,
|
|
6995
|
+
parentName: parentState == null ? void 0 : parentState.name,
|
|
6996
|
+
inverses,
|
|
6997
|
+
isInverse
|
|
6998
|
+
};
|
|
6999
|
+
return states.set(id, nextState), isRoot && (rootThemeState = nextState), nextState;
|
|
7000
|
+
};
|
|
7001
|
+
function scheduleUpdate(id) {
|
|
7002
|
+
for (var queue = [
|
|
7003
|
+
id
|
|
7004
|
+
], visited = /* @__PURE__ */ new Set(); queue.length; ) {
|
|
7005
|
+
var parent = queue.shift(), children = listenersByParent[parent];
|
|
7006
|
+
if (children) {
|
|
7007
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7008
|
+
try {
|
|
7009
|
+
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7010
|
+
var childId = _step.value;
|
|
7011
|
+
visited.has(childId) || (visited.add(childId), queue.push(childId));
|
|
7012
|
+
}
|
|
7013
|
+
} catch (err) {
|
|
7014
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7015
|
+
} finally {
|
|
7016
|
+
try {
|
|
7017
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7018
|
+
} finally {
|
|
7019
|
+
if (_didIteratorError) throw _iteratorError;
|
|
7020
|
+
}
|
|
7021
|
+
}
|
|
7022
|
+
}
|
|
7341
7023
|
}
|
|
7342
|
-
|
|
7024
|
+
visited.forEach(function(childId2) {
|
|
7025
|
+
var cb = allListeners.get(childId2);
|
|
7026
|
+
cb == null || cb();
|
|
7027
|
+
});
|
|
7343
7028
|
}
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7029
|
+
var validSchemes = {
|
|
7030
|
+
light: "light",
|
|
7031
|
+
dark: "dark"
|
|
7032
|
+
};
|
|
7033
|
+
function getScheme(name) {
|
|
7034
|
+
return validSchemes[name.split("_")[0]];
|
|
7035
|
+
}
|
|
7036
|
+
function getNewThemeName() {
|
|
7037
|
+
var parentName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", { name, reset, componentName, inverse } = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
7038
|
+
if (name && reset) throw new Error("Cannot reset and set a new name at the same time.");
|
|
7039
|
+
if (reset) {
|
|
7040
|
+
if (!parentName) throw new Error("\u203C\uFE0F");
|
|
7041
|
+
var lastPartIndex = parentName.lastIndexOf("_");
|
|
7042
|
+
return lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex);
|
|
7043
|
+
}
|
|
7044
|
+
var { themes: themes2 } = (0, import_config.getConfig)(), parentParts = parentName.split("_"), lastName = parentParts[parentParts.length - 1];
|
|
7045
|
+
lastName && lastName[0].toLowerCase() !== lastName[0] && parentParts.pop();
|
|
7046
|
+
for (var subNames = [
|
|
7047
|
+
name && componentName ? `${name}_${componentName}` : void 0,
|
|
7048
|
+
name,
|
|
7049
|
+
componentName
|
|
7050
|
+
].filter(Boolean), found = null, max2 = parentParts.length, i = 0; i <= max2; i++) {
|
|
7051
|
+
var base = (i === 0 ? parentParts : parentParts.slice(0, -i)).join("_"), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7052
|
+
try {
|
|
7053
|
+
for (var _iterator = subNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7054
|
+
var subName = _step.value, potential = base ? `${base}_${subName}` : subName;
|
|
7055
|
+
if (potential in themes2) {
|
|
7056
|
+
found = potential;
|
|
7057
|
+
break;
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
} catch (err) {
|
|
7061
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7062
|
+
} finally {
|
|
7063
|
+
try {
|
|
7064
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7065
|
+
} finally {
|
|
7066
|
+
if (_didIteratorError) throw _iteratorError;
|
|
7067
|
+
}
|
|
7068
|
+
}
|
|
7069
|
+
if (found) break;
|
|
7070
|
+
}
|
|
7071
|
+
if (found && inverse) {
|
|
7072
|
+
var scheme = found.split("_")[0];
|
|
7073
|
+
found = found.replace(new RegExp(`^${scheme}`), scheme === "light" ? "dark" : "light");
|
|
7074
|
+
}
|
|
7075
|
+
return !forceUpdate && found === parentName && // if its a scheme only sub-theme, we always consider it "new" because it likely inverses
|
|
7076
|
+
// and we want to avoid reparenting
|
|
7077
|
+
!validSchemes[found] ? null : found;
|
|
7347
7078
|
}
|
|
7079
|
+
var getPropsKey = function(param) {
|
|
7080
|
+
var { name, reset, inverse, forceClassName, componentName } = param;
|
|
7081
|
+
return `${name || ""}${inverse || ""}${reset || ""}${forceClassName || ""}${componentName || ""}`;
|
|
7082
|
+
}, hasThemeUpdatingProps = function(props) {
|
|
7083
|
+
return "inverse" in props || "name" in props || "reset" in props || "forceClassName" in props;
|
|
7084
|
+
};
|
|
7348
7085
|
}
|
|
7349
7086
|
});
|
|
7350
7087
|
|
|
7351
|
-
// ../../core/web/dist/cjs/
|
|
7352
|
-
var
|
|
7353
|
-
"../../core/web/dist/cjs/
|
|
7088
|
+
// ../../core/web/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js
|
|
7089
|
+
var require_doesRootSchemeMatchSystem_native = __commonJS({
|
|
7090
|
+
"../../core/web/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js"(exports2, module2) {
|
|
7354
7091
|
"use strict";
|
|
7355
7092
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7356
7093
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -7384,36 +7121,24 @@ var require_mergeProps_native = __commonJS({
|
|
|
7384
7121
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7385
7122
|
value: !0
|
|
7386
7123
|
}), mod);
|
|
7387
|
-
},
|
|
7388
|
-
__export2(
|
|
7389
|
-
|
|
7390
|
-
return
|
|
7124
|
+
}, doesRootSchemeMatchSystem_native_exports = {};
|
|
7125
|
+
__export2(doesRootSchemeMatchSystem_native_exports, {
|
|
7126
|
+
doesRootSchemeMatchSystem: function() {
|
|
7127
|
+
return doesRootSchemeMatchSystem;
|
|
7391
7128
|
}
|
|
7392
7129
|
});
|
|
7393
|
-
module2.exports = __toCommonJS2(
|
|
7394
|
-
var
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
return out;
|
|
7399
|
-
};
|
|
7400
|
-
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
7401
|
-
var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
|
|
7402
|
-
if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
|
|
7403
|
-
out[key] = {
|
|
7404
|
-
...out[key],
|
|
7405
|
-
...val
|
|
7406
|
-
};
|
|
7407
|
-
return;
|
|
7408
|
-
}
|
|
7409
|
-
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
7130
|
+
module2.exports = __toCommonJS2(doesRootSchemeMatchSystem_native_exports);
|
|
7131
|
+
var import_react_native4 = require("react-native"), import_useThemeState = require_useThemeState_native();
|
|
7132
|
+
function doesRootSchemeMatchSystem() {
|
|
7133
|
+
var _getRootThemeState;
|
|
7134
|
+
return ((_getRootThemeState = (0, import_useThemeState.getRootThemeState)()) === null || _getRootThemeState === void 0 ? void 0 : _getRootThemeState.scheme) === import_react_native4.Appearance.getColorScheme();
|
|
7410
7135
|
}
|
|
7411
7136
|
}
|
|
7412
7137
|
});
|
|
7413
7138
|
|
|
7414
|
-
// ../../core/web/dist/cjs/
|
|
7415
|
-
var
|
|
7416
|
-
"../../core/web/dist/cjs/
|
|
7139
|
+
// ../../core/web/dist/cjs/hooks/getThemeProxied.native.js
|
|
7140
|
+
var require_getThemeProxied_native = __commonJS({
|
|
7141
|
+
"../../core/web/dist/cjs/hooks/getThemeProxied.native.js"(exports2, module2) {
|
|
7417
7142
|
"use strict";
|
|
7418
7143
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7419
7144
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -7447,24 +7172,64 @@ var require_setElementProps_native = __commonJS({
|
|
|
7447
7172
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7448
7173
|
value: !0
|
|
7449
7174
|
}), mod);
|
|
7450
|
-
},
|
|
7451
|
-
__export2(
|
|
7452
|
-
|
|
7453
|
-
return
|
|
7175
|
+
}, getThemeProxied_exports = {};
|
|
7176
|
+
__export2(getThemeProxied_exports, {
|
|
7177
|
+
getThemeProxied: function() {
|
|
7178
|
+
return getThemeProxied;
|
|
7454
7179
|
}
|
|
7455
7180
|
});
|
|
7456
|
-
module2.exports = __toCommonJS2(
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7181
|
+
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
7182
|
+
var import_constants4 = require_index_native6(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, emptyObject = {};
|
|
7183
|
+
function getThemeProxied(_props, state, _keys) {
|
|
7184
|
+
var theme = state == null ? void 0 : state.theme;
|
|
7185
|
+
if (!theme) return emptyObject;
|
|
7186
|
+
if (curKeys = _keys, curProps = _props, cache.has(theme)) {
|
|
7187
|
+
var proxied = cache.get(theme);
|
|
7188
|
+
return proxied;
|
|
7189
|
+
}
|
|
7190
|
+
var { name, scheme } = state, config = (0, import_config.getConfig)();
|
|
7191
|
+
function track(key) {
|
|
7192
|
+
curKeys && (curKeys.current || (curKeys.current = /* @__PURE__ */ new Set()), curKeys.current.add(key));
|
|
7193
|
+
}
|
|
7194
|
+
var proxied1 = Object.fromEntries(Object.entries(theme).flatMap(function(param) {
|
|
7195
|
+
var [key, value] = param, proxied2 = {
|
|
7196
|
+
...value,
|
|
7197
|
+
get val() {
|
|
7198
|
+
return globalThis.tamaguiAvoidTracking || track(key), value.val;
|
|
7199
|
+
},
|
|
7200
|
+
get(platform2) {
|
|
7201
|
+
var outVal = (0, import_createVariable.getVariable)(value), shouldOptimize = scheme && platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && state.inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
7202
|
+
if (shouldOptimize) {
|
|
7203
|
+
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = {
|
|
7204
|
+
dynamic: {
|
|
7205
|
+
[scheme]: color,
|
|
7206
|
+
[oppositeScheme]: oppositeColor
|
|
7207
|
+
}
|
|
7208
|
+
};
|
|
7209
|
+
return dynamicVal;
|
|
7210
|
+
}
|
|
7211
|
+
return track(key), outVal;
|
|
7212
|
+
}
|
|
7213
|
+
};
|
|
7214
|
+
return [
|
|
7215
|
+
[
|
|
7216
|
+
key,
|
|
7217
|
+
proxied2
|
|
7218
|
+
],
|
|
7219
|
+
[
|
|
7220
|
+
`$${key}`,
|
|
7221
|
+
proxied2
|
|
7222
|
+
]
|
|
7223
|
+
];
|
|
7224
|
+
}));
|
|
7225
|
+
return cache.set(theme, proxied1), proxied1;
|
|
7461
7226
|
}
|
|
7462
7227
|
}
|
|
7463
7228
|
});
|
|
7464
7229
|
|
|
7465
|
-
// ../../core/web/dist/cjs/
|
|
7466
|
-
var
|
|
7467
|
-
"../../core/web/dist/cjs/
|
|
7230
|
+
// ../../core/web/dist/cjs/hooks/useTheme.native.js
|
|
7231
|
+
var require_useTheme_native = __commonJS({
|
|
7232
|
+
"../../core/web/dist/cjs/hooks/useTheme.native.js"(exports2, module2) {
|
|
7468
7233
|
"use strict";
|
|
7469
7234
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7470
7235
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -7498,38 +7263,25 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7498
7263
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7499
7264
|
value: !0
|
|
7500
7265
|
}), mod);
|
|
7501
|
-
},
|
|
7502
|
-
__export2(
|
|
7503
|
-
|
|
7504
|
-
return
|
|
7266
|
+
}, useTheme_exports = {};
|
|
7267
|
+
__export2(useTheme_exports, {
|
|
7268
|
+
useTheme: function() {
|
|
7269
|
+
return useTheme4;
|
|
7270
|
+
},
|
|
7271
|
+
useThemeWithState: function() {
|
|
7272
|
+
return useThemeWithState;
|
|
7505
7273
|
}
|
|
7506
7274
|
});
|
|
7507
|
-
module2.exports = __toCommonJS2(
|
|
7508
|
-
var
|
|
7509
|
-
var
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
7518
|
-
else if (layout && mediaGroups) {
|
|
7519
|
-
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState3);
|
|
7520
|
-
next !== current.media && (Object.assign(current.media, next), persist());
|
|
7521
|
-
}
|
|
7522
|
-
function persist() {
|
|
7523
|
-
var group = {
|
|
7524
|
-
...state.group,
|
|
7525
|
-
[name]: current
|
|
7526
|
-
};
|
|
7527
|
-
setStateShallow({
|
|
7528
|
-
group
|
|
7529
|
-
});
|
|
7530
|
-
}
|
|
7531
|
-
});
|
|
7532
|
-
}
|
|
7275
|
+
module2.exports = __toCommonJS2(useTheme_exports);
|
|
7276
|
+
var import_react3 = require("react"), import_getThemeProxied = require_getThemeProxied_native(), import_useThemeState = require_useThemeState_native(), useTheme4 = function() {
|
|
7277
|
+
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, [theme] = useThemeWithState(props), res = theme;
|
|
7278
|
+
return res;
|
|
7279
|
+
}, useThemeWithState = function(props) {
|
|
7280
|
+
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = (0, import_react3.useRef)(null), themeState = (0, import_useThemeState.useThemeState)(props, isRoot, keys), themeProxied = (0, import_getThemeProxied.getThemeProxied)(props, themeState, keys);
|
|
7281
|
+
return [
|
|
7282
|
+
themeProxied,
|
|
7283
|
+
themeState
|
|
7284
|
+
];
|
|
7533
7285
|
};
|
|
7534
7286
|
}
|
|
7535
7287
|
});
|
|
@@ -7643,14 +7395,16 @@ var require_Theme_native = __commonJS({
|
|
|
7643
7395
|
}
|
|
7644
7396
|
});
|
|
7645
7397
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
7646
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")),
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7398
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(), empty = {
|
|
7399
|
+
className: "",
|
|
7400
|
+
style: {}
|
|
7401
|
+
}, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7402
|
+
if (props.disable) return props.children;
|
|
7403
|
+
var isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
|
|
7650
7404
|
return /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
7651
7405
|
"data-disable-theme": !0
|
|
7652
7406
|
});
|
|
7653
|
-
}) : children;
|
|
7407
|
+
}) : props.children;
|
|
7654
7408
|
if (ref) try {
|
|
7655
7409
|
import_react3.default.Children.only(finalChildren), finalChildren = /* @__PURE__ */ (0, import_react3.cloneElement)(finalChildren, {
|
|
7656
7410
|
ref
|
|
@@ -7664,60 +7418,55 @@ var require_Theme_native = __commonJS({
|
|
|
7664
7418
|
});
|
|
7665
7419
|
Theme2.avoidForwardRef = !0;
|
|
7666
7420
|
function getThemedChildren(themeState, children, props) {
|
|
7667
|
-
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, {
|
|
7668
|
-
if (!
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
var next = children;
|
|
7672
|
-
shallow && (next = import_react3.Children.toArray(children).map(function(child) {
|
|
7673
|
-
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
|
|
7674
|
-
name: themeManager.state.parentName,
|
|
7675
|
-
children: child.props.children
|
|
7676
|
-
})) : child;
|
|
7677
|
-
}));
|
|
7678
|
-
var elementsWithContext = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeManagerContext.ThemeManagerContext.Provider, {
|
|
7679
|
-
value: themeManager,
|
|
7680
|
-
children: next
|
|
7681
|
-
});
|
|
7682
|
-
return forceClassName === !1 ? elementsWithContext : import_constants4.isWeb ? wrapThemeElements({
|
|
7683
|
-
children: elementsWithContext,
|
|
7684
|
-
themeState,
|
|
7685
|
-
forceClassName,
|
|
7686
|
-
isRoot
|
|
7687
|
-
}) : elementsWithContext;
|
|
7688
|
-
}
|
|
7689
|
-
function wrapThemeElements(param) {
|
|
7690
|
-
var { children, themeState, forceClassName, isRoot } = param;
|
|
7691
|
-
if (isRoot && forceClassName === !1) return children;
|
|
7692
|
-
var inverse = themeState.inversed, requiresExtraWrapper = typeof inverse == "boolean" || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7693
|
-
className: `${className} _dsp_contents is_Theme`,
|
|
7694
|
-
style,
|
|
7421
|
+
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
|
|
7422
|
+
if (!shouldRenderChildrenWithTheme) return children;
|
|
7423
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useThemeState.ThemeStateContext.Provider, {
|
|
7424
|
+
value: themeState.id,
|
|
7695
7425
|
children
|
|
7696
7426
|
});
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7427
|
+
var { isInverse, name } = themeState, requiresExtraWrapper = isInverse || forceClassName;
|
|
7428
|
+
if (state.hasEverThemed || (state.hasEverThemed = !0), (requiresExtraWrapper || // if the theme is exactly dark or light, its likely to change between dark/light
|
|
7429
|
+
// and that would require wrapping which would re-parent, so to avoid re-parenting do this
|
|
7430
|
+
themeState.name === "dark" || themeState.name === "light") && (state.hasEverThemed = "wrapped"), shallow && themeState.parentId) {
|
|
7431
|
+
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
7432
|
+
if (!parentState) throw new Error("\u203C\uFE0F010");
|
|
7433
|
+
children = import_react3.Children.toArray(children).map(function(child) {
|
|
7434
|
+
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
|
|
7435
|
+
name: parentState.name,
|
|
7436
|
+
children: child.props.children
|
|
7437
|
+
})) : child;
|
|
7702
7438
|
});
|
|
7703
7439
|
}
|
|
7704
|
-
return
|
|
7440
|
+
if (forceClassName === !1) return children;
|
|
7441
|
+
if (import_constants4.isWeb) {
|
|
7442
|
+
var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
|
|
7443
|
+
if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7444
|
+
className: `${className} _dsp_contents is_Theme`,
|
|
7445
|
+
style,
|
|
7446
|
+
children
|
|
7447
|
+
}), state.hasEverThemed === "wrapped") {
|
|
7448
|
+
var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
|
|
7449
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7450
|
+
className: className1,
|
|
7451
|
+
children
|
|
7452
|
+
});
|
|
7453
|
+
}
|
|
7454
|
+
return children;
|
|
7455
|
+
}
|
|
7456
|
+
return children;
|
|
7705
7457
|
}
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
className: "",
|
|
7711
|
-
style: emptyObj
|
|
7712
|
-
};
|
|
7713
|
-
var themeColor = !((_themeState_state = themeState.state) === null || _themeState_state === void 0) && _themeState_state.theme && themeState.isNewTheme ? (0, import_createVariable.variableToString)(themeState.state.theme.color) : "", style = themeColor ? {
|
|
7458
|
+
function getThemeClassNameAndStyle(themeState, props) {
|
|
7459
|
+
var isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
7460
|
+
if (!themeState.isNew && !props.forceClassName) return empty;
|
|
7461
|
+
var themeColor = themeState != null && themeState.theme && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : "", style = themeColor ? {
|
|
7714
7462
|
color: themeColor
|
|
7715
|
-
} : void 0,
|
|
7716
|
-
return
|
|
7463
|
+
} : void 0, maxInverses = (0, import_config.getSetting)("maxDarkLightNesting") || 3, themeClassName = themeState.inverses >= maxInverses ? themeState.name : themeState.name.replace(schemePrefix, ""), className = `${isRoot ? "" : "t_sub_theme"} t_${themeClassName}`;
|
|
7464
|
+
return {
|
|
7717
7465
|
style,
|
|
7718
7466
|
className
|
|
7719
7467
|
};
|
|
7720
7468
|
}
|
|
7469
|
+
var schemePrefix = /^(dark|light)_/;
|
|
7721
7470
|
}
|
|
7722
7471
|
});
|
|
7723
7472
|
|
|
@@ -7932,7 +7681,21 @@ var require_useComponentState_native = __commonJS({
|
|
|
7932
7681
|
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
7933
7682
|
...state
|
|
7934
7683
|
}));
|
|
7935
|
-
var
|
|
7684
|
+
var groupName = props.group, setStateWrapper;
|
|
7685
|
+
if (groupName) {
|
|
7686
|
+
var groupContextState = groups.state;
|
|
7687
|
+
setStateWrapper = function(state2) {
|
|
7688
|
+
curStateRef.group.emit(groupName, {
|
|
7689
|
+
pseudo: state2
|
|
7690
|
+
});
|
|
7691
|
+
var next = {
|
|
7692
|
+
...groupContextState[groupName],
|
|
7693
|
+
...state2
|
|
7694
|
+
};
|
|
7695
|
+
groupContextState[groupName] = next;
|
|
7696
|
+
};
|
|
7697
|
+
}
|
|
7698
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug, setStateWrapper);
|
|
7936
7699
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7937
7700
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
7938
7701
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
@@ -7944,7 +7707,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
7944
7707
|
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
7945
7708
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0);
|
|
7946
7709
|
}
|
|
7947
|
-
var groupName = props.group;
|
|
7948
7710
|
if (groupName && !curStateRef.group) {
|
|
7949
7711
|
var listeners = /* @__PURE__ */ new Set();
|
|
7950
7712
|
curStateRef.group = {
|
|
@@ -7961,19 +7723,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
7961
7723
|
}
|
|
7962
7724
|
};
|
|
7963
7725
|
}
|
|
7964
|
-
if (groupName) {
|
|
7965
|
-
var groupContextState = groups.state, og = setStateShallow;
|
|
7966
|
-
setStateShallow = function(state2) {
|
|
7967
|
-
og(state2), curStateRef.group.emit(groupName, {
|
|
7968
|
-
pseudo: state2
|
|
7969
|
-
});
|
|
7970
|
-
var next = {
|
|
7971
|
-
...groupContextState[groupName],
|
|
7972
|
-
...state2
|
|
7973
|
-
};
|
|
7974
|
-
groupContextState[groupName] = next;
|
|
7975
|
-
};
|
|
7976
|
-
}
|
|
7977
7726
|
return {
|
|
7978
7727
|
curStateRef,
|
|
7979
7728
|
disabled,
|
|
@@ -8222,7 +7971,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8222
7971
|
}
|
|
8223
7972
|
});
|
|
8224
7973
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8225
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native12(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(),
|
|
7974
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native12(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), componentSetStates = /* @__PURE__ */ new Set();
|
|
8226
7975
|
typeof document < "u" && (cancelTouches = function() {
|
|
8227
7976
|
componentSetStates.forEach(function(setState) {
|
|
8228
7977
|
return setState(function(prev) {
|
|
@@ -8256,7 +8005,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8256
8005
|
}
|
|
8257
8006
|
});
|
|
8258
8007
|
var { Component, isText, isZStack, isHOC } = staticConfig, component = /* @__PURE__ */ import_react3.default.forwardRef(function(propsIn, forwardedRef) {
|
|
8259
|
-
var
|
|
8008
|
+
var _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = "";
|
|
8260
8009
|
if (!hasSetupBaseViews) {
|
|
8261
8010
|
var _hooks_getBaseViews;
|
|
8262
8011
|
hasSetupBaseViews = !0;
|
|
@@ -8278,15 +8027,15 @@ var require_createComponent_native = __commonJS({
|
|
|
8278
8027
|
var finalVal = propVal ?? (defaultProps == null ? void 0 : defaultProps[key]);
|
|
8279
8028
|
finalVal !== void 0 && (overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = finalVal);
|
|
8280
8029
|
}
|
|
8030
|
+
var debugProp = propsIn.debug;
|
|
8031
|
+
if (0)
|
|
8032
|
+
var timer;
|
|
8281
8033
|
var curDefaultProps = styledContextProps ? {
|
|
8282
8034
|
...defaultProps,
|
|
8283
8035
|
...styledContextProps
|
|
8284
8036
|
} : defaultProps, props = propsIn;
|
|
8285
8037
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
8286
|
-
var
|
|
8287
|
-
if (0)
|
|
8288
|
-
var timer;
|
|
8289
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
8038
|
+
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
8290
8039
|
animationDriver && isAnimated && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
8291
8040
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
8292
8041
|
props.themeShallow && (curStateRef.themeShallow = !0);
|
|
@@ -8302,7 +8051,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8302
8051
|
var name, type, dataIs, banner;
|
|
8303
8052
|
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), !import_constants4.isServer) var ch, childLog;
|
|
8304
8053
|
}
|
|
8305
|
-
var [
|
|
8054
|
+
var [theme, themeState] = (0, import_useTheme.useThemeWithState)(themeStateProps);
|
|
8306
8055
|
elementType = Component || elementType;
|
|
8307
8056
|
var isStringElement = typeof elementType == "string", mediaState3 = (0, import_useMedia.useMedia)(componentContext, debugProp);
|
|
8308
8057
|
(0, import_createVariable.setDidGetVariableValue)(!1);
|
|
@@ -8317,7 +8066,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8317
8066
|
isAnimated,
|
|
8318
8067
|
willBeAnimated,
|
|
8319
8068
|
styledContextProps
|
|
8320
|
-
}, themeName = (themeState == null
|
|
8069
|
+
}, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, debugProp);
|
|
8321
8070
|
if (props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
|
|
8322
8071
|
var _splitStyles;
|
|
8323
8072
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
@@ -8356,14 +8105,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8356
8105
|
(supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
|
|
8357
8106
|
);
|
|
8358
8107
|
if (shouldUseAnimation) {
|
|
8359
|
-
var
|
|
8108
|
+
var animations = useAnimations({
|
|
8360
8109
|
props: propsWithAnimation,
|
|
8361
8110
|
// if hydrating, send empty style
|
|
8362
8111
|
style: splitStylesStyle || {},
|
|
8363
8112
|
presence,
|
|
8364
8113
|
componentState: state,
|
|
8365
8114
|
styleProps,
|
|
8366
|
-
theme
|
|
8115
|
+
theme,
|
|
8367
8116
|
pseudos: pseudos || null,
|
|
8368
8117
|
staticConfig,
|
|
8369
8118
|
stateRef
|
|
@@ -8533,7 +8282,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8533
8282
|
}, [
|
|
8534
8283
|
groupName
|
|
8535
8284
|
]);
|
|
8536
|
-
if ((groupName
|
|
8285
|
+
if ((groupName || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
8537
8286
|
...componentContext,
|
|
8538
8287
|
groups: subGroupContext,
|
|
8539
8288
|
setParentFocusState: setStateShallow,
|
|
@@ -10190,7 +9939,7 @@ var require_proxyThemeVariables_native = __commonJS({
|
|
|
10190
9939
|
var require_useThemeName_native = __commonJS({
|
|
10191
9940
|
"../../core/web/dist/cjs/hooks/useThemeName.native.js"(exports2, module2) {
|
|
10192
9941
|
"use strict";
|
|
10193
|
-
var
|
|
9942
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
10194
9943
|
for (var name in all) __defProp2(target, name, {
|
|
10195
9944
|
get: all[name],
|
|
10196
9945
|
enumerable: !0
|
|
@@ -10218,18 +9967,6 @@ var require_useThemeName_native = __commonJS({
|
|
|
10218
9967
|
}
|
|
10219
9968
|
}
|
|
10220
9969
|
return to;
|
|
10221
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
10222
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
10223
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
10224
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
10225
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
10226
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
10227
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
10228
|
-
value: mod,
|
|
10229
|
-
enumerable: !0
|
|
10230
|
-
}) : target,
|
|
10231
|
-
mod
|
|
10232
|
-
);
|
|
10233
9970
|
}, __toCommonJS2 = function(mod) {
|
|
10234
9971
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
10235
9972
|
value: !0
|
|
@@ -10241,17 +9978,20 @@ var require_useThemeName_native = __commonJS({
|
|
|
10241
9978
|
}
|
|
10242
9979
|
});
|
|
10243
9980
|
module2.exports = __toCommonJS2(useThemeName_exports);
|
|
10244
|
-
var
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
9981
|
+
var import_useThemeState = require_useThemeState_native(), forceUpdateState = {
|
|
9982
|
+
forceClassName: !0,
|
|
9983
|
+
deopt: !0,
|
|
9984
|
+
needsUpdate: function() {
|
|
9985
|
+
return !0;
|
|
9986
|
+
}
|
|
9987
|
+
}, forceKeys = {
|
|
9988
|
+
current: /* @__PURE__ */ new Set([
|
|
9989
|
+
""
|
|
9990
|
+
])
|
|
9991
|
+
};
|
|
9992
|
+
function useThemeName2() {
|
|
9993
|
+
var _useThemeState;
|
|
9994
|
+
return ((_useThemeState = (0, import_useThemeState.useThemeState)(forceUpdateState, !1, forceKeys)) === null || _useThemeState === void 0 ? void 0 : _useThemeState.name) || "";
|
|
10255
9995
|
}
|
|
10256
9996
|
}
|
|
10257
9997
|
});
|
|
@@ -10501,14 +10241,14 @@ var require_useProps_native = __commonJS({
|
|
|
10501
10241
|
return usePropsAndStyle2(props, opts)[1] || {};
|
|
10502
10242
|
}
|
|
10503
10243
|
function usePropsAndStyle2(props, opts) {
|
|
10504
|
-
var _opts_forComponent,
|
|
10244
|
+
var _opts_forComponent, _opts_forComponent_staticConfig, staticConfig = (_opts_forComponent_staticConfig = opts == null || (_opts_forComponent = opts.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : import_Stack.Stack.staticConfig, [theme, themeState] = (0, import_useTheme.useThemeWithState)({
|
|
10505
10245
|
componentName: staticConfig.componentName,
|
|
10506
10246
|
name: "theme" in props ? props.theme : void 0,
|
|
10507
10247
|
inverse: "themeInverse" in props ? props.themeInverse : void 0
|
|
10508
10248
|
}), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), mediaStateNow = opts != null && opts.noMedia ? (
|
|
10509
10249
|
// not safe to use mediaState but really marginal to hit this
|
|
10510
10250
|
import_useMedia.mediaState
|
|
10511
|
-
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (
|
|
10251
|
+
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
10512
10252
|
isAnimated: !1,
|
|
10513
10253
|
mediaState: mediaStateNow,
|
|
10514
10254
|
noSkip: !0,
|
|
@@ -10753,7 +10493,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
10753
10493
|
// if root class disabled, force class here
|
|
10754
10494
|
forceClassName: !disableRootThemeClass && !themeClassNameOnRoot,
|
|
10755
10495
|
// @ts-expect-error
|
|
10756
|
-
_isRoot:
|
|
10496
|
+
_isRoot: import_react3.useId,
|
|
10757
10497
|
children: props.children
|
|
10758
10498
|
});
|
|
10759
10499
|
};
|
|
@@ -11045,6 +10785,9 @@ var require_index_native14 = __commonJS({
|
|
|
11045
10785
|
configureMedia: function() {
|
|
11046
10786
|
return import_useMedia.configureMedia;
|
|
11047
10787
|
},
|
|
10788
|
+
forceUpdateThemes: function() {
|
|
10789
|
+
return import_useThemeState.forceUpdateThemes;
|
|
10790
|
+
},
|
|
11048
10791
|
getConfig: function() {
|
|
11049
10792
|
return import_config.getConfig;
|
|
11050
10793
|
},
|
|
@@ -11140,6 +10883,7 @@ var require_index_native14 = __commonJS({
|
|
|
11140
10883
|
__reExport2(index_exports2, require_wrapStyleTags_native(), module2.exports);
|
|
11141
10884
|
var import_useMedia = require_useMedia_native();
|
|
11142
10885
|
__reExport2(index_exports2, require_useTheme_native(), module2.exports);
|
|
10886
|
+
var import_useThemeState = require_useThemeState_native();
|
|
11143
10887
|
__reExport2(index_exports2, require_useThemeName_native(), module2.exports);
|
|
11144
10888
|
__reExport2(index_exports2, require_useConfiguration_native(), module2.exports);
|
|
11145
10889
|
__reExport2(index_exports2, require_useIsTouchDevice_native(), module2.exports);
|
|
@@ -29088,8 +28832,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
29088
28832
|
...props,
|
|
29089
28833
|
...switchProps,
|
|
29090
28834
|
...!disableActiveTheme && !props.unstyled && {
|
|
29091
|
-
theme: checked ? "active" : null
|
|
29092
|
-
themeShallow: !0
|
|
28835
|
+
theme: checked ? "active" : null
|
|
29093
28836
|
},
|
|
29094
28837
|
// expected variants
|
|
29095
28838
|
checked,
|
|
@@ -29544,7 +29287,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
29544
29287
|
}
|
|
29545
29288
|
});
|
|
29546
29289
|
module2.exports = __toCommonJS2(mutateTheme_exports);
|
|
29547
|
-
var
|
|
29290
|
+
var import_constants4 = require_index_native6(), import_start_transition = require_index_native9(), import_web = require_index_native14();
|
|
29548
29291
|
function mutateThemes2(param) {
|
|
29549
29292
|
var { themes, batch, insertCSS = !0, ...props } = param, allThemesProxied = {}, allThemesRaw = {}, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
29550
29293
|
try {
|
|
@@ -29573,7 +29316,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
29573
29316
|
return (0, import_start_transition.startTransition)(function() {
|
|
29574
29317
|
for (var themeName in allThemesProxied) {
|
|
29575
29318
|
var theme2 = allThemesProxied[themeName];
|
|
29576
|
-
updateThemeConfig(themeName, theme2),
|
|
29319
|
+
updateThemeConfig(themeName, theme2), updateThemeStates(themeName, theme2);
|
|
29577
29320
|
}
|
|
29578
29321
|
}), {
|
|
29579
29322
|
themes: allThemesProxied,
|
|
@@ -29598,20 +29341,15 @@ var require_mutateTheme_native = __commonJS({
|
|
|
29598
29341
|
};
|
|
29599
29342
|
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
29600
29343
|
[themeName]: theme1
|
|
29601
|
-
})), updateThemeConfig(themeName, themeProxied),
|
|
29344
|
+
})), updateThemeConfig(themeName, themeProxied), updateThemeStates(themeName, themeProxied)), response;
|
|
29602
29345
|
}
|
|
29603
29346
|
}
|
|
29604
29347
|
function updateThemeConfig(themeName, theme) {
|
|
29605
29348
|
var config = (0, import_web.getConfig)();
|
|
29606
29349
|
config.themes[themeName] = theme, (0, import_web.updateConfig)("themes", config.themes);
|
|
29607
29350
|
}
|
|
29608
|
-
function
|
|
29609
|
-
import_web.
|
|
29610
|
-
manager.state.name === themeName && manager.updateStateFromProps({
|
|
29611
|
-
name: themeName,
|
|
29612
|
-
forceTheme: theme
|
|
29613
|
-
}, !0);
|
|
29614
|
-
});
|
|
29351
|
+
function updateThemeStates(themeName, theme) {
|
|
29352
|
+
(0, import_web.forceUpdateThemes)();
|
|
29615
29353
|
}
|
|
29616
29354
|
function insertThemeCSS(themes) {
|
|
29617
29355
|
var batch = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|