@things-factory/figure-ui 10.1.272 → 10.1.273
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/client/modeller/data-interface.ts +30 -18
- package/client/modeller/editor-styles.ts +17 -6
- package/client/modeller/editor.ts +2 -0
- package/client/modeller/fasten-form.ts +12 -2
- package/client/modeller/fasten-geometry.ts +5 -3
- package/client/modeller/figure-data-panel.ts +384 -200
- package/client/modeller/figure-fasten-drawing.ts +21 -13
- package/client/modeller/figure-links.ts +24 -9
- package/client/modeller/figure-parts.ts +7 -11
- package/client/modeller/figure-preview.ts +258 -76
- package/dist-client/modeller/clips.d.ts +1 -4
- package/dist-client/modeller/data-interface.d.ts +11 -8
- package/dist-client/modeller/data-interface.js +27 -17
- package/dist-client/modeller/data-interface.js.map +1 -1
- package/dist-client/modeller/editor-styles.js +17 -6
- package/dist-client/modeller/editor-styles.js.map +1 -1
- package/dist-client/modeller/editor.js +2 -0
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/fasten-form.d.ts +5 -0
- package/dist-client/modeller/fasten-form.js +8 -2
- package/dist-client/modeller/fasten-form.js.map +1 -1
- package/dist-client/modeller/fasten-geometry.d.ts +3 -2
- package/dist-client/modeller/fasten-geometry.js +5 -3
- package/dist-client/modeller/fasten-geometry.js.map +1 -1
- package/dist-client/modeller/figure-data-panel.d.ts +10 -19
- package/dist-client/modeller/figure-data-panel.js +382 -190
- package/dist-client/modeller/figure-data-panel.js.map +1 -1
- package/dist-client/modeller/figure-fasten-drawing.js +21 -13
- package/dist-client/modeller/figure-fasten-drawing.js.map +1 -1
- package/dist-client/modeller/figure-links.js +31 -16
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/figure-parts.js +7 -11
- package/dist-client/modeller/figure-parts.js.map +1 -1
- package/dist-client/modeller/figure-preview.d.ts +13 -0
- package/dist-client/modeller/figure-preview.js +257 -77
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/test/browser/editing-page.js +1 -1
- package/test/browser/links.check.mjs +30 -0
- package/test/browser/modeller.check.mjs +2 -2
- package/test/browser/parts-page.js +4 -0
- package/test/browser/parts.check.mjs +16 -10
- package/test/browser/screen-page.js +12 -1
- package/test/browser/screen.check.mjs +142 -11
- package/test/browser/serve-response.mjs +5 -2
- package/test/browser/side-panel-sweep.check.mjs +171 -10
- package/test/data-motion.test.ts +39 -8
- package/test/fasten-form.test.ts +25 -0
- package/test/fasten-geometry.test.ts +13 -0
- package/translations/en.json +23 -11
- package/translations/es.json +22 -10
- package/translations/ja.json +22 -10
- package/translations/ko.json +24 -12
- package/translations/ms.json +22 -10
- package/translations/zh.json +22 -10
|
@@ -73,22 +73,28 @@ export class FigureFastenDrawing extends localize(i18next)(LitElement) {
|
|
|
73
73
|
svg text {
|
|
74
74
|
font: inherit;
|
|
75
75
|
}
|
|
76
|
+
/*
|
|
77
|
+
The ways on one line, a small side view beside each word: three cards of a drawing over a word made the window
|
|
78
|
+
tall, and the fasten button below went off a laptop's screen (user 2026-11-12). The chosen one's gap is dragged
|
|
79
|
+
on its small view still; the gap's field is in the details.
|
|
80
|
+
*/
|
|
76
81
|
div[modes] {
|
|
77
|
-
display:
|
|
78
|
-
|
|
79
|
-
gap:
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
gap: 4px;
|
|
80
85
|
}
|
|
81
86
|
div[modes] svg {
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
flex: none;
|
|
88
|
+
width: 28px;
|
|
89
|
+
height: 20px;
|
|
84
90
|
}
|
|
85
91
|
/* A choice drawn, not a box to press (the side's rule: no boxed buttons): the chosen one on the primary's ground. */
|
|
86
92
|
div[modes] button {
|
|
87
|
-
display:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 4px;
|
|
96
|
+
padding: 2px 8px 2px 4px;
|
|
97
|
+
white-space: nowrap;
|
|
92
98
|
font: inherit;
|
|
93
99
|
color: var(--md-sys-color-on-surface);
|
|
94
100
|
background: none;
|
|
@@ -123,8 +129,8 @@ export class FigureFastenDrawing extends localize(i18next)(LitElement) {
|
|
|
123
129
|
border: 1px solid var(--md-sys-color-primary);
|
|
124
130
|
}
|
|
125
131
|
div[modes] button[on] {
|
|
126
|
-
background: var(--md-sys-color-primary-container);
|
|
127
|
-
color: var(--md-sys-color-on-primary-container);
|
|
132
|
+
background: var(--md-sys-color-primary-container, #d8e2ff);
|
|
133
|
+
color: var(--md-sys-color-on-primary-container, #001a41);
|
|
128
134
|
}
|
|
129
135
|
/* The box and the face seen from above side by side, one under the other where the window is narrow. */
|
|
130
136
|
div[face-row] {
|
|
@@ -333,7 +339,9 @@ export class FigureFastenDrawing extends localize(i18next)(LitElement) {
|
|
|
333
339
|
const { h, v, sign } = screenOf(view.axes)
|
|
334
340
|
const W = WHERE_W,
|
|
335
341
|
H = WHERE_H
|
|
336
|
-
|
|
342
|
+
/* Where the part is set, not where it is being dragged: the drawing's scale holds still under the pointer. */
|
|
343
|
+
const set = (a: Axis) => offsetOf(this.align[a], this.alignMm[a], view.face[a], view.part[a])
|
|
344
|
+
const span = (a: Axis) => drawingSpanOf(view.face[a], view.part[a], set(a))
|
|
337
345
|
const k = Math.min((W - 40) / span(h), (H - 40) / span(v))
|
|
338
346
|
this.scale = k
|
|
339
347
|
const cx = W / 2,
|
|
@@ -95,6 +95,17 @@ const freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as Figu
|
|
|
95
95
|
export class FigureLinks extends localize(i18next)(LitElement) {
|
|
96
96
|
private readonly help = new HelpToggles(this)
|
|
97
97
|
static styles = [SidePanelStyles, GroupMenuStyles, css`
|
|
98
|
+
/* A motion's delete and edit as icons at the line's end, their words in their titles: two word buttons took the line (user 2026-11-12). */
|
|
99
|
+
div[pair] > button[act][icon] {
|
|
100
|
+
flex: none;
|
|
101
|
+
width: var(--figure-control-height, 28px);
|
|
102
|
+
padding: 0;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
}
|
|
105
|
+
/* The size-by-state form folded under its summary, opened to add one. */
|
|
106
|
+
details[state-size-add][open] > summary {
|
|
107
|
+
margin-bottom: 6px;
|
|
108
|
+
}
|
|
98
109
|
:host {
|
|
99
110
|
display: block;
|
|
100
111
|
}
|
|
@@ -673,7 +684,7 @@ export class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
673
684
|
: { ...form, id: value }
|
|
674
685
|
}
|
|
675
686
|
const number = (key: 'min' | 'max' | 'atMin' | 'atMax') => (e: Event) => (this.stateSize = { ...form, axis, [key]: (e.target as HTMLInputElement).valueAsNumber })
|
|
676
|
-
return html`<h4 state-size>${i18next.t('figure.label.state-size')}</h4
|
|
687
|
+
return html`${sized.length ? html`<h4 state-size>${i18next.t('figure.label.state-size')}</h4>` : nothing}
|
|
677
688
|
${sized.map(({ axis: one, f }) => {
|
|
678
689
|
const k = measureFactor(asset, part, one)
|
|
679
690
|
const input = controls.find(c => c.id === f.input)
|
|
@@ -695,7 +706,10 @@ export class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
695
706
|
</div>`
|
|
696
707
|
})}
|
|
697
708
|
${free.length
|
|
698
|
-
?
|
|
709
|
+
? /* Folded until asked for: six lines of a form few parts use pushed the controls below it down (user 2026-11-12). */
|
|
710
|
+
html`<details state-size-add>
|
|
711
|
+
<summary>${i18next.t('figure.button.add-state-size')}</summary>
|
|
712
|
+
<div form state-size-form>
|
|
699
713
|
<span>${i18next.t('figure.label.state-size-measure')}</span>
|
|
700
714
|
<select ?disabled=${this.locked} @change=${(e: Event) => (this.stateSize = { ...form, axis: (e.target as HTMLSelectElement).value as Axis, atMax: NaN })}>
|
|
701
715
|
${free.map(one => html`<option value=${one} ?selected=${one === axis}>${word(one)}</option>`)}
|
|
@@ -724,7 +738,8 @@ export class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
724
738
|
if (!command) return
|
|
725
739
|
this.command(command)
|
|
726
740
|
this.stateSize = freshStateSize()
|
|
727
|
-
}}><md-icon>
|
|
741
|
+
}}><md-icon>add</md-icon>${i18next.t('figure.button.add')}</button>
|
|
742
|
+
</details>`
|
|
728
743
|
: nothing}`
|
|
729
744
|
}
|
|
730
745
|
|
|
@@ -850,14 +865,14 @@ export class FigureLinks extends localize(i18next)(LitElement) {
|
|
|
850
865
|
: nothing}
|
|
851
866
|
</span>
|
|
852
867
|
${count > 1
|
|
853
|
-
? html`<button act remove-axis ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: withoutAxis(joint, k) })}>
|
|
854
|
-
<md-icon>
|
|
868
|
+
? html`<button act icon remove-axis title=${i18next.t('figure.button.remove-axis')} aria-label=${i18next.t('figure.button.remove-axis')} ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: withoutAxis(joint, k) })}>
|
|
869
|
+
<md-icon>delete</md-icon>
|
|
855
870
|
</button>`
|
|
856
|
-
: html`<button act ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>
|
|
857
|
-
<md-icon>
|
|
871
|
+
: html`<button act icon title=${i18next.t('figure.button.remove-motion')} aria-label=${i18next.t('figure.button.remove-motion')} ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>
|
|
872
|
+
<md-icon>delete</md-icon>
|
|
858
873
|
</button>`}
|
|
859
|
-
<button act ?disabled=${this.locked || !joint} @click=${() => edit(k)}>
|
|
860
|
-
<md-icon>edit</md-icon
|
|
874
|
+
<button act icon title=${i18next.t('figure.button.change-motion')} aria-label=${i18next.t('figure.button.change-motion')} ?disabled=${this.locked || !joint} @click=${() => edit(k)}>
|
|
875
|
+
<md-icon>edit</md-icon>
|
|
861
876
|
</button>
|
|
862
877
|
</div>`
|
|
863
878
|
}
|
|
@@ -444,9 +444,10 @@ export class FigureParts extends localize(i18next)(LitElement) {
|
|
|
444
444
|
li[selected] div[ops] {
|
|
445
445
|
display: flex;
|
|
446
446
|
}
|
|
447
|
+
/* As tall as the eye beside the name: a chosen row is no taller than the others. */
|
|
447
448
|
div[ops] button {
|
|
448
449
|
display: flex;
|
|
449
|
-
padding:
|
|
450
|
+
padding: 1px;
|
|
450
451
|
color: inherit;
|
|
451
452
|
background: none;
|
|
452
453
|
border: none;
|
|
@@ -465,17 +466,12 @@ export class FigureParts extends localize(i18next)(LitElement) {
|
|
|
465
466
|
color: inherit;
|
|
466
467
|
}
|
|
467
468
|
/*
|
|
468
|
-
|
|
469
|
-
|
|
469
|
+
The chosen row keeps the height of the others, however narrow the list: its buttons stay beside the name, which is
|
|
470
|
+
cut short (its whole name is in the title and the panel's head). Going to a line of their own under 200 px
|
|
471
|
+
(2026-09-24), they pushed every row under it down as a part was chosen (user 2026-11-12).
|
|
470
472
|
*/
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
flex-wrap: wrap;
|
|
474
|
-
}
|
|
475
|
-
li[selected] div[ops] {
|
|
476
|
-
flex-basis: 100%;
|
|
477
|
-
justify-content: flex-end;
|
|
478
|
-
}
|
|
473
|
+
div[ops] {
|
|
474
|
+
flex: none;
|
|
479
475
|
}
|
|
480
476
|
p[quiet] {
|
|
481
477
|
margin: 0;
|