genshin-interface 4.4.0 → 4.5.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/README.md +17 -15
- package/dist/{constants-DeI20p3G.d.ts → constants-CLLAons1.d.ts} +4 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +4 -1
- package/dist/index.d.ts +1096 -302
- package/dist/index.js +4599 -2265
- package/dist/style.css +3920 -3686
- package/dist/styles/artifactStats.css +21 -0
- package/dist/styles/creamDiscPress.css +8 -0
- package/dist/styles/creamPillButton.css +39 -0
- package/dist/styles/creamPillLit.css +18 -0
- package/dist/styles/fillTint.css +21 -0
- package/dist/styles/footDisc.css +9 -0
- package/dist/styles/forgeDetail.css +30 -0
- package/dist/styles/gradientTint.css +17 -0
- package/dist/styles/ringButton.css +27 -0
- package/dist/styles/rowTint.css +33 -0
- package/dist/styles/shopScreen.css +31 -0
- package/dist/styles/sparkle.css +6 -0
- package/dist/styles/translucentButton.css +9 -0
- package/dist/styles/visuallyHidden.css +11 -0
- package/package.json +6 -6
- package/dist/styles/blessingWorship.css +0 -53
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
[![NPM downloads][badge-npm-downloads]][url-npm]
|
|
6
6
|
[![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
|
|
7
7
|
|
|
8
|
-
Genshin Impact's interface as a fan recreation
|
|
8
|
+
Genshin Impact's interface as a fan recreation. It provides the game's own screen units, face and pointer, and its buttons, dividers, bars and notices, as presentational Vue components.
|
|
9
9
|
|
|
10
|
-
It is an unofficial, non-commercial fan work
|
|
10
|
+
It is an unofficial, non-commercial fan work. It is not affiliated with HoYoverse. It ships no image or font from the game. Each glyph is a vector path, traced from the game's own. The face is the open face nearest to the game's.
|
|
11
11
|
|
|
12
12
|
Design notes live in [the specs](https://github.com/Esposter/Esposter/tree/main/openspec/specs/genshin/interface-library).
|
|
13
13
|
|
|
@@ -25,7 +25,9 @@ Design notes live in [the specs](https://github.com/Esposter/Esposter/tree/main/
|
|
|
25
25
|
pnpm i genshin-interface vue
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Draw
|
|
28
|
+
1. Draw each screen inside `GameScreen`.
|
|
29
|
+
2. Lay out each screen in `calc(var(--unit) * n)`.
|
|
30
|
+
3. Import the styles once, as shown:
|
|
29
31
|
|
|
30
32
|
```vue
|
|
31
33
|
<script setup lang="ts">
|
|
@@ -42,18 +44,18 @@ import "genshin-interface/style.css";
|
|
|
42
44
|
|
|
43
45
|
## <a name="key-exports">🧩 Key Exports</a>
|
|
44
46
|
|
|
45
|
-
| Export | Kind | Purpose
|
|
46
|
-
| ------------------- | --------- |
|
|
47
|
-
| `GameScreen` | component | The root
|
|
48
|
-
| `InterfaceClip` | interface | One of the game
|
|
49
|
-
| `InterfaceIcon` | enum | The glyphs the round buttons
|
|
50
|
-
| `LoadingSpinner` | component | The game's wait mark,
|
|
51
|
-
| `OrnamentDivider` | component | The game's divider: a hairline with diamonds at its ends, and
|
|
52
|
-
| `playInterfaceClip` | function | Plays a clip on a screen with Web Animations and returns the animations to await or seek
|
|
53
|
-
| `ProgressBar` | component | The game's progress bar, filled from 0 to 1
|
|
54
|
-
| `PromptBand` | component | The band a prompt
|
|
55
|
-
| `RoundButton` | component | The game's round button with a glyph
|
|
56
|
-
| `ToastNotice` | component | The game's notice card, dropped at the top of a screen
|
|
47
|
+
| Export | Kind | Purpose |
|
|
48
|
+
| ------------------- | --------- | --------------------------------------------------------------------------------------------- |
|
|
49
|
+
| `GameScreen` | component | The root of every game screen, with its 1920 by 1080 unit, face and pointer |
|
|
50
|
+
| `InterfaceClip` | interface | One interface animation clip of the game, with a span and a track for each property it moves |
|
|
51
|
+
| `InterfaceIcon` | enum | The glyphs that the round buttons show |
|
|
52
|
+
| `LoadingSpinner` | component | The game's wait mark, with a label for a screen reader |
|
|
53
|
+
| `OrnamentDivider` | component | The game's divider: a hairline with diamonds at its ends, and a middle ornament unless hidden |
|
|
54
|
+
| `playInterfaceClip` | function | Plays a clip on a screen with Web Animations, and returns the animations to await or seek |
|
|
55
|
+
| `ProgressBar` | component | The game's progress bar, filled from 0 to 1 |
|
|
56
|
+
| `PromptBand` | component | The band that holds a prompt, across the foot of a screen |
|
|
57
|
+
| `RoundButton` | component | The game's round button, with a glyph and a label for a screen reader |
|
|
58
|
+
| `ToastNotice` | component | The game's notice card, dropped at the top of a screen |
|
|
57
59
|
|
|
58
60
|
## <a name="license">⚖️ License</a>
|
|
59
61
|
|
|
@@ -40,6 +40,8 @@ declare const CONSTELLATION_NODE_PLACES: readonly {
|
|
|
40
40
|
}[];
|
|
41
41
|
declare const INTERACTION_HOVER_MS = 50;
|
|
42
42
|
declare const INTERACTION_REST_MS = 100;
|
|
43
|
+
declare const INTERACTION_HOVER_DURATION = "50ms";
|
|
44
|
+
declare const INTERACTION_REST_DURATION = "100ms";
|
|
43
45
|
declare const INTERACTION_PILL_REST_MS = 200;
|
|
44
46
|
declare const INTERACTION_PRESS_MS = 167;
|
|
45
47
|
declare const GAME_SMOOTHSTEP_EASING = "cubic-bezier(0.333, 0, 0.667, 1)";
|
|
@@ -48,6 +50,7 @@ declare const GAME_ROW_PRESS = "rgb(255 255 255 / 0.3)";
|
|
|
48
50
|
declare const GAME_REPLY_REST = "rgb(0 0 0 / 0.26)";
|
|
49
51
|
declare const GAME_REPLY_HOVER = "rgb(255 255 255 / 0.85)";
|
|
50
52
|
declare const GAME_REPLY_HOVER_INK = "#3b4255";
|
|
53
|
+
declare const DIALOGUE_REPLY_REST = "rgb(32 40 57 / 0.72)";
|
|
51
54
|
declare const GAME_LIT_GOLD = "#ffeab4";
|
|
52
55
|
declare const GAME_LIT_GOLD_LABEL = "#d6cdb8";
|
|
53
56
|
declare const GAME_DIALOGUE_GOLD = "#ffc700";
|
|
@@ -59,4 +62,4 @@ declare const MISMATCH_RATIO_BAR = 0.01;
|
|
|
59
62
|
declare const MISMATCH_MESSAGE = "Screenshot does not match the stored reference.";
|
|
60
63
|
declare const MISMATCH_DETAIL_REGEX: RegExp;
|
|
61
64
|
declare const MISSING_IMAGE_MESSAGE = "No existing reference screenshot found";
|
|
62
|
-
export {
|
|
65
|
+
export { SETTINGS_RING_RADIUS as $, GAME_ROW_HOVER as A, INTERACTION_REST_DURATION as B, GAME_GOLD as C, GAME_REPLY_HOVER as D, GAME_LIT_GOLD_LABEL as E, INTERACTION_HOVER_DURATION as F, MISSING_IMAGE_MESSAGE as G, MISMATCH_DETAIL_REGEX as H, INTERACTION_HOVER_MS as I, ORNAMENT_MIDDLE_PATH as J, MOBILE_INTERFACE_SCALE as K, INTERACTION_KEY_LABEL as L, GAME_SMOOTHSTEP_EASING as M, GAME_UNIT as N, GAME_REPLY_HOVER_INK as O, GAME_WHITE as P, SETTINGS_RING_CENTRE as Q, INTERACTION_PILL_REST_MS as R, GAME_FONT_FAMILY as S, GAME_LIT_GOLD as T, MISMATCH_MESSAGE as U, INTERACTION_REST_MS as V, MISMATCH_RATIO_BAR as W, SERVER_MARK_DIAMOND_PATH as X, ROLE_FLOURISH_PATH as Y, SERVER_MARK_TICK_PATH as Z, GAME_CANVAS_RECT as _, CONSTELLATION_NODE_PLACES as a, GAME_CURSOR as b, COOKING_ARC_RADIUS_X as c, FIXTURE_IMAGE_NAME as d, SETTINGS_RING_WIDTH as et, FIXTURE_VARIANT_SEPARATOR as f, GAME_CANVAS_INSET as g, GAME_BACKDROP_WASH as h, CHECK_MARK_PATH as i, GAME_ROW_PRESS as j, GAME_REPLY_REST as k, COOKING_ZONE_RADIUS_Y as l, GAME_BACKDROP_KEEP as m, ASCENSION_PHASE_COUNT as n, COOKING_ARC_CENTRE_X as o, GAME_BACKDROP_BLUR as p, ORNAMENT_END_PATH as q, BACK_ARROW_PATH as r, COOKING_ARC_CENTRE_Y as s, APPROVE_ENVIRONMENT_VARIABLE as t, CanvasRect as tt, DIALOGUE_REPLY_REST as u, GAME_CANVAS_UNIT as v, GAME_INK as w, GAME_DIALOGUE_GOLD as x, GAME_CREAM as y, INTERACTION_PRESS_MS as z };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|
|
1
|
+
import { $ as SETTINGS_RING_RADIUS, A as GAME_ROW_HOVER, B as INTERACTION_REST_DURATION, C as GAME_GOLD, D as GAME_REPLY_HOVER, E as GAME_LIT_GOLD_LABEL, F as INTERACTION_HOVER_DURATION, G as MISSING_IMAGE_MESSAGE, H as MISMATCH_DETAIL_REGEX, I as INTERACTION_HOVER_MS, J as ORNAMENT_MIDDLE_PATH, K as MOBILE_INTERFACE_SCALE, L as INTERACTION_KEY_LABEL, M as GAME_SMOOTHSTEP_EASING, N as GAME_UNIT, O as GAME_REPLY_HOVER_INK, P as GAME_WHITE, Q as SETTINGS_RING_CENTRE, R as INTERACTION_PILL_REST_MS, S as GAME_FONT_FAMILY, T as GAME_LIT_GOLD, U as MISMATCH_MESSAGE, V as INTERACTION_REST_MS, W as MISMATCH_RATIO_BAR, X as SERVER_MARK_DIAMOND_PATH, Y as ROLE_FLOURISH_PATH, Z as SERVER_MARK_TICK_PATH, _ as GAME_CANVAS_RECT, a as CONSTELLATION_NODE_PLACES, b as GAME_CURSOR, c as COOKING_ARC_RADIUS_X, d as FIXTURE_IMAGE_NAME, et as SETTINGS_RING_WIDTH, f as FIXTURE_VARIANT_SEPARATOR, g as GAME_CANVAS_INSET, h as GAME_BACKDROP_WASH, i as CHECK_MARK_PATH, j as GAME_ROW_PRESS, k as GAME_REPLY_REST, l as COOKING_ZONE_RADIUS_Y, m as GAME_BACKDROP_KEEP, n as ASCENSION_PHASE_COUNT, o as COOKING_ARC_CENTRE_X, p as GAME_BACKDROP_BLUR, q as ORNAMENT_END_PATH, r as BACK_ARROW_PATH, s as COOKING_ARC_CENTRE_Y, t as APPROVE_ENVIRONMENT_VARIABLE, u as DIALOGUE_REPLY_REST, v as GAME_CANVAS_UNIT, w as GAME_INK, x as GAME_DIALOGUE_GOLD, y as GAME_CREAM, z as INTERACTION_PRESS_MS } from "./constants-CLLAons1.js";
|
|
2
|
+
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, DIALOGUE_REPLY_REST, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_DURATION, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_DURATION, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|
package/dist/constants.js
CHANGED
|
@@ -63,6 +63,8 @@ const CONSTELLATION_NODE_PLACES = [
|
|
|
63
63
|
];
|
|
64
64
|
const INTERACTION_HOVER_MS = 50;
|
|
65
65
|
const INTERACTION_REST_MS = 100;
|
|
66
|
+
const INTERACTION_HOVER_DURATION = `50ms`;
|
|
67
|
+
const INTERACTION_REST_DURATION = `100ms`;
|
|
66
68
|
const INTERACTION_PILL_REST_MS = 200;
|
|
67
69
|
const INTERACTION_PRESS_MS = 167;
|
|
68
70
|
const GAME_SMOOTHSTEP_EASING = "cubic-bezier(0.333, 0, 0.667, 1)";
|
|
@@ -71,6 +73,7 @@ const GAME_ROW_PRESS = "rgb(255 255 255 / 0.3)";
|
|
|
71
73
|
const GAME_REPLY_REST = "rgb(0 0 0 / 0.26)";
|
|
72
74
|
const GAME_REPLY_HOVER = "rgb(255 255 255 / 0.85)";
|
|
73
75
|
const GAME_REPLY_HOVER_INK = "#3b4255";
|
|
76
|
+
const DIALOGUE_REPLY_REST = "rgb(32 40 57 / 0.72)";
|
|
74
77
|
const GAME_LIT_GOLD = "#ffeab4";
|
|
75
78
|
const GAME_LIT_GOLD_LABEL = "#d6cdb8";
|
|
76
79
|
const GAME_DIALOGUE_GOLD = "#ffc700";
|
|
@@ -82,4 +85,4 @@ const MISMATCH_RATIO_BAR = .01;
|
|
|
82
85
|
const MISMATCH_MESSAGE = "Screenshot does not match the stored reference.";
|
|
83
86
|
const MISMATCH_DETAIL_REGEX = /(?<pixels>\d+) pixels \(ratio (?<ratio>[\d.]+)\) differ/u;
|
|
84
87
|
const MISSING_IMAGE_MESSAGE = "No existing reference screenshot found";
|
|
85
|
-
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|
|
88
|
+
export { APPROVE_ENVIRONMENT_VARIABLE, ASCENSION_PHASE_COUNT, BACK_ARROW_PATH, CHECK_MARK_PATH, CONSTELLATION_NODE_PLACES, COOKING_ARC_CENTRE_X, COOKING_ARC_CENTRE_Y, COOKING_ARC_RADIUS_X, COOKING_ZONE_RADIUS_Y, DIALOGUE_REPLY_REST, FIXTURE_IMAGE_NAME, FIXTURE_VARIANT_SEPARATOR, GAME_BACKDROP_BLUR, GAME_BACKDROP_KEEP, GAME_BACKDROP_WASH, GAME_CANVAS_INSET, GAME_CANVAS_RECT, GAME_CANVAS_UNIT, GAME_CREAM, GAME_CURSOR, GAME_DIALOGUE_GOLD, GAME_FONT_FAMILY, GAME_GOLD, GAME_INK, GAME_LIT_GOLD, GAME_LIT_GOLD_LABEL, GAME_REPLY_HOVER, GAME_REPLY_HOVER_INK, GAME_REPLY_REST, GAME_ROW_HOVER, GAME_ROW_PRESS, GAME_SMOOTHSTEP_EASING, GAME_UNIT, GAME_WHITE, INTERACTION_HOVER_DURATION, INTERACTION_HOVER_MS, INTERACTION_KEY_LABEL, INTERACTION_PILL_REST_MS, INTERACTION_PRESS_MS, INTERACTION_REST_DURATION, INTERACTION_REST_MS, MISMATCH_DETAIL_REGEX, MISMATCH_MESSAGE, MISMATCH_RATIO_BAR, MISSING_IMAGE_MESSAGE, MOBILE_INTERFACE_SCALE, ORNAMENT_END_PATH, ORNAMENT_MIDDLE_PATH, ROLE_FLOURISH_PATH, SERVER_MARK_DIAMOND_PATH, SERVER_MARK_TICK_PATH, SETTINGS_RING_CENTRE, SETTINGS_RING_RADIUS, SETTINGS_RING_WIDTH };
|