@things-factory/figure-ui 10.1.76 → 10.1.77
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-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist-client/graphql/v3-store.d.ts +0 -3
- package/dist-client/graphql/v3-store.js +0 -39
- package/dist-client/graphql/v3-store.js.map +0 -1
- package/dist-client/modeller/figure-v3-capability.d.ts +0 -22
- package/dist-client/modeller/figure-v3-capability.js +0 -141
- package/dist-client/modeller/figure-v3-capability.js.map +0 -1
- package/dist-client/modeller/figure-v3-clips.d.ts +0 -31
- package/dist-client/modeller/figure-v3-clips.js +0 -268
- package/dist-client/modeller/figure-v3-clips.js.map +0 -1
- package/dist-client/modeller/figure-v3-controls.d.ts +0 -36
- package/dist-client/modeller/figure-v3-controls.js +0 -226
- package/dist-client/modeller/figure-v3-controls.js.map +0 -1
- package/dist-client/modeller/figure-v3-first-save.d.ts +0 -20
- package/dist-client/modeller/figure-v3-first-save.js +0 -118
- package/dist-client/modeller/figure-v3-first-save.js.map +0 -1
- package/dist-client/modeller/figure-v3-links.d.ts +0 -77
- package/dist-client/modeller/figure-v3-links.js +0 -649
- package/dist-client/modeller/figure-v3-links.js.map +0 -1
- package/dist-client/modeller/figure-v3-material.d.ts +0 -39
- package/dist-client/modeller/figure-v3-material.js +0 -323
- package/dist-client/modeller/figure-v3-material.js.map +0 -1
- package/dist-client/modeller/figure-v3-parts.d.ts +0 -69
- package/dist-client/modeller/figure-v3-parts.js +0 -559
- package/dist-client/modeller/figure-v3-parts.js.map +0 -1
- package/dist-client/modeller/figure-v3-preview.d.ts +0 -34
- package/dist-client/modeller/figure-v3-preview.js +0 -346
- package/dist-client/modeller/figure-v3-preview.js.map +0 -1
- package/dist-client/modeller/figure-v3-properties.d.ts +0 -45
- package/dist-client/modeller/figure-v3-properties.js +0 -239
- package/dist-client/modeller/figure-v3-properties.js.map +0 -1
- package/dist-client/modeller/figure-v3-recipe-catalog.d.ts +0 -38
- package/dist-client/modeller/figure-v3-recipe-catalog.js +0 -399
- package/dist-client/modeller/figure-v3-recipe-catalog.js.map +0 -1
- package/dist-client/modeller/figure-v3-verdict.d.ts +0 -64
- package/dist-client/modeller/figure-v3-verdict.js +0 -787
- package/dist-client/modeller/figure-v3-verdict.js.map +0 -1
- package/dist-client/modeller/v3-ai-proposal.d.ts +0 -51
- package/dist-client/modeller/v3-ai-proposal.js +0 -64
- package/dist-client/modeller/v3-ai-proposal.js.map +0 -1
- package/dist-client/modeller/v3-align.d.ts +0 -30
- package/dist-client/modeller/v3-align.js +0 -75
- package/dist-client/modeller/v3-align.js.map +0 -1
- package/dist-client/modeller/v3-canvas.d.ts +0 -72
- package/dist-client/modeller/v3-canvas.js +0 -379
- package/dist-client/modeller/v3-canvas.js.map +0 -1
- package/dist-client/modeller/v3-clips.d.ts +0 -39
- package/dist-client/modeller/v3-clips.js +0 -58
- package/dist-client/modeller/v3-clips.js.map +0 -1
- package/dist-client/modeller/v3-controls.d.ts +0 -28
- package/dist-client/modeller/v3-controls.js +0 -28
- package/dist-client/modeller/v3-controls.js.map +0 -1
- package/dist-client/modeller/v3-editor.d.ts +0 -203
- package/dist-client/modeller/v3-editor.js +0 -1526
- package/dist-client/modeller/v3-editor.js.map +0 -1
- package/dist-client/modeller/v3-fields.d.ts +0 -45
- package/dist-client/modeller/v3-fields.js +0 -83
- package/dist-client/modeller/v3-fields.js.map +0 -1
- package/dist-client/modeller/v3-figure-facts.d.ts +0 -35
- package/dist-client/modeller/v3-figure-facts.js +0 -55
- package/dist-client/modeller/v3-figure-facts.js.map +0 -1
- package/dist-client/modeller/v3-first-save.d.ts +0 -17
- package/dist-client/modeller/v3-first-save.js +0 -26
- package/dist-client/modeller/v3-first-save.js.map +0 -1
- package/dist-client/modeller/v3-gizmo.d.ts +0 -72
- package/dist-client/modeller/v3-gizmo.js +0 -111
- package/dist-client/modeller/v3-gizmo.js.map +0 -1
- package/dist-client/modeller/v3-help.d.ts +0 -18
- package/dist-client/modeller/v3-help.js +0 -37
- package/dist-client/modeller/v3-help.js.map +0 -1
- package/dist-client/modeller/v3-joint-drag.d.ts +0 -19
- package/dist-client/modeller/v3-joint-drag.js +0 -97
- package/dist-client/modeller/v3-joint-drag.js.map +0 -1
- package/dist-client/modeller/v3-joint-fan.d.ts +0 -9
- package/dist-client/modeller/v3-joint-fan.js +0 -276
- package/dist-client/modeller/v3-joint-fan.js.map +0 -1
- package/dist-client/modeller/v3-keys.d.ts +0 -22
- package/dist-client/modeller/v3-keys.js +0 -26
- package/dist-client/modeller/v3-keys.js.map +0 -1
- package/dist-client/modeller/v3-links.d.ts +0 -267
- package/dist-client/modeller/v3-links.js +0 -480
- package/dist-client/modeller/v3-links.js.map +0 -1
- package/dist-client/modeller/v3-live.d.ts +0 -37
- package/dist-client/modeller/v3-live.js +0 -68
- package/dist-client/modeller/v3-live.js.map +0 -1
- package/dist-client/modeller/v3-maturity.d.ts +0 -120
- package/dist-client/modeller/v3-maturity.js +0 -313
- package/dist-client/modeller/v3-maturity.js.map +0 -1
- package/dist-client/modeller/v3-occupancy.d.ts +0 -18
- package/dist-client/modeller/v3-occupancy.js +0 -24
- package/dist-client/modeller/v3-occupancy.js.map +0 -1
- package/dist-client/modeller/v3-palette.d.ts +0 -7
- package/dist-client/modeller/v3-palette.js +0 -46
- package/dist-client/modeller/v3-palette.js.map +0 -1
- package/dist-client/modeller/v3-preview-model.d.ts +0 -47
- package/dist-client/modeller/v3-preview-model.js +0 -68
- package/dist-client/modeller/v3-preview-model.js.map +0 -1
- package/dist-client/modeller/v3-product-session.d.ts +0 -510
- package/dist-client/modeller/v3-product-session.js +0 -157
- package/dist-client/modeller/v3-product-session.js.map +0 -1
- package/dist-client/modeller/v3-recipe-source.d.ts +0 -8
- package/dist-client/modeller/v3-recipe-source.js +0 -14
- package/dist-client/modeller/v3-recipe-source.js.map +0 -1
- package/dist-client/modeller/v3-recipes.d.ts +0 -37
- package/dist-client/modeller/v3-recipes.js +0 -103
- package/dist-client/modeller/v3-recipes.js.map +0 -1
- package/dist-client/modeller/v3-refusals.d.ts +0 -68
- package/dist-client/modeller/v3-refusals.js +0 -142
- package/dist-client/modeller/v3-refusals.js.map +0 -1
- package/dist-client/modeller/v3-renderer.d.ts +0 -40
- package/dist-client/modeller/v3-renderer.js +0 -73
- package/dist-client/modeller/v3-renderer.js.map +0 -1
- package/dist-client/modeller/v3-stage-model.d.ts +0 -39
- package/dist-client/modeller/v3-stage-model.js +0 -147
- package/dist-client/modeller/v3-stage-model.js.map +0 -1
- package/dist-client/modeller/v3-thumbnail.d.ts +0 -3
- package/dist-client/modeller/v3-thumbnail.js +0 -75
- package/dist-client/modeller/v3-thumbnail.js.map +0 -1
- package/dist-client/pages/figure-v3-modeller-page.d.ts +0 -102
- package/dist-client/pages/figure-v3-modeller-page.js +0 -548
- package/dist-client/pages/figure-v3-modeller-page.js.map +0 -1
- package/dist-client/tsconfig.chk.tsbuildinfo +0 -1
- package/dist-client/tsconfig.fui.tsbuildinfo +0 -1
- package/dist-client/tsconfig.scratch-fm.tsbuildinfo +0 -1
|
@@ -1,787 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import { css, html, LitElement, nothing, svg } from 'lit';
|
|
4
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
5
|
-
import { i18next, localize } from '@operato/i18n';
|
|
6
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
7
|
-
import { LIMITS, parseV3Asset, V3_PER_INSTANCE, v3CostOf } from '@hatiolab/figure-model';
|
|
8
|
-
import { inspectFigureDraft } from '../graphql/index.js';
|
|
9
|
-
import { gateFindingStyles, renderGateFinding } from './gate-findings.js';
|
|
10
|
-
import { MEASURED } from './scene-budget.js';
|
|
11
|
-
import { SidePanelStyles } from './side-panel-styles.js';
|
|
12
|
-
import { budgetOf, CURVE_SIZE, curveLayout, GRADE_SCALE, shortNumber, v3ReportOf } from './v3-maturity.js';
|
|
13
|
-
/** How long an edit settles before the server is asked again. One question per pause, not one per keystroke. */
|
|
14
|
-
export const VERDICT_SETTLE_MS = 400;
|
|
15
|
-
/**
|
|
16
|
-
* 성숙도 — the modeller's verdict while editing.
|
|
17
|
-
*
|
|
18
|
-
* It shows, as the author edits: how many fit on one screen with the grade beside it and the budget that
|
|
19
|
-
* decided the grade, the grade scale, six maturity axes as a radar and a list, the budget bars, the drawing cost,
|
|
20
|
-
* the reuse trend, and the findings. An earlier tab kept only the count and the findings (user, 2026-09-24:
|
|
21
|
-
* 「분석부분도 많이 부족하고, 왜 이렇게 너프되었는지」).
|
|
22
|
-
*
|
|
23
|
-
* ## What is computed where
|
|
24
|
-
*
|
|
25
|
-
* The numbers come from `v3-maturity.ts`, which reads the evaluated asset the way the V3 renderer draws it — the
|
|
26
|
-
* screen calls and shows, it does not count. The count uses the same `capacityFrom` the catalogue cards use, so the
|
|
27
|
-
* tab and the card cannot disagree.
|
|
28
|
-
*
|
|
29
|
-
* The findings do not come from here: they come from the server's release door (`inspectFigureDraft`), the same
|
|
30
|
-
* door and the same sentences as the release panel. A second judgement on the screen would say something different
|
|
31
|
-
* the first time either changed. The release judgement is the server's, so that section is the server's answer.
|
|
32
|
-
*
|
|
33
|
-
* ## The grade
|
|
34
|
-
*
|
|
35
|
-
* figure-model's `v3ScoreOf`, which the catalogue uses too: headroom against placing `LIMITS.screenInstances` of the
|
|
36
|
-
* figure on one screen (chief architect, 2026-09-24) -- the screen's measured groups and its triangle target shared
|
|
37
|
-
* per instance -- and the rule limits for independently moved parts and transparent materials, decided by the
|
|
38
|
-
* tightest. The two budgets V3 has no field for are left out and the tab says so.
|
|
39
|
-
*/
|
|
40
|
-
/** A per-instance share of the screen is not a whole number; what an instance may draw is the whole part of it. */
|
|
41
|
-
const limitOf = (use) => Math.floor(use.limit).toLocaleString();
|
|
42
|
-
let FigureV3Verdict = class FigureV3Verdict extends localize(i18next)(LitElement) {
|
|
43
|
-
constructor() {
|
|
44
|
-
super(...arguments);
|
|
45
|
-
/** Bodies in the asset, drawn or hidden. With none there is nothing to fit the space to, so the button is not offered. */
|
|
46
|
-
this.bodies = 0;
|
|
47
|
-
/** Whether the trend chart is open at its own size. */
|
|
48
|
-
this.expanded = false;
|
|
49
|
-
this.failure = '';
|
|
50
|
-
this.asking = false;
|
|
51
|
-
/** Answers can come back out of order; only the newest question's answer is shown. */
|
|
52
|
-
this.asked = 0;
|
|
53
|
-
this.fit = () => {
|
|
54
|
-
this.dispatchEvent(new CustomEvent('fit-base-to-parts', { bubbles: true, composed: true }));
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
static { this.styles = [
|
|
58
|
-
ScrollbarStyles,
|
|
59
|
-
SidePanelStyles,
|
|
60
|
-
gateFindingStyles,
|
|
61
|
-
css `
|
|
62
|
-
:host {
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
overflow-y: auto;
|
|
66
|
-
}
|
|
67
|
-
section p {
|
|
68
|
-
margin: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* ── How many fit ───────────────────────────────────────────────
|
|
72
|
-
The value of low poly is how many can stand on one screen, so that answer leads. The grade says whether
|
|
73
|
-
the shape keeps inside its declared limits, so it is the small badge beside it. */
|
|
74
|
-
p[lead],
|
|
75
|
-
p[basis],
|
|
76
|
-
p[quiet] {
|
|
77
|
-
font-size: 0.74rem;
|
|
78
|
-
line-height: 1.55;
|
|
79
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
80
|
-
}
|
|
81
|
-
p[basis] em {
|
|
82
|
-
font-style: normal;
|
|
83
|
-
color: var(--md-sys-color-tertiary);
|
|
84
|
-
}
|
|
85
|
-
div[verdict] {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: baseline;
|
|
88
|
-
gap: 6px;
|
|
89
|
-
}
|
|
90
|
-
span[capacity] {
|
|
91
|
-
font-size: 2.1rem;
|
|
92
|
-
font-weight: 800;
|
|
93
|
-
line-height: 1;
|
|
94
|
-
letter-spacing: -0.01em;
|
|
95
|
-
color: var(--md-sys-color-primary);
|
|
96
|
-
}
|
|
97
|
-
span[unit] {
|
|
98
|
-
font-size: 0.9rem;
|
|
99
|
-
font-weight: 600;
|
|
100
|
-
color: var(--md-sys-color-primary);
|
|
101
|
-
}
|
|
102
|
-
/* The badge says what it measures (headroom), so its number is not read as a score out of 100. */
|
|
103
|
-
span[grade] {
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: baseline;
|
|
106
|
-
gap: 5px;
|
|
107
|
-
margin-left: auto;
|
|
108
|
-
padding: 3px 10px;
|
|
109
|
-
font-size: 0.76rem;
|
|
110
|
-
font-weight: 700;
|
|
111
|
-
color: var(--md-sys-color-on-primary-container);
|
|
112
|
-
background-color: var(--md-sys-color-primary-container);
|
|
113
|
-
border-radius: 999em;
|
|
114
|
-
}
|
|
115
|
-
span[grade] small {
|
|
116
|
-
display: inline;
|
|
117
|
-
margin: 0;
|
|
118
|
-
font-size: 0.68rem;
|
|
119
|
-
font-weight: 500;
|
|
120
|
-
color: inherit;
|
|
121
|
-
}
|
|
122
|
-
/* C keeps within the limit. Red is for over it (D) only; red on a kept limit asks for a fix nothing needs. */
|
|
123
|
-
span[grade][tight] {
|
|
124
|
-
color: var(--md-sys-color-on-tertiary-container);
|
|
125
|
-
background-color: var(--md-sys-color-tertiary-container);
|
|
126
|
-
}
|
|
127
|
-
span[grade][over] {
|
|
128
|
-
color: var(--md-sys-color-on-error-container);
|
|
129
|
-
background-color: var(--md-sys-color-error-container);
|
|
130
|
-
}
|
|
131
|
-
p[because] {
|
|
132
|
-
font-size: 0.78rem;
|
|
133
|
-
line-height: 1.6;
|
|
134
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
135
|
-
}
|
|
136
|
-
p[because] strong {
|
|
137
|
-
color: var(--md-sys-color-on-surface);
|
|
138
|
-
}
|
|
139
|
-
/* The grade scale. Not folded away: it is compared against every time, not learned once. */
|
|
140
|
-
p[scale] {
|
|
141
|
-
display: flex;
|
|
142
|
-
flex-wrap: wrap;
|
|
143
|
-
gap: 2px 10px;
|
|
144
|
-
font-size: 0.7rem;
|
|
145
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
146
|
-
}
|
|
147
|
-
p[scale] b {
|
|
148
|
-
font-weight: 700;
|
|
149
|
-
}
|
|
150
|
-
p[scale] span[now] {
|
|
151
|
-
color: var(--md-sys-color-on-surface);
|
|
152
|
-
}
|
|
153
|
-
p[scale] span[now] b {
|
|
154
|
-
color: var(--md-sys-color-primary);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* ── Maturity radar ─────────────────────────────────────────────
|
|
158
|
-
Only the measured axes are drawn; an unmeasured one drawn as a spoke reads as a dent, which is a zero. */
|
|
159
|
-
div[radar] {
|
|
160
|
-
display: flex;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
padding: 2px 0 6px 0;
|
|
163
|
-
color: var(--md-sys-color-primary);
|
|
164
|
-
}
|
|
165
|
-
div[radar] svg {
|
|
166
|
-
width: 100%;
|
|
167
|
-
max-width: 240px;
|
|
168
|
-
height: auto;
|
|
169
|
-
}
|
|
170
|
-
div[radar] polygon[web] {
|
|
171
|
-
fill: none;
|
|
172
|
-
stroke: var(--md-sys-color-outline-variant);
|
|
173
|
-
stroke-width: 0.6;
|
|
174
|
-
}
|
|
175
|
-
div[radar] line[spoke] {
|
|
176
|
-
stroke: var(--md-sys-color-outline-variant);
|
|
177
|
-
stroke-width: 0.6;
|
|
178
|
-
}
|
|
179
|
-
div[radar] polygon[shape] {
|
|
180
|
-
fill: color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
|
|
181
|
-
stroke: var(--md-sys-color-primary);
|
|
182
|
-
stroke-width: 1.4;
|
|
183
|
-
stroke-linejoin: round;
|
|
184
|
-
}
|
|
185
|
-
div[radar] circle[dot] {
|
|
186
|
-
fill: var(--md-sys-color-primary);
|
|
187
|
-
}
|
|
188
|
-
div[radar] text {
|
|
189
|
-
font-size: 5.2px;
|
|
190
|
-
fill: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
191
|
-
}
|
|
192
|
-
p[unmeasured] {
|
|
193
|
-
font-size: 0.7rem;
|
|
194
|
-
line-height: 1.5;
|
|
195
|
-
color: var(--md-sys-color-tertiary);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/* ── Axes and budgets ───────────────────────────────────────────
|
|
199
|
-
Not merged into one number: merged, 「what to fix」 disappears. */
|
|
200
|
-
ul[axes],
|
|
201
|
-
ul[budgets] {
|
|
202
|
-
margin: 0;
|
|
203
|
-
padding: 0;
|
|
204
|
-
list-style: none;
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
gap: 7px;
|
|
208
|
-
}
|
|
209
|
-
ul[axes] li,
|
|
210
|
-
ul[budgets] li {
|
|
211
|
-
display: grid;
|
|
212
|
-
grid-template-columns: 1fr auto;
|
|
213
|
-
gap: 2px 8px;
|
|
214
|
-
font-size: 0.75rem;
|
|
215
|
-
}
|
|
216
|
-
ul[axes] li[blocked] {
|
|
217
|
-
opacity: 0.7;
|
|
218
|
-
}
|
|
219
|
-
ul[axes] em {
|
|
220
|
-
grid-column: 1 / -1;
|
|
221
|
-
font-style: normal;
|
|
222
|
-
font-size: 0.68rem;
|
|
223
|
-
line-height: 1.5;
|
|
224
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
225
|
-
}
|
|
226
|
-
ul[axes] li[blocked] em {
|
|
227
|
-
color: var(--md-sys-color-tertiary);
|
|
228
|
-
}
|
|
229
|
-
span[reading] {
|
|
230
|
-
font-family: var(--mono-font, monospace);
|
|
231
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
232
|
-
}
|
|
233
|
-
div[bar] {
|
|
234
|
-
grid-column: 1 / -1;
|
|
235
|
-
height: 4px;
|
|
236
|
-
background-color: var(--md-sys-color-surface-container-highest);
|
|
237
|
-
border-radius: 2px;
|
|
238
|
-
overflow: hidden;
|
|
239
|
-
}
|
|
240
|
-
div[bar] > i {
|
|
241
|
-
display: block;
|
|
242
|
-
height: 100%;
|
|
243
|
-
background-color: var(--md-sys-color-primary);
|
|
244
|
-
}
|
|
245
|
-
div[bar] > i[tight] {
|
|
246
|
-
background-color: var(--md-sys-color-error);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* ── Drawing cost ─────────────────────────────────────────────── */
|
|
250
|
-
dl[metrics] {
|
|
251
|
-
margin: 0;
|
|
252
|
-
display: grid;
|
|
253
|
-
grid-template-columns: 1fr auto;
|
|
254
|
-
gap: 4px 8px;
|
|
255
|
-
font-size: 0.78rem;
|
|
256
|
-
}
|
|
257
|
-
dl[metrics] dt {
|
|
258
|
-
color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
|
|
259
|
-
}
|
|
260
|
-
dl[metrics] dd {
|
|
261
|
-
margin: 0;
|
|
262
|
-
text-align: right;
|
|
263
|
-
font-family: var(--mono-font, monospace);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/* ── Trend ──────────────────────────────────────────────────────
|
|
267
|
-
The chart's natural size is 680px; in a 300px side its words are 4px. The side holds a button, the chart
|
|
268
|
-
opens at its own size. */
|
|
269
|
-
button[expand] {
|
|
270
|
-
justify-self: start;
|
|
271
|
-
padding: 4px 10px;
|
|
272
|
-
font: inherit;
|
|
273
|
-
font-size: 0.74rem;
|
|
274
|
-
color: var(--md-sys-color-on-surface);
|
|
275
|
-
background: none;
|
|
276
|
-
border: 1px solid var(--md-sys-color-outline-variant);
|
|
277
|
-
border-radius: 6px;
|
|
278
|
-
cursor: pointer;
|
|
279
|
-
}
|
|
280
|
-
button[expand]:hover {
|
|
281
|
-
background-color: var(--md-sys-color-surface-container);
|
|
282
|
-
}
|
|
283
|
-
div[sheet] {
|
|
284
|
-
position: fixed;
|
|
285
|
-
inset: 0;
|
|
286
|
-
z-index: 10;
|
|
287
|
-
display: flex;
|
|
288
|
-
align-items: center;
|
|
289
|
-
justify-content: center;
|
|
290
|
-
padding: 12px;
|
|
291
|
-
background-color: color-mix(in srgb, var(--md-sys-color-scrim, black) 32%, transparent);
|
|
292
|
-
}
|
|
293
|
-
div[sheet] > figure {
|
|
294
|
-
max-width: 100%;
|
|
295
|
-
max-height: 100%;
|
|
296
|
-
margin: 0;
|
|
297
|
-
padding: 12px;
|
|
298
|
-
overflow: auto;
|
|
299
|
-
color: var(--md-sys-color-on-surface);
|
|
300
|
-
background-color: var(--md-sys-color-surface-container-lowest);
|
|
301
|
-
border-radius: 6px;
|
|
302
|
-
box-shadow: 0 8px 32px color-mix(in srgb, var(--md-sys-color-shadow, black) 28%, transparent);
|
|
303
|
-
}
|
|
304
|
-
div[sheet] svg {
|
|
305
|
-
display: block;
|
|
306
|
-
/* Not shrunk below its natural size — a narrow window scrolls instead. */
|
|
307
|
-
min-width: 680px;
|
|
308
|
-
font-family: inherit;
|
|
309
|
-
font-size: 11px;
|
|
310
|
-
fill: currentColor;
|
|
311
|
-
}
|
|
312
|
-
div[sheet] svg [grid] {
|
|
313
|
-
stroke: currentColor;
|
|
314
|
-
stroke-opacity: 0.12;
|
|
315
|
-
}
|
|
316
|
-
div[sheet] svg [muted] {
|
|
317
|
-
opacity: 0.55;
|
|
318
|
-
}
|
|
319
|
-
div[sheet] svg path[series] {
|
|
320
|
-
fill: none;
|
|
321
|
-
stroke-width: 2;
|
|
322
|
-
stroke-linejoin: round;
|
|
323
|
-
}
|
|
324
|
-
div[sheet] svg [series='triangles'] {
|
|
325
|
-
stroke: var(--md-sys-color-error);
|
|
326
|
-
fill: var(--md-sys-color-error);
|
|
327
|
-
}
|
|
328
|
-
div[sheet] svg [series='drawCalls'] {
|
|
329
|
-
stroke: var(--md-sys-color-tertiary);
|
|
330
|
-
fill: var(--md-sys-color-tertiary);
|
|
331
|
-
}
|
|
332
|
-
div[sheet] svg [series='geometries'] {
|
|
333
|
-
stroke: var(--md-sys-color-primary);
|
|
334
|
-
fill: var(--md-sys-color-primary);
|
|
335
|
-
}
|
|
336
|
-
div[sheet] svg [series='materials'] {
|
|
337
|
-
stroke: var(--md-sys-color-secondary);
|
|
338
|
-
fill: var(--md-sys-color-secondary);
|
|
339
|
-
}
|
|
340
|
-
div[sheet] svg path[series],
|
|
341
|
-
div[sheet] svg line[series] {
|
|
342
|
-
fill: none;
|
|
343
|
-
}
|
|
344
|
-
/* A legend value is written in its line's colour, not outlined in it. */
|
|
345
|
-
div[sheet] svg text[series] {
|
|
346
|
-
stroke: none;
|
|
347
|
-
}
|
|
348
|
-
div[sheet] figcaption {
|
|
349
|
-
display: flex;
|
|
350
|
-
align-items: center;
|
|
351
|
-
justify-content: flex-end;
|
|
352
|
-
}
|
|
353
|
-
div[sheet] button[close] {
|
|
354
|
-
padding: 5px 14px;
|
|
355
|
-
font: inherit;
|
|
356
|
-
color: var(--md-sys-color-on-surface);
|
|
357
|
-
background: none;
|
|
358
|
-
border: 1px solid var(--md-sys-color-outline-variant);
|
|
359
|
-
border-radius: 999em;
|
|
360
|
-
cursor: pointer;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/* ── Release verdict ───────────────────────────────────────────── */
|
|
364
|
-
p[clear] {
|
|
365
|
-
color: var(--md-sys-color-primary);
|
|
366
|
-
font-weight: 600;
|
|
367
|
-
}
|
|
368
|
-
p[failed] {
|
|
369
|
-
color: var(--md-sys-color-error);
|
|
370
|
-
}
|
|
371
|
-
button[fit] {
|
|
372
|
-
align-self: flex-start;
|
|
373
|
-
margin-top: 4px;
|
|
374
|
-
padding: 4px 10px;
|
|
375
|
-
font: inherit;
|
|
376
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
377
|
-
background: var(--md-sys-color-secondary-container);
|
|
378
|
-
border: none;
|
|
379
|
-
border-radius: 999em;
|
|
380
|
-
cursor: pointer;
|
|
381
|
-
}
|
|
382
|
-
`
|
|
383
|
-
]; }
|
|
384
|
-
disconnectedCallback() {
|
|
385
|
-
clearTimeout(this.timer);
|
|
386
|
-
super.disconnectedCallback();
|
|
387
|
-
}
|
|
388
|
-
updated(changes) {
|
|
389
|
-
if (changes.has('source'))
|
|
390
|
-
this.measure();
|
|
391
|
-
if (changes.has('source') || changes.has('figureId') || changes.has('figureType'))
|
|
392
|
-
this.schedule();
|
|
393
|
-
}
|
|
394
|
-
measure() {
|
|
395
|
-
let report;
|
|
396
|
-
let bodies = 0;
|
|
397
|
-
try {
|
|
398
|
-
const asset = this.source ? parseV3Asset(this.source) : undefined;
|
|
399
|
-
const cost = asset ? v3CostOf(asset) : undefined;
|
|
400
|
-
bodies = cost ? cost.groups + cost.hidden : 0;
|
|
401
|
-
report = asset ? v3ReportOf(asset) : undefined;
|
|
402
|
-
}
|
|
403
|
-
catch {
|
|
404
|
-
/* A source the format refuses has no report; the server's finding below says why. */
|
|
405
|
-
report = undefined;
|
|
406
|
-
}
|
|
407
|
-
this.report = report;
|
|
408
|
-
this.bodies = bodies;
|
|
409
|
-
if (!report)
|
|
410
|
-
this.expanded = false;
|
|
411
|
-
this.dispatchEvent(new CustomEvent('capacity-changed', { detail: { instances: report?.capacity.instances, budget: budgetOf(report) } }));
|
|
412
|
-
}
|
|
413
|
-
schedule() {
|
|
414
|
-
clearTimeout(this.timer);
|
|
415
|
-
if (!this.source) {
|
|
416
|
-
this.inspection = undefined;
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
this.timer = setTimeout(() => this.ask(), VERDICT_SETTLE_MS);
|
|
420
|
-
}
|
|
421
|
-
async ask() {
|
|
422
|
-
const question = ++this.asked;
|
|
423
|
-
const source = this.source;
|
|
424
|
-
this.asking = true;
|
|
425
|
-
try {
|
|
426
|
-
const inspection = await inspectFigureDraft(source, this.figureId);
|
|
427
|
-
if (question !== this.asked)
|
|
428
|
-
return;
|
|
429
|
-
this.inspection = inspection;
|
|
430
|
-
this.failure = '';
|
|
431
|
-
}
|
|
432
|
-
catch (error) {
|
|
433
|
-
if (question !== this.asked)
|
|
434
|
-
return;
|
|
435
|
-
/* The server's reason as it gave it — the screen does not make one up. The last answer is dropped with it. */
|
|
436
|
-
this.inspection = undefined;
|
|
437
|
-
this.failure = error instanceof Error ? error.message : String(error);
|
|
438
|
-
}
|
|
439
|
-
finally {
|
|
440
|
-
if (question === this.asked)
|
|
441
|
-
this.asking = false;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
render() {
|
|
445
|
-
/*
|
|
446
|
-
With nothing drawn the report is guidance, not a verdict: the sections below have meaning only over parts,
|
|
447
|
-
and a number drawn from nothing reads as zero, which reads as bad. The release verdict stays — a new figure
|
|
448
|
-
is already refused for its undeclared space, and the way out is offered there.
|
|
449
|
-
*/
|
|
450
|
-
const report = this.report;
|
|
451
|
-
if (!report) {
|
|
452
|
-
return html `
|
|
453
|
-
<section>
|
|
454
|
-
<h3>${i18next.t('figure.label.maturity')}</h3>
|
|
455
|
-
<p quiet>${i18next.t('figure.text.report-appears-when-you-add-a-part')}</p>
|
|
456
|
-
</section>
|
|
457
|
-
${this.renderGate()}
|
|
458
|
-
`;
|
|
459
|
-
}
|
|
460
|
-
return html `
|
|
461
|
-
${this.renderVerdict(report)} ${this.renderAxes(report)} ${this.renderBudgets(report)} ${this.renderMetrics(report)}
|
|
462
|
-
${this.renderCurve()} ${this.renderGate()} ${this.renderSheet(report)}
|
|
463
|
-
`;
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* The head — how many fit, with the grade beside it, the budget that decided it, the scale, and the basis.
|
|
467
|
-
*
|
|
468
|
-
* The count's denominator is measured (2026-09-18, Apple M5) and says so with the machine and the date; the
|
|
469
|
-
* triangle side is still the design document's target and says that.
|
|
470
|
-
*/
|
|
471
|
-
renderVerdict(report) {
|
|
472
|
-
const { capacity, score } = report;
|
|
473
|
-
return html `
|
|
474
|
-
<section>
|
|
475
|
-
<h3>${i18next.t('figure.label.maturity')}</h3>
|
|
476
|
-
<p lead>${i18next.t('figure.label.axis-scale')} — ${i18next.t('figure.text.how-many-fit')}</p>
|
|
477
|
-
<div verdict>
|
|
478
|
-
<span capacity>${capacity.instances.toLocaleString()}</span>
|
|
479
|
-
<span unit>${i18next.t('figure.text.instances-unit')}</span>
|
|
480
|
-
<span
|
|
481
|
-
grade
|
|
482
|
-
?tight=${score.grade === 'C'}
|
|
483
|
-
?over=${score.grade === 'D'}
|
|
484
|
-
title=${i18next.t('figure.text.grade-explained', { target: LIMITS.screenInstances })}
|
|
485
|
-
>
|
|
486
|
-
${score.grade}
|
|
487
|
-
<small>${i18next.t('figure.text.headroom-percent', { percent: score.score })}</small>
|
|
488
|
-
</span>
|
|
489
|
-
</div>
|
|
490
|
-
<p because>
|
|
491
|
-
${i18next.t('figure.text.grade-decided-by')}
|
|
492
|
-
<strong>${i18next.t('figure.label.budget-' + score.tightest.key)}</strong>
|
|
493
|
-
— ${score.tightest.used.toLocaleString()} / ${limitOf(score.tightest)} (${Math.round(score.tightest.ratio * 100)}%)
|
|
494
|
-
</p>
|
|
495
|
-
<p basis>
|
|
496
|
-
${i18next.t('figure.text.grade-target', {
|
|
497
|
-
target: LIMITS.screenInstances,
|
|
498
|
-
groups: Math.floor(V3_PER_INSTANCE.groups),
|
|
499
|
-
triangles: Math.floor(V3_PER_INSTANCE.triangles).toLocaleString()
|
|
500
|
-
})}
|
|
501
|
-
</p>
|
|
502
|
-
${this.renderGradeScale(score.grade)}
|
|
503
|
-
<p basis>
|
|
504
|
-
${i18next.t('figure.text.bound-by-' + capacity.bound, {
|
|
505
|
-
per: capacity.per.toLocaleString(),
|
|
506
|
-
budget: capacity.budget.toLocaleString()
|
|
507
|
-
})}
|
|
508
|
-
<em>
|
|
509
|
-
${capacity.bound === 'groups'
|
|
510
|
-
? i18next.t('figure.text.budget-measured-on', { gpu: MEASURED.gpu, on: MEASURED.on })
|
|
511
|
-
: i18next.t('figure.text.budget-not-measured-yet')}
|
|
512
|
-
</em>
|
|
513
|
-
</p>
|
|
514
|
-
</section>
|
|
515
|
-
`;
|
|
516
|
-
}
|
|
517
|
-
/** A · B · C · D and where this figure stands, drawn from the bounds the grade is computed with. */
|
|
518
|
-
renderGradeScale(now) {
|
|
519
|
-
const bounds = [...GRADE_SCALE.map(([grade, bound]) => [grade, `≤ ${bound * 100}%`]), ['D', '> 100%']];
|
|
520
|
-
return html `
|
|
521
|
-
<p scale>
|
|
522
|
-
<span>${i18next.t('figure.text.grade-scale-lead')}</span>
|
|
523
|
-
${bounds.map(([grade, bound]) => html `<span ?now=${grade === now}><b>${grade}</b> ${bound}</span>`)}
|
|
524
|
-
</p>
|
|
525
|
-
`;
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Maturity by axis — a radar of the measured axes, a line naming the unmeasured ones, and the list.
|
|
529
|
-
*
|
|
530
|
-
* Scale is left out of the list: it leads the tab, and the same number twice reads as two different things.
|
|
531
|
-
*/
|
|
532
|
-
renderAxes(report) {
|
|
533
|
-
const measured = report.axes.filter(axis => axis.ratio !== undefined);
|
|
534
|
-
const unmeasured = report.axes.filter(axis => axis.ratio === undefined);
|
|
535
|
-
return html `
|
|
536
|
-
<section>
|
|
537
|
-
<h3>${i18next.t('figure.label.by-axis')}</h3>
|
|
538
|
-
<div radar>${this.renderRadar(measured)}</div>
|
|
539
|
-
${unmeasured.length
|
|
540
|
-
? html `<p unmeasured>
|
|
541
|
-
${i18next.t('figure.text.axes-not-measurable-yet', {
|
|
542
|
-
axes: unmeasured.map(axis => i18next.t('figure.label.axis-' + axis.key)).join(' · ')
|
|
543
|
-
})}
|
|
544
|
-
</p>`
|
|
545
|
-
: nothing}
|
|
546
|
-
<ul axes>
|
|
547
|
-
${report.axes.filter(axis => axis.key !== 'scale').map(axis => this.renderAxis(axis))}
|
|
548
|
-
</ul>
|
|
549
|
-
</section>
|
|
550
|
-
`;
|
|
551
|
-
}
|
|
552
|
-
/** The radar: rings at a third, two thirds and full, short names so the left edge is not cut. */
|
|
553
|
-
renderRadar(axes) {
|
|
554
|
-
const cx = 60;
|
|
555
|
-
const cy = 46;
|
|
556
|
-
const r = 28;
|
|
557
|
-
const at = (index, ratio) => {
|
|
558
|
-
const angle = -Math.PI / 2 + (index * 2 * Math.PI) / axes.length;
|
|
559
|
-
return [cx + r * ratio * Math.cos(angle), cy + r * ratio * Math.sin(angle)];
|
|
560
|
-
};
|
|
561
|
-
const clamp = (ratio) => Math.max(0.04, Math.min(1, ratio ?? 0));
|
|
562
|
-
const points = axes.map((axis, index) => at(index, clamp(axis.ratio)).map(n => n.toFixed(1)).join(',')).join(' ');
|
|
563
|
-
return svg `
|
|
564
|
-
<svg viewBox="0 0 120 96" aria-hidden="true">
|
|
565
|
-
${[0.33, 0.66, 1].map(ring => svg `<polygon web points=${axes.map((_, i) => at(i, ring).map(n => n.toFixed(1)).join(',')).join(' ')}></polygon>`)}
|
|
566
|
-
${axes.map((_, index) => {
|
|
567
|
-
const [x, y] = at(index, 1);
|
|
568
|
-
return svg `<line spoke x1=${cx} y1=${cy} x2=${x.toFixed(1)} y2=${y.toFixed(1)}></line>`;
|
|
569
|
-
})}
|
|
570
|
-
<polygon shape points=${points}></polygon>
|
|
571
|
-
${axes.map((axis, index) => {
|
|
572
|
-
const [x, y] = at(index, clamp(axis.ratio));
|
|
573
|
-
return svg `<circle dot cx=${x.toFixed(1)} cy=${y.toFixed(1)} r="1.4"></circle>`;
|
|
574
|
-
})}
|
|
575
|
-
${axes.map((axis, index) => {
|
|
576
|
-
const [x, y] = at(index, 1.28);
|
|
577
|
-
const anchor = x < cx - 3 ? 'end' : x > cx + 3 ? 'start' : 'middle';
|
|
578
|
-
return svg `<text x=${x.toFixed(1)} y=${(y + 1.8).toFixed(1)} text-anchor=${anchor}>${i18next.t('figure.label.axis-' + axis.key + '-short')}</text>`;
|
|
579
|
-
})}
|
|
580
|
-
</svg>
|
|
581
|
-
`;
|
|
582
|
-
}
|
|
583
|
-
renderAxis(axis) {
|
|
584
|
-
const name = i18next.t('figure.label.axis-' + axis.key);
|
|
585
|
-
if (axis.blocked) {
|
|
586
|
-
return html `
|
|
587
|
-
<li blocked>
|
|
588
|
-
<span>${name}</span>
|
|
589
|
-
<span reading>${i18next.t('figure.text.not-measurable-yet')}</span>
|
|
590
|
-
<em>${i18next.t(axis.blocked)}</em>
|
|
591
|
-
</li>
|
|
592
|
-
`;
|
|
593
|
-
}
|
|
594
|
-
const ratio = Math.max(0, Math.min(1, axis.ratio ?? 0));
|
|
595
|
-
return html `
|
|
596
|
-
<li>
|
|
597
|
-
<span>${name}</span>
|
|
598
|
-
<span reading>${axis.readingKey ? i18next.t(axis.readingKey) : (axis.reading ?? '')}</span>
|
|
599
|
-
<div bar><i style="width:${Math.round(ratio * 100)}%"></i></div>
|
|
600
|
-
${axis.because ? html `<em>${i18next.t(axis.because)}</em>` : nothing}
|
|
601
|
-
</li>
|
|
602
|
-
`;
|
|
603
|
-
}
|
|
604
|
-
/** The budget bars. The one closest to its limit is coloured — it decided the grade. */
|
|
605
|
-
renderBudgets(report) {
|
|
606
|
-
const { score } = report;
|
|
607
|
-
return html `
|
|
608
|
-
<section>
|
|
609
|
-
<h3>${i18next.t('figure.label.budgets')}</h3>
|
|
610
|
-
<ul budgets>
|
|
611
|
-
${score.budgets.map(use => html `
|
|
612
|
-
<li>
|
|
613
|
-
<span>${i18next.t('figure.label.budget-' + use.key)}</span>
|
|
614
|
-
<span>${use.used.toLocaleString()} / ${limitOf(use)}</span>
|
|
615
|
-
<div bar><i ?tight=${use.key === score.tightest.key} style="width:${Math.round(Math.min(1, use.ratio) * 100)}%"></i></div>
|
|
616
|
-
</li>
|
|
617
|
-
`)}
|
|
618
|
-
</ul>
|
|
619
|
-
<p quiet>${i18next.t('figure.text.budgets-not-in-v3')}</p>
|
|
620
|
-
</section>
|
|
621
|
-
`;
|
|
622
|
-
}
|
|
623
|
-
renderMetrics(report) {
|
|
624
|
-
return html `
|
|
625
|
-
<section>
|
|
626
|
-
<h3>${i18next.t('figure.label.weight')}</h3>
|
|
627
|
-
<dl metrics>
|
|
628
|
-
<dt>${i18next.t('figure.label.triangles')}</dt>
|
|
629
|
-
<dd>${report.cost.triangles.toLocaleString()}</dd>
|
|
630
|
-
<dt>${i18next.t('figure.label.distinct-shapes')}</dt>
|
|
631
|
-
<dd>${report.distinctShapes}</dd>
|
|
632
|
-
<dt>${i18next.t('figure.label.distinct-materials')}</dt>
|
|
633
|
-
<dd>${report.distinctMaterials}</dd>
|
|
634
|
-
</dl>
|
|
635
|
-
</section>
|
|
636
|
-
`;
|
|
637
|
-
}
|
|
638
|
-
renderCurve() {
|
|
639
|
-
return html `
|
|
640
|
-
<section>
|
|
641
|
-
<h3>${i18next.t('figure.label.reuse-trend')}</h3>
|
|
642
|
-
<button expand @click=${() => (this.expanded = true)}>${i18next.t('figure.button.see-the-trend-chart')}</button>
|
|
643
|
-
</section>
|
|
644
|
-
`;
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* The trend at its own size: both axes logarithmic, the growing lines against the flat ones, and a
|
|
648
|
-
* legend with each line's value at the last count.
|
|
649
|
-
*/
|
|
650
|
-
renderSheet(report) {
|
|
651
|
-
if (!this.expanded)
|
|
652
|
-
return nothing;
|
|
653
|
-
const layout = curveLayout(report.curve);
|
|
654
|
-
if (!layout)
|
|
655
|
-
return nothing;
|
|
656
|
-
const { width, height, pad } = CURVE_SIZE;
|
|
657
|
-
const plotW = width - pad.left - pad.right;
|
|
658
|
-
const plotH = height - pad.top - pad.bottom;
|
|
659
|
-
const last = report.curve[report.curve.length - 1];
|
|
660
|
-
const label = (key) => i18next.t({
|
|
661
|
-
triangles: 'figure.label.triangles',
|
|
662
|
-
drawCalls: 'figure.label.draw-calls',
|
|
663
|
-
geometries: 'figure.label.vertex-buffers',
|
|
664
|
-
materials: 'figure.label.distinct-materials'
|
|
665
|
-
}[key]);
|
|
666
|
-
return html `
|
|
667
|
-
<div sheet @click=${() => (this.expanded = false)}>
|
|
668
|
-
<figure @click=${(e) => e.stopPropagation()}>
|
|
669
|
-
${svg `
|
|
670
|
-
<svg viewBox="0 0 ${width} ${height}" width=${width} height=${height} role="img">
|
|
671
|
-
<text x=${pad.left} y="22" font-size="13" font-weight="600">${i18next.t('figure.text.trend-chart-title')}</text>
|
|
672
|
-
<text x=${pad.left} y="38" muted>${i18next.t('figure.text.trend-chart-lead')}</text>
|
|
673
|
-
${layout.yTicks.map(tick => svg `
|
|
674
|
-
<line grid x1=${pad.left} y1=${tick.y.toFixed(1)} x2=${(pad.left + plotW).toFixed(1)} y2=${tick.y.toFixed(1)}></line>
|
|
675
|
-
<text muted x=${pad.left - 8} y=${(tick.y + 3.5).toFixed(1)} text-anchor="end">${tick.label}</text>
|
|
676
|
-
`)}
|
|
677
|
-
${layout.xTicks.map(tick => svg `
|
|
678
|
-
<line grid x1=${tick.x.toFixed(1)} y1=${pad.top} x2=${tick.x.toFixed(1)} y2=${(pad.top + plotH).toFixed(1)}></line>
|
|
679
|
-
<text muted x=${tick.x.toFixed(1)} y=${(pad.top + plotH + 16).toFixed(1)} text-anchor="middle">${tick.label}</text>
|
|
680
|
-
`)}
|
|
681
|
-
<text muted x=${(pad.left + plotW / 2).toFixed(1)} y=${height - 8} text-anchor="middle">${i18next.t('figure.label.instance-count')}</text>
|
|
682
|
-
${layout.lines.map(line => svg `<path series=${line.key} d=${line.d} stroke-dasharray=${line.dashed ? '3 7' : 'none'}></path>`)}
|
|
683
|
-
<g transform="translate(${width - pad.right + 14}, ${pad.top - 6})">
|
|
684
|
-
<text x="0" y="0" font-weight="600">${i18next.t('figure.text.trend-at-count', { n: shortNumber(last.instances) })}</text>
|
|
685
|
-
${layout.lines.map((line, i) => {
|
|
686
|
-
const y = 24 + i * 34;
|
|
687
|
-
return svg `
|
|
688
|
-
<line series=${line.key} x1="0" y1=${y - 4} x2="18" y2=${y - 4} stroke-width="2" stroke-dasharray=${line.dashed ? '3 7' : 'none'}></line>
|
|
689
|
-
<text x="24" y=${y}>${label(line.key)}</text>
|
|
690
|
-
<text series=${line.key} x="24" y=${y + 12} font-weight="600">
|
|
691
|
-
${line.last.toLocaleString()}${line.flat ? ` · ${i18next.t('figure.text.trend-stays')}` : ''}
|
|
692
|
-
</text>
|
|
693
|
-
`;
|
|
694
|
-
})}
|
|
695
|
-
${layout.overlap !== undefined
|
|
696
|
-
? svg `<text muted x="0" y=${24 + layout.lines.length * 34 + 6}>${i18next.t('figure.text.trend-flat-lines-overlap', { value: layout.overlap.toLocaleString() })}</text>`
|
|
697
|
-
: nothing}
|
|
698
|
-
</g>
|
|
699
|
-
</svg>
|
|
700
|
-
`}
|
|
701
|
-
<figcaption>
|
|
702
|
-
<button close @click=${() => (this.expanded = false)}>${i18next.t('figure.button.close')}</button>
|
|
703
|
-
</figcaption>
|
|
704
|
-
</figure>
|
|
705
|
-
</div>
|
|
706
|
-
`;
|
|
707
|
-
}
|
|
708
|
-
renderGate() {
|
|
709
|
-
const findings = this.inspection?.findings ?? [];
|
|
710
|
-
const blocking = findings.filter(finding => finding.blocking);
|
|
711
|
-
const advisory = findings.filter(finding => !finding.blocking);
|
|
712
|
-
return html `
|
|
713
|
-
<section>
|
|
714
|
-
<h3>${i18next.t('figure.label.release-verdict')}</h3>
|
|
715
|
-
${this.failure
|
|
716
|
-
? html `<p failed role="alert">${i18next.t('figure.text.verdict-not-received', { reason: this.failure })}</p>`
|
|
717
|
-
: !this.inspection
|
|
718
|
-
? html `<p quiet>${i18next.t(this.asking ? 'figure.text.verdict-asking' : 'figure.text.verdict-waiting')}</p>`
|
|
719
|
-
: blocking.length
|
|
720
|
-
? html `<p>${i18next.t('figure.text.cannot-release-now')}</p>`
|
|
721
|
-
: html `<p clear>${i18next.t('figure.text.nothing-blocks-release')}</p>`}
|
|
722
|
-
${blocking.length
|
|
723
|
-
? html `<ul gate>
|
|
724
|
-
<li head>${i18next.t('figure.text.must-fix-to-release')}</li>
|
|
725
|
-
${blocking.map(finding => renderGateFinding(finding, true, this.actionsFor(finding.code)))}
|
|
726
|
-
</ul>`
|
|
727
|
-
: nothing}
|
|
728
|
-
${advisory.length
|
|
729
|
-
? html `<ul gate>
|
|
730
|
-
<li head quiet>${i18next.t('figure.text.does-not-block')}</li>
|
|
731
|
-
${advisory.map(finding => renderGateFinding(finding, false))}
|
|
732
|
-
</ul>`
|
|
733
|
-
: nothing}
|
|
734
|
-
</section>
|
|
735
|
-
`;
|
|
736
|
-
}
|
|
737
|
-
/** The same way out the release panel offers for the same two findings — declare the space from the parts. */
|
|
738
|
-
actionsFor(code) {
|
|
739
|
-
if (code !== 'part-outside-occupancy' && code !== 'occupancy-undeclared')
|
|
740
|
-
return nothing;
|
|
741
|
-
/* A new figure with no parts is refused as undeclared too, but fitting needs parts to measure (seen 2026-09-24). */
|
|
742
|
-
if (!this.bodies)
|
|
743
|
-
return nothing;
|
|
744
|
-
return html `<button fit @click=${this.fit}>${i18next.t('figure.button.fit-base-to-parts')}</button>`;
|
|
745
|
-
}
|
|
746
|
-
};
|
|
747
|
-
__decorate([
|
|
748
|
-
property({ type: String }),
|
|
749
|
-
__metadata("design:type", String)
|
|
750
|
-
], FigureV3Verdict.prototype, "source", void 0);
|
|
751
|
-
__decorate([
|
|
752
|
-
property({ type: String }),
|
|
753
|
-
__metadata("design:type", String)
|
|
754
|
-
], FigureV3Verdict.prototype, "figureId", void 0);
|
|
755
|
-
__decorate([
|
|
756
|
-
property({ type: String }),
|
|
757
|
-
__metadata("design:type", String)
|
|
758
|
-
], FigureV3Verdict.prototype, "figureType", void 0);
|
|
759
|
-
__decorate([
|
|
760
|
-
state(),
|
|
761
|
-
__metadata("design:type", Object)
|
|
762
|
-
], FigureV3Verdict.prototype, "report", void 0);
|
|
763
|
-
__decorate([
|
|
764
|
-
state(),
|
|
765
|
-
__metadata("design:type", Object)
|
|
766
|
-
], FigureV3Verdict.prototype, "bodies", void 0);
|
|
767
|
-
__decorate([
|
|
768
|
-
state(),
|
|
769
|
-
__metadata("design:type", Object)
|
|
770
|
-
], FigureV3Verdict.prototype, "expanded", void 0);
|
|
771
|
-
__decorate([
|
|
772
|
-
state(),
|
|
773
|
-
__metadata("design:type", Object)
|
|
774
|
-
], FigureV3Verdict.prototype, "inspection", void 0);
|
|
775
|
-
__decorate([
|
|
776
|
-
state(),
|
|
777
|
-
__metadata("design:type", Object)
|
|
778
|
-
], FigureV3Verdict.prototype, "failure", void 0);
|
|
779
|
-
__decorate([
|
|
780
|
-
state(),
|
|
781
|
-
__metadata("design:type", Object)
|
|
782
|
-
], FigureV3Verdict.prototype, "asking", void 0);
|
|
783
|
-
FigureV3Verdict = __decorate([
|
|
784
|
-
customElement('figure-v3-verdict')
|
|
785
|
-
], FigureV3Verdict);
|
|
786
|
-
export { FigureV3Verdict };
|
|
787
|
-
//# sourceMappingURL=figure-v3-verdict.js.map
|