genshin-interface 4.3.3 → 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.
@@ -0,0 +1,21 @@
1
+ /* The attribute rows the panel's totals and a picked piece's stats draw alike. Each list sets its own top */
2
+ .totals,
3
+ .stats {
4
+ position: absolute;
5
+ right: 0;
6
+ left: 0;
7
+ margin: 0;
8
+ padding: 0;
9
+ list-style: none;
10
+ }
11
+
12
+ .total,
13
+ .stat {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ height: calc(var(--unit) * 35.6);
18
+ padding: 0 calc(var(--unit) * 2) 0 calc(var(--unit) * 28);
19
+ font-size: calc(var(--unit) * 26);
20
+ font-weight: 600;
21
+ }
@@ -0,0 +1,8 @@
1
+ /* A cream disc's press, at once: the disc tinted slate with its mark cream. Provisional: no reference frame shows a close
2
+ or a disc under the pointer, so the press is the cream pill's own. The cream is `GAME_CREAM`, restated because this
3
+ sheet is plain CSS. It is worn by the close and the disc button, which pull `ringButton.css` for the rest */
4
+ .cream-disc-press:enabled:is(:active, [data-pressed], [data-interaction-state="Pressed"] *) {
5
+ --state-duration: 0s;
6
+ background-color: rgb(73 83 103 / 0.5);
7
+ color: #ece5d8;
8
+ }
@@ -0,0 +1,9 @@
1
+ /* The cream pill a label is set in: the game's cream at nine tenths and its ink words, with the box and place
2
+ left to the label that wears it */
3
+ .cream-pill {
4
+ border-radius: calc(var(--unit) * 25);
5
+ background: rgb(236 229 216 / 0.9);
6
+ color: #3b4255;
7
+ font-size: calc(var(--unit) * 26);
8
+ font-weight: 600;
9
+ }
@@ -0,0 +1,39 @@
1
+ /* A cream pill button, lit as the game's cream pill is without its bevel, which these pills never drew: a white ring
2
+ 1 unit outside its edge and 2 within on a pointer's hover (only a pointer's, so a tap leaves none), and on focus or
3
+ the forced hover, holding its size. Pressed, its cream gives way to the slate and gold light the pill takes at once.
4
+ Provisional past the ring, as no recording shows these pills under the pointer */
5
+ .cream-pill-button {
6
+ --cream-pill-button-lit-shadow:
7
+ 0 0 0 calc(var(--unit) * 1) #fff, inset 0 0 0 calc(var(--unit) * 2) #fff,
8
+ 0 0 calc(var(--unit) * 7) rgb(255 255 255 / 0.125);
9
+ }
10
+
11
+ @media (hover: hover) {
12
+ .cream-pill-button:enabled:hover {
13
+ box-shadow: var(--cream-pill-button-lit-shadow);
14
+ }
15
+ }
16
+
17
+ .cream-pill-button:enabled:is(:focus-visible, [data-interaction-state="Hover"] *) {
18
+ box-shadow: var(--cream-pill-button-lit-shadow);
19
+ }
20
+
21
+ .cream-pill-button::before {
22
+ content: "";
23
+ position: absolute;
24
+ z-index: -1;
25
+ inset: 0;
26
+ border: calc(var(--unit) * 2) solid rgb(73 83 103 / 0.5);
27
+ border-radius: inherit;
28
+ background-color: rgb(255 243 183 / 0.5);
29
+ opacity: 0;
30
+ pointer-events: none;
31
+ }
32
+
33
+ .cream-pill-button:enabled:is(:active, [data-pressed], [data-interaction-state="Pressed"] *) {
34
+ background-color: transparent;
35
+ }
36
+
37
+ .cream-pill-button:enabled:is(:active, [data-pressed], [data-interaction-state="Pressed"] *)::before {
38
+ opacity: 1;
39
+ }
@@ -0,0 +1,18 @@
1
+ /* The lit rim of a cream pill control, the game's Pill as it is lit: a white ring a unit over its edge and two within.
2
+ It shows on hover and focus, with no browser outline. Provisional, as no recording shows an inventory pill lit.
3
+ The rim is the Pill's, measured on a dialog's Confirm. */
4
+ .cream-pill-lit {
5
+ --cream-pill-lit-shadow: 0 0 0 calc(var(--unit) * 1) #fff, inset 0 0 0 calc(var(--unit) * 2) #fff;
6
+ }
7
+
8
+ .cream-pill-lit:enabled:is(:focus-visible, [data-interaction-state="Hover"] *) {
9
+ outline: none;
10
+ box-shadow: var(--cream-pill-lit-shadow);
11
+ }
12
+
13
+ @media (hover: hover) {
14
+ .cream-pill-lit:enabled:hover {
15
+ outline: none;
16
+ box-shadow: var(--cream-pill-lit-shadow);
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ /* A fill tint: the element's box takes `--row-tint` behind its words, lit as a list row is, by focus, by the forced
2
+ Hover state or by a pointer's hover. The first two draw the tint unguarded, and a pointer's hover is guarded by
3
+ `(hover: hover)`, so a touch screen leaves no tint after a tap. The element wears the `fill-tint` class and sets
4
+ `--row-tint`, `--hover-duration` and `--rest-duration` on its own base rule. Its press is its own, in a block placed
5
+ after this sheet. Worn by the artifact picker's options and the character screen's tabs */
6
+ .fill-tint {
7
+ --state-duration: var(--rest-duration);
8
+ transition: background-color var(--state-duration);
9
+ }
10
+
11
+ .fill-tint:is(:focus-visible, [data-interaction-state="Hover"] *) {
12
+ --state-duration: var(--hover-duration);
13
+ background-color: var(--row-tint);
14
+ }
15
+
16
+ @media (hover: hover) {
17
+ .fill-tint:hover {
18
+ --state-duration: var(--hover-duration);
19
+ background-color: var(--row-tint);
20
+ }
21
+ }
@@ -0,0 +1,9 @@
1
+ /* The round 50 unit buttons along a screen's foot, each placed and filled by its own rule */
2
+ .foot-disc {
3
+ position: absolute;
4
+ width: calc(var(--unit) * 50);
5
+ height: calc(var(--unit) * 50);
6
+ padding: 0;
7
+ border: none;
8
+ border-radius: 50%;
9
+ }
@@ -0,0 +1,30 @@
1
+ /* The detail pane's frame and the children it places: each direct child of the pane is absolute, pointer-events auto, with no
2
+ margin, so every pane that is a child of it pulls this sheet in to draw its own */
3
+ .detail {
4
+ position: absolute;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ pointer-events: none;
10
+ }
11
+ .detail > * {
12
+ pointer-events: auto;
13
+ position: absolute;
14
+ margin: 0;
15
+ }
16
+ /* The game's label sits right of its icon, which is not drawn, so the padding pushes the label along by half of itself */
17
+ .action {
18
+ box-sizing: border-box;
19
+ top: calc(var(--unit) * 963);
20
+ left: calc(var(--unit) * 1883);
21
+ width: calc(var(--unit) * 277);
22
+ height: calc(var(--unit) * 78);
23
+ padding-left: calc(var(--unit) * 39);
24
+ border: none;
25
+ border-radius: calc(var(--unit) * 39);
26
+ background: #ece5d8;
27
+ color: #3b3b3b;
28
+ font-size: calc(var(--unit) * 36);
29
+ letter-spacing: calc(var(--unit) * 2.9);
30
+ }
@@ -0,0 +1,17 @@
1
+ /* A gradient tint: a flat gradient laid over the element's own fill in its background image, lit as a row is, by a
2
+ pointer's hover, by focus or by the forced Hover state, and pressed at once. A pointer's hover is guarded by
3
+ `(hover: hover)`, so a touch screen leaves no tint after a tap. The element wears the `gradient-tint` class and sets
4
+ `--tint-hover` and `--tint-press` on its own base rule */
5
+ @media (hover: hover) {
6
+ .gradient-tint:enabled:hover {
7
+ background-image: linear-gradient(var(--tint-hover), var(--tint-hover));
8
+ }
9
+ }
10
+
11
+ .gradient-tint:enabled:is(:focus-visible, [data-interaction-state="Hover"] *) {
12
+ background-image: linear-gradient(var(--tint-hover), var(--tint-hover));
13
+ }
14
+
15
+ .gradient-tint:enabled:is(:active, [data-pressed], [data-interaction-state="Pressed"] *) {
16
+ background-image: linear-gradient(var(--tint-press), var(--tint-press));
17
+ }
@@ -0,0 +1,27 @@
1
+ /* A button a white ring lights round when it is hovered or focused, its crossfade the button's own `--hover-duration`.
2
+ The keyboard's focus and the forced Hover state draw the ring unguarded, and a pointer's hover is guarded by
3
+ `(hover: hover)`, so a touch screen leaves nothing lit after a tap. The ring has no `:enabled`, so a button's enabled
4
+ Press outranks it at equal specificity; a Press without `:enabled` does so only when its own block comes after this
5
+ sheet. The transition lists `filter` too, for the brightness a press sets: a transition on a property that never
6
+ changes draws nothing, so the close, the disc and the tip, which never change `filter`, are unaffected.
7
+ Provisional: no reference frame shows a close, a disc or a tip's button under the Pointer, so these states are
8
+ the cream pill's own */
9
+ .ring-button {
10
+ transition:
11
+ background-color var(--state-duration),
12
+ color var(--state-duration),
13
+ filter var(--state-duration),
14
+ outline-color var(--state-duration);
15
+ }
16
+
17
+ .ring-button:is(:focus-visible, [data-interaction-state="Hover"] *) {
18
+ --state-duration: var(--hover-duration);
19
+ outline-color: #fff;
20
+ }
21
+
22
+ @media (hover: hover) {
23
+ .ring-button:hover {
24
+ --state-duration: var(--hover-duration);
25
+ outline-color: #fff;
26
+ }
27
+ }
@@ -0,0 +1,33 @@
1
+ /* A row's tint: a box laid over the row behind its words, lit as a row is when it is hovered or focused, and pressed at
2
+ Once. The row wears the `row-tint` class and sets the tint's colours as `--row-tint` and `--row-press` */
3
+ .row-tint {
4
+ isolation: isolate;
5
+ }
6
+
7
+ .row-tint::before {
8
+ content: "";
9
+ position: absolute;
10
+ z-index: -1;
11
+ inset: 0;
12
+ border-radius: inherit;
13
+ background-color: var(--row-tint);
14
+ opacity: 0;
15
+ pointer-events: none;
16
+ transition: opacity var(--state-duration);
17
+ }
18
+
19
+ .row-tint:enabled:is(:focus-visible, [data-interaction-state="Hover"] *)::before {
20
+ opacity: 1;
21
+ }
22
+
23
+ /* A pointer's hover is guarded by `(hover: hover)`, so a touch screen leaves no tint after a tap */
24
+ @media (hover: hover) {
25
+ .row-tint:enabled:hover::before {
26
+ opacity: 1;
27
+ }
28
+ }
29
+
30
+ .row-tint:enabled:is(:active, [data-pressed], [data-interaction-state="Pressed"] *)::before {
31
+ background-color: var(--row-press);
32
+ opacity: 1;
33
+ }
@@ -0,0 +1,31 @@
1
+ /* The pieces the shop's grid and its list draw alike. Each screen sets its own position, size and line height */
2
+ .amount::-webkit-slider-runnable-track {
3
+ background: #9aa3b8;
4
+ }
5
+
6
+ .amount::-webkit-slider-thumb {
7
+ background: #2b2a26;
8
+ }
9
+
10
+ .cross {
11
+ width: calc(var(--unit) * 24);
12
+ height: calc(var(--unit) * 24);
13
+ fill: none;
14
+ stroke: currentcolor;
15
+ stroke-linecap: round;
16
+ stroke-width: 3;
17
+ }
18
+
19
+ .price-icon {
20
+ width: calc(var(--unit) * 18);
21
+ height: calc(var(--unit) * 18);
22
+ background: #7aa9e8;
23
+ transform: rotate(45deg);
24
+ }
25
+
26
+ .price-line {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: calc(var(--unit) * 10);
30
+ font-size: calc(var(--unit) * 24);
31
+ }
@@ -0,0 +1,6 @@
1
+ /* The sparkle the game marks its Wish and its banner's rate-up with, a four-point star in its own colour. Its size and colour
2
+ are each piece's own, so the base is all a sparkle shares */
3
+ .sparkle {
4
+ position: absolute;
5
+ clip-path: var(--sparkle-clip-path);
6
+ }
@@ -0,0 +1,9 @@
1
+ /* A button's translucent box, its words in the colour and font around it, its place left to the button */
2
+ .translucent-button {
3
+ padding: calc(var(--unit) * 10) calc(var(--unit) * 20);
4
+ border: none;
5
+ border-radius: calc(var(--unit) * 8);
6
+ background: rgb(255 255 255 / 0.14);
7
+ color: inherit;
8
+ font: inherit;
9
+ }
@@ -0,0 +1,11 @@
1
+ /* The words a screen reader reads and no eye sees: each keeps its place in the page at one pixel square and clipped to
2
+ nothing, under the class that carries it (a tab's name, a level's achieved word, a dialogue's whole line) */
3
+ .tab-name,
4
+ .hidden-label,
5
+ .spoken {
6
+ position: absolute;
7
+ width: 1px;
8
+ height: 1px;
9
+ overflow: hidden;
10
+ clip-path: inset(50%);
11
+ }
@@ -1,9 +1,6 @@
1
- /* The six ascension phases, each a small star the phases reached light */
1
+ /* The six ascension phases, each a glint the phases reached light; the level that holds them sets its size and shape */
2
2
  .spark {
3
- width: calc(var(--unit) * 14);
4
- height: calc(var(--unit) * 14);
5
3
  background: rgb(255 255 255 / 0.3);
6
- clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%, 50% 0%);
7
4
  }
8
5
 
9
6
  .spark.lit {
@@ -26,13 +26,15 @@
26
26
  font-size: calc(var(--unit) * 28);
27
27
  }
28
28
 
29
+ /* The close is the game's flag: a gold tab with its far side notched in, the cross cream in it, measured off the Details
30
+ popup at 1440 high (references/wish-details-1.png). The popup's own place is provisional, so the flag is set inside
31
+ the panel's corner */
29
32
  .close {
30
33
  position: absolute;
31
34
  top: calc(var(--unit) * 24);
32
35
  right: calc(var(--unit) * 24);
33
- padding: 0;
34
- border: none;
35
- background: none;
36
- color: inherit;
37
- font: inherit;
36
+ border-radius: 0;
37
+ background: #a9783d;
38
+ clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%);
39
+ color: #e6cfaa;
38
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genshin-interface",
3
- "version": "4.3.3",
3
+ "version": "4.5.0",
4
4
  "description": "Genshin Impact's interface as a fan recreation: the game's own screen units, face and pointer, and its buttons, dividers, bars and notices as presentational Vue components.",
5
5
  "keywords": [
6
6
  "component-library",
@@ -33,6 +33,7 @@
33
33
  "exports": {
34
34
  ".": "./dist/index.js",
35
35
  "./constants": "./dist/constants.js",
36
+ "./getFixtureImageName": "./dist/getFixtureImageName.js",
36
37
  "./save": "./dist/save.js",
37
38
  "./package.json": "./package.json",
38
39
  "./style.css": "./dist/style.css",
@@ -47,21 +48,21 @@
47
48
  "lint:fix": "eslint --fix .",
48
49
  "test": "vitest",
49
50
  "test:visual": "vitest --config vitest.browser.config.ts",
50
- "typecheck": "vue-tsc"
51
+ "typecheck": "tsrs --fast --runExternalCode"
51
52
  },
52
53
  "devDependencies": {
53
- "@esposter/configuration": "4.3.3",
54
+ "@esposter/configuration": "4.5.0",
54
55
  "@fontsource/signika": "^5.3.0",
55
- "@tsdown/css": "^0.23.1",
56
- "@types/node": "^26.6.5",
57
- "tsdown": "^0.23.1",
56
+ "@tsdown/css": "^0.23.5",
57
+ "@types/node": "^26.6.6",
58
+ "tsdown": "^0.23.5",
58
59
  "vite": "^8.3.5",
59
- "vitest": "^5.0.5",
60
+ "vitest": "^5.1.0",
60
61
  "vitest-browser-vue": "^3.1.0",
61
62
  "vue-tsc": "3.3.11"
62
63
  },
63
64
  "peerDependencies": {
64
65
  "vue": "^3.5.44"
65
66
  },
66
- "gitHead": "955bbc130ad9b28877fd4ae8efc73a045141ce01"
67
+ "gitHead": "e30c001f3b4b15693e75fb53092d62a97ade4d2b"
67
68
  }
@@ -1,50 +0,0 @@
1
- /* The screen's colours and placement are provisional until the recording shows them */
2
- .blessing-screen,
3
- .worship-screen {
4
- position: relative;
5
- width: 100%;
6
- height: 100%;
7
- overflow: hidden;
8
- background: rgb(20 18 16 / 55%);
9
- color: rgb(245 240 230);
10
- }
11
-
12
- .title {
13
- position: absolute;
14
- top: 6%;
15
- left: 6%;
16
- font-size: 2rem;
17
- }
18
-
19
- .close {
20
- position: absolute;
21
- top: 6%;
22
- right: 6%;
23
- font-size: 2rem;
24
- }
25
-
26
- .blessing,
27
- .worship {
28
- position: absolute;
29
- top: 6%;
30
- right: 16%;
31
- font-size: 1.25rem;
32
- }
33
-
34
- .held,
35
- .pool {
36
- position: absolute;
37
- top: 16%;
38
- left: 6%;
39
- font-size: 1.25rem;
40
- }
41
-
42
- .levels,
43
- .members {
44
- position: absolute;
45
- top: 26%;
46
- left: 6%;
47
- display: flex;
48
- flex-direction: column;
49
- gap: 0.5rem;
50
- }
@@ -1,24 +0,0 @@
1
- /* The head, title and back control the party setup and reputation screens share */
2
- .head {
3
- display: flex;
4
- align-items: center;
5
- justify-content: space-between;
6
- padding: calc(var(--unit) * 20) calc(var(--unit) * 40);
7
- }
8
-
9
- .title {
10
- margin: 0;
11
- font-size: calc(var(--unit) * 24);
12
- }
13
-
14
- .back,
15
- .step {
16
- width: calc(var(--unit) * 56);
17
- height: calc(var(--unit) * 56);
18
- border: none;
19
- border-radius: 50%;
20
- background: rgb(255 255 255 / 0.15);
21
- color: #ece5d8;
22
- font: inherit;
23
- font-size: calc(var(--unit) * 28);
24
- }