fix #139: use dvh/dvw css units for the top viewport size

This commit is contained in:
or-else
2026-02-13 15:38:45 +03:00
parent e097f134b7
commit e9d6c2e5bf
13 changed files with 912 additions and 72 deletions
+2
View File
@@ -299,6 +299,8 @@
html, body {
height: 100%;
width: 100%;
height: 100dvh;
width: 100dvw;
font-size: 10pt; /* 13.33 px/rem */
color: var(--clr-text-primary);
overflow: hidden;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+896 -42
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -384,15 +384,6 @@ function formatNumber(input, format, options, metadata) {
options = DEFAULT_OPTIONS;
}
metadata = new _metadata_js__WEBPACK_IMPORTED_MODULE_2__["default"](metadata);
// Normally, the `input` object is supposed to be a `PhoneNumber` class instance.
// Also, according to the `PhoneNumber` class source code, `country` can't be "001".
// It means that normally `input.country` or `input.countryCallingCode` is supposed
// to be present because either of the two is always required to exist in a `PhoneNumber` instance.
// This means that realistically, it's gonna step into either the first `if`
// or the following `else if`, and normally it won't even reach the legacy-compatibility
// `else return input.phone || ''` part.
// So normally, it won't ever return an empty string here.
if (input.country && input.country !== '001') {
// Validate `input.country`.
if (!metadata.hasCountry(input.country)) {
@@ -410,10 +401,8 @@ function formatNumber(input, format, options, metadata) {
var number;
switch (format) {
case 'NATIONAL':
// Normally, the `input` object is supposed to be a `PhoneNumber` class instance,
// and a `PhoneNumber` class instance is always required to have a `nationalNumber`.
// This means that the `if (!nationalNumber)` below is just for legacy-compatibility
// and it normally can't really happen, so normally it won't ever return an empty string here.
// Legacy argument support.
// (`{ country: ..., phone: '' }`)
if (!nationalNumber) {
return '';
}
@@ -442,16 +431,11 @@ function formatNumber(input, format, options, metadata) {
// Not saying that this IDD formatter replicates it 1:1, but it seems to work.
// Who would even need to format phone numbers in IDD format anyway?
case 'IDD':
// If the required `fromCountry` parameter is not passed, it will return `undefined`.
if (!options.fromCountry) {
return;
// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')
}
var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
// If the country of the phone number doesn't support IDD calling, it will return `undefined`.
if (!formattedNumber) {
return;
}
return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
default:
throw new Error("Unknown \"format\" argument passed to \"formatNumber()\": \"".concat(format, "\""));
@@ -1827,8 +1811,8 @@ __webpack_require__.r(__webpack_exports__);
*/
var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
// If the `country` supports IDD calling, it returns a preferred IDD prefix.
// If the `country` doesn't support IDD calling, it returns `undefined`.
// For regions that have multiple IDD prefixes
// a preferred IDD prefix is returned.
function getIddPrefix(country, callingCode, metadata) {
var countryMetadata = new _metadata_js__WEBPACK_IMPORTED_MODULE_0__["default"](metadata);
countryMetadata.selectNumberingPlan(country, callingCode);
File diff suppressed because one or more lines are too long