@celestia-island/hikari 0.55.217 → 0.55.218
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/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/runtime/credentialAutofill.ts +2 -2
- package/src/runtime/env.ts +4 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -492,7 +492,7 @@ export { bytesToBase64, utf8ToBase64, base64ToBytes, blobToBase64 } from "./util
|
|
|
492
492
|
export { THEME_MODE_STORAGE_KEY } from "./theme/useTheme";
|
|
493
493
|
export { HK_AUTH_CARD_MAX_WIDTH, HK_AUTH_CARD_MAX_WIDTH_VAR } from "./theme/authCard";
|
|
494
494
|
|
|
495
|
-
export {
|
|
495
|
+
export { isNative } from "./runtime/env";
|
|
496
496
|
|
|
497
497
|
export { deepMerge, isPlainObject, getPath, setPath, delPath } from "./utils/objectPath";
|
|
498
498
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isNative } from "./env";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Credential-field autocomplete policy (user direction 2026-09-14): no
|
|
@@ -31,7 +31,7 @@ export function credentialAutocomplete(
|
|
|
31
31
|
kind: "username" | "password",
|
|
32
32
|
browserDefault: string,
|
|
33
33
|
): string {
|
|
34
|
-
if (
|
|
34
|
+
if (isNative()) {
|
|
35
35
|
return kind === "password" ? "new-password" : "off";
|
|
36
36
|
}
|
|
37
37
|
return browserDefault;
|
package/src/runtime/env.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/** True when running inside a Tauri
|
|
2
|
-
|
|
1
|
+
/** True when running inside the native shell's webview (a Tauri window
|
|
2
|
+
* today; the detection reads the Tauri runtime marker, but the name is
|
|
3
|
+
* shell-generic — `isNative`, 2026-10-28 user direction). */
|
|
4
|
+
export function isNative(): boolean {
|
|
3
5
|
return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
|
|
4
6
|
}
|