@things-factory/figure-ui 10.1.225 → 10.1.226
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/consumer-capabilities.ts +15 -0
- package/client/modeller/editor-styles.ts +18 -1
- package/client/modeller/editor.ts +38 -26
- package/client/modeller/figure-capability-panel.ts +31 -10
- package/client/modeller/figure-clips.ts +2 -1
- package/client/modeller/figure-controls.ts +4 -3
- package/client/modeller/figure-data-panel.ts +24 -7
- package/client/modeller/figure-links.ts +5 -5
- package/client/modeller/figure-material-panel.ts +2 -0
- package/client/modeller/figure-preview.ts +69 -2
- package/client/modeller/figure-recipe-catalog.ts +4 -0
- package/client/modeller/figure-slot-layout-panel.ts +25 -8
- package/client/modeller/figure-verdict.ts +4 -1
- package/client/modeller/unit-words.ts +11 -0
- package/client/pages/figure-modeller-page.ts +3 -2
- package/dist-client/modeller/consumer-capabilities.d.ts +11 -0
- package/dist-client/modeller/consumer-capabilities.js +14 -0
- package/dist-client/modeller/consumer-capabilities.js.map +1 -1
- package/dist-client/modeller/editor-styles.js +18 -1
- package/dist-client/modeller/editor-styles.js.map +1 -1
- package/dist-client/modeller/editor.js +38 -26
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-capability-panel.d.ts +3 -0
- package/dist-client/modeller/figure-capability-panel.js +29 -11
- package/dist-client/modeller/figure-capability-panel.js.map +1 -1
- package/dist-client/modeller/figure-clips.js +2 -1
- package/dist-client/modeller/figure-clips.js.map +1 -1
- package/dist-client/modeller/figure-controls.js +4 -3
- package/dist-client/modeller/figure-controls.js.map +1 -1
- package/dist-client/modeller/figure-data-panel.js +24 -7
- package/dist-client/modeller/figure-data-panel.js.map +1 -1
- package/dist-client/modeller/figure-links.js +5 -5
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/figure-material-panel.js +2 -0
- package/dist-client/modeller/figure-material-panel.js.map +1 -1
- package/dist-client/modeller/figure-preview.d.ts +3 -0
- package/dist-client/modeller/figure-preview.js +78 -2
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/modeller/figure-recipe-catalog.js +4 -0
- package/dist-client/modeller/figure-recipe-catalog.js.map +1 -1
- package/dist-client/modeller/figure-slot-layout-panel.d.ts +1 -1
- package/dist-client/modeller/figure-slot-layout-panel.js +25 -8
- package/dist-client/modeller/figure-slot-layout-panel.js.map +1 -1
- package/dist-client/modeller/figure-verdict.js +4 -1
- package/dist-client/modeller/figure-verdict.js.map +1 -1
- package/dist-client/modeller/unit-words.d.ts +5 -0
- package/dist-client/modeller/unit-words.js +12 -0
- package/dist-client/modeller/unit-words.js.map +1 -0
- package/dist-client/pages/figure-modeller-page.js +3 -2
- package/dist-client/pages/figure-modeller-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/test/browser/editing-page.js +3 -3
- package/test/browser/editing.check.mjs +5 -5
- package/test/browser/links-page.js +1 -1
- package/test/browser/links.check.mjs +2 -3
- package/test/browser/modeller-page.js +4 -4
- package/test/browser/modeller-revision.check.mjs +5 -5
- package/test/browser/modeller.check.mjs +5 -5
- package/test/browser/parts.check.mjs +2 -2
- package/test/browser/product-page.check.mjs +6 -0
- package/test/browser/props.check.mjs +3 -4
- package/test/browser/row-preview.check.mjs +3 -3
- package/test/browser/screen.check.mjs +13 -11
- package/test/consumer-capabilities.test.ts +7 -0
- package/test/links.test.ts +1 -1
- package/test/refusals.test.ts +1 -1
- package/translations/en.json +23 -12
- package/translations/es.json +23 -12
- package/translations/ja.json +24 -13
- package/translations/ko.json +82 -71
- package/translations/ms.json +23 -12
- package/translations/zh.json +23 -12
|
@@ -2,6 +2,8 @@ var FigureEditor_1;
|
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
3
|
import { LitElement, html, nothing } from 'lit';
|
|
4
4
|
import { i18next } from '@operato/i18n';
|
|
5
|
+
import { isMacOS } from '@operato/utils';
|
|
6
|
+
import { unitWord } from './unit-words.js';
|
|
5
7
|
import '@operato/layout';
|
|
6
8
|
import { openPopup } from '@operato/layout';
|
|
7
9
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
@@ -893,6 +895,14 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
893
895
|
<summary><h3>${i18next.t('figure.label.group-more')}</h3></summary>
|
|
894
896
|
<div more-body>
|
|
895
897
|
${tools ? html `<div group-fields>${tools}</div>` : nothing}
|
|
898
|
+
<figure-material-panel
|
|
899
|
+
show="more"
|
|
900
|
+
.body=${{ ...part, id: this.selected }}
|
|
901
|
+
.palette=${palette}
|
|
902
|
+
?locked=${unavailable}
|
|
903
|
+
@part-edit=${(e) => this.run(() => this.session.edit(e.detail.edit))}
|
|
904
|
+
@part-live=${(e) => this.hold({}, e.detail.edit)}
|
|
905
|
+
></figure-material-panel>
|
|
896
906
|
<figure-section-panel
|
|
897
907
|
embedded
|
|
898
908
|
.body=${{ ...part, id: this.selected }}
|
|
@@ -904,14 +914,6 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
904
914
|
@command-live=${(e) => this.holdAction(e.detail.action)}
|
|
905
915
|
@section-editor-open=${() => (this.sectionEditing = this.selected)}
|
|
906
916
|
></figure-section-panel>
|
|
907
|
-
<figure-material-panel
|
|
908
|
-
show="more"
|
|
909
|
-
.body=${{ ...part, id: this.selected }}
|
|
910
|
-
.palette=${palette}
|
|
911
|
-
?locked=${unavailable}
|
|
912
|
-
@part-edit=${(e) => this.run(() => this.session.edit(e.detail.edit))}
|
|
913
|
-
@part-live=${(e) => this.hold({}, e.detail.edit)}
|
|
914
|
-
></figure-material-panel>
|
|
915
917
|
</div>
|
|
916
918
|
</details>
|
|
917
919
|
</section>`;
|
|
@@ -1165,7 +1167,7 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1165
1167
|
return html `<section board-size>
|
|
1166
1168
|
${title('figure.text.board-size-range-explained')}
|
|
1167
1169
|
${['x', 'y', 'z'].map(axis => html `<div inline-field>
|
|
1168
|
-
<label>${i18next.t('figure.label.resize-' + axis)} <span unit>mm</span></label>
|
|
1170
|
+
<label>${i18next.t('figure.label.resize-' + axis)} <span unit>(mm)</span></label>
|
|
1169
1171
|
<div pair range>
|
|
1170
1172
|
${['min', 'max'].map((bound, i) => html `${i ? html `<span dash aria-hidden="true">–</span>` : nothing}<input
|
|
1171
1173
|
aria-label=${`size.${axis}.${bound}`}
|
|
@@ -1297,7 +1299,7 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1297
1299
|
<div inline-field><label>${i18next.t('figure.label.repeat-axis')}</label>${axes.length ? html `<select aria-label=${i18next.t('figure.label.repeat-axis')} ?disabled=${unavailable} .value=${live(axis)} @change=${(e) => update({ axis: e.target.value.toUpperCase() })}>${axes.map(a => html `<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}</select>` : html `<span value>${axis.toUpperCase()}</span>`}</div>
|
|
1298
1300
|
<div inline-field><label>${i18next.t('figure.label.repeat-count')}</label>${!fits && record ? html `<input type="number" min="1" step="1" aria-label=${i18next.t('figure.label.repeat-count')} .value=${live(String(repeat.count))} ?disabled=${unavailable} @change=${(e) => update({ count: e.target.valueAsNumber })}>` : html `<span value>${repeat.count}</span>`}</div>
|
|
1299
1301
|
<div inline-field>
|
|
1300
|
-
<label>${i18next.t('figure.label.repeat-gap')} <span unit>mm</span></label>
|
|
1302
|
+
<label>${i18next.t('figure.label.repeat-gap')} <span unit>(mm)</span></label>
|
|
1301
1303
|
${fits ? html `<input
|
|
1302
1304
|
type="number"
|
|
1303
1305
|
step="any"
|
|
@@ -1391,8 +1393,8 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1391
1393
|
</label>
|
|
1392
1394
|
${open
|
|
1393
1395
|
? html `<div inline-field><label>${i18next.t('figure.label.board-name')}</label><input aria-label="figure.label.board-name" .value=${form.label} @change=${edit('label')} /></div>
|
|
1394
|
-
<div inline-field><label>${i18next.t('figure.label.least')} <span unit>mm</span></label><input type="number" step="any" aria-label="figure.label.least" .value=${String(form.min)} @change=${edit('min')} /></div>
|
|
1395
|
-
<div inline-field><label>${i18next.t('figure.label.most')} <span unit>mm</span></label><input type="number" step="any" aria-label="figure.label.most" .value=${String(form.max)} @change=${edit('max')} /></div>
|
|
1396
|
+
<div inline-field><label>${i18next.t('figure.label.least')} <span unit>(mm)</span></label><input type="number" step="any" aria-label="figure.label.least" .value=${String(form.min)} @change=${edit('min')} /></div>
|
|
1397
|
+
<div inline-field><label>${i18next.t('figure.label.most')} <span unit>(mm)</span></label><input type="number" step="any" aria-label="figure.label.most" .value=${String(form.max)} @change=${edit('max')} /></div>
|
|
1396
1398
|
<button act publish-pitch ?disabled=${unavailable || !form.label.trim()} @click=${() => run(steps())}>
|
|
1397
1399
|
<md-icon>${listed ? 'check' : 'ios_share'}</md-icon>${i18next.t(listed ? 'figure.button.apply' : 'figure.button.publish-input')}
|
|
1398
1400
|
</button>`
|
|
@@ -1627,9 +1629,12 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1627
1629
|
}
|
|
1628
1630
|
/** A side tab says what it is in words under its icon: the icons alone had to be learnt (designer 2026-09-27, U05). */
|
|
1629
1631
|
renderTab(tab, icon, label) {
|
|
1630
|
-
/*
|
|
1631
|
-
|
|
1632
|
-
|
|
1632
|
+
/*
|
|
1633
|
+
Its accessible name is the name it shows (designer 2026-09-27); the longer title stays as its tooltip. One name
|
|
1634
|
+
whatever is picked: the size tab was 「반응형」 with nothing picked and 「배치」 with a part (sweep 2026-10-27 J2).
|
|
1635
|
+
*/
|
|
1636
|
+
const name = i18next.t('figure.label.tab-short-' + tab);
|
|
1637
|
+
return html `<button tab ?on=${this.tab === tab} title=${label} aria-label=${name} @click=${() => (this.tab = tab)}>
|
|
1633
1638
|
<md-icon>${icon}</md-icon><span tab-label aria-hidden="true">${name}</span>
|
|
1634
1639
|
</button>`;
|
|
1635
1640
|
}
|
|
@@ -1727,7 +1732,13 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1727
1732
|
${i18next.t(kind === 'box' ? 'figure.label.primitive-cube' : `figure.label.primitive-${kind}`)}
|
|
1728
1733
|
</button>`)}
|
|
1729
1734
|
</div>
|
|
1730
|
-
|
|
1735
|
+
${this.panes?.foldStart
|
|
1736
|
+
? /* The list it points to is folded at this width: a way to it, not words about a list not there (sweep 2026-10-27 U23). */
|
|
1737
|
+
html `<button start-more @click=${() => {
|
|
1738
|
+
this.panes.foldStart = false;
|
|
1739
|
+
this.requestUpdate();
|
|
1740
|
+
}}>${i18next.t('figure.button.start-shape-more')}</button>`
|
|
1741
|
+
: html `<small>${i18next.t('figure.text.start-shape-more')}</small>`}
|
|
1731
1742
|
</section>
|
|
1732
1743
|
${this.aiDraft
|
|
1733
1744
|
? html `<section>
|
|
@@ -1735,7 +1746,6 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1735
1746
|
<button start-button start-ai @click=${() => this.dispatchEvent(new CustomEvent('ask-ai-draft', { bubbles: true, composed: true }))}>
|
|
1736
1747
|
${i18next.t('figure.button.start-ai')}
|
|
1737
1748
|
</button>
|
|
1738
|
-
<small>${i18next.t('figure.text.start-ai-optional')}</small>
|
|
1739
1749
|
</section>`
|
|
1740
1750
|
: nothing}
|
|
1741
1751
|
</div>
|
|
@@ -1820,8 +1830,8 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1820
1830
|
return html `<ox-canvas-bar
|
|
1821
1831
|
history
|
|
1822
1832
|
fit
|
|
1823
|
-
undo-shortcut
|
|
1824
|
-
redo-shortcut
|
|
1833
|
+
undo-shortcut=${isMacOS() ? '⌘Z' : 'Ctrl+Z'}
|
|
1834
|
+
redo-shortcut=${isMacOS() ? '⇧⌘Z' : 'Ctrl+Y'}
|
|
1825
1835
|
?can-undo=${!unavailable && view.canUndo}
|
|
1826
1836
|
?can-redo=${!unavailable && view.canRedo}
|
|
1827
1837
|
.pane=${this.panes}
|
|
@@ -1851,7 +1861,7 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1851
1861
|
>
|
|
1852
1862
|
<md-icon>publish</md-icon>${i18next.t('figure.button.release')}
|
|
1853
1863
|
</button>
|
|
1854
|
-
<button slot="commit" save ?disabled=${unavailable || (!view.dirty && !!view.id)} @click=${this.save}><md-icon>save</md-icon>${i18next.t('figure.button.save')}</button>
|
|
1864
|
+
<button slot="commit" save title=${!view.id && !view.geometry.length ? i18next.t('figure.text.save-needs-a-part') : ''} ?disabled=${unavailable || (!view.dirty && !!view.id) || (!view.id && !view.geometry.length)} @click=${this.save}><md-icon>save</md-icon>${i18next.t('figure.button.save')}</button>
|
|
1855
1865
|
</ox-canvas-bar>
|
|
1856
1866
|
${this.blockersOpen && blockers.length ? this.renderReleaseBlockers(blockers, asset) : nothing}
|
|
1857
1867
|
${this.catalogOpen
|
|
@@ -1941,7 +1951,7 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1941
1951
|
${this.renderTab('motion', 'animation', i18next.t('figure.label.motion'))}
|
|
1942
1952
|
${this.renderTab('capability', 'conveyor_belt', i18next.t('figure.label.tab-capability'))}
|
|
1943
1953
|
${this.renderTab('data', 'sensors', i18next.t('figure.label.tab-data'))}
|
|
1944
|
-
${this.renderTab('verdict', 'insights', i18next.t('figure.label.
|
|
1954
|
+
${this.renderTab('verdict', 'insights', i18next.t('figure.label.tab-verdict'))}
|
|
1945
1955
|
</div>
|
|
1946
1956
|
<slot name="notice"></slot>
|
|
1947
1957
|
<div panel ?off=${tab !== 'properties'}>
|
|
@@ -2064,17 +2074,18 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
2064
2074
|
return v === undefined || !Number.isFinite(v) ? '—' : String(Math.round(v * 10) / 10);
|
|
2065
2075
|
};
|
|
2066
2076
|
return html `<div vector-row>
|
|
2067
|
-
<label>${i18next.t('figure.label.group-' + group.name)}${group.name === 'rotation' ? '' : html ` <span unit
|
|
2077
|
+
<label>${i18next.t('figure.label.group-' + group.name)}${group.name === 'rotation' ? '' : html ` <span unit>(${unit})</span>`}</label>
|
|
2068
2078
|
<div triple>
|
|
2069
2079
|
${['x', 'y', 'z'].map(axis => !group.cells[axis]
|
|
2070
2080
|
? html `<div cell held title=${i18next.t('figure.text.axis-held-by-rule')}>
|
|
2071
2081
|
<span axis>${axis.toUpperCase()}</span>
|
|
2072
|
-
<input type="text" readonly .value=${given(axis)} aria-label=${`${group.name}
|
|
2082
|
+
<input type="text" readonly .value=${given(axis)} data-field=${`${group.name}.${axis}`} aria-label=${`${i18next.t('figure.label.group-' + group.name)} ${axis.toUpperCase()} · ${i18next.t('figure.text.axis-held-by-rule')}`} />
|
|
2073
2083
|
</div>`
|
|
2074
2084
|
: html `<div cell>
|
|
2075
2085
|
<span axis ?scrub=${!unavailable} @pointerdown=${(e) => this.scrub(group.cells[axis], e, unavailable)}>${axis.toUpperCase()}</span>
|
|
2076
2086
|
<input
|
|
2077
|
-
|
|
2087
|
+
data-field=${group.cells[axis].id}
|
|
2088
|
+
aria-label=${`${i18next.t('figure.label.group-' + group.name)} ${axis.toUpperCase()}`}
|
|
2078
2089
|
type="number"
|
|
2079
2090
|
step="any"
|
|
2080
2091
|
.value=${String(group.cells[axis].value)}
|
|
@@ -2110,9 +2121,10 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
2110
2121
|
}
|
|
2111
2122
|
renderSingle(name, field, unavailable) {
|
|
2112
2123
|
const words = name.split('.').map(part => i18next.t('figure.label.field-' + part, { defaultValue: part }));
|
|
2113
|
-
return html `<span ?scrub=${!unavailable} @pointerdown=${(e) => this.scrub(field, e, unavailable)}>${words.join(' · ')} (${field.unit})</span
|
|
2124
|
+
return html `<span ?scrub=${!unavailable} @pointerdown=${(e) => this.scrub(field, e, unavailable)}>${words.join(' · ')} (${unitWord(field.unit)})</span
|
|
2114
2125
|
><input
|
|
2115
|
-
|
|
2126
|
+
data-field=${field.id}
|
|
2127
|
+
aria-label=${words.join(' · ')}
|
|
2116
2128
|
type="number"
|
|
2117
2129
|
step="any"
|
|
2118
2130
|
.value=${String(field.value)}
|