@things-factory/figure-ui 10.1.83 → 10.1.85
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/command-preview.ts +4 -2
- package/client/modeller/drawn-shapes.ts +29 -0
- package/client/modeller/editor.ts +17 -1
- package/client/modeller/figure-material-panel.ts +2 -3
- package/client/modeller/figure-parts.ts +13 -15
- package/client/modeller/figure-section-panel.ts +304 -0
- package/client/modeller/gizmo.ts +26 -16
- package/client/modeller/joint-fan.ts +4 -3
- package/client/modeller/links.ts +24 -24
- package/client/modeller/live.ts +8 -4
- package/client/modeller/maturity.ts +12 -6
- package/client/modeller/motion-ends.ts +2 -1
- package/client/modeller/refusals.ts +20 -0
- package/client/modeller/renderer.ts +3 -2
- package/client/modeller/section-controls.ts +115 -0
- package/client/modeller/starting-shape.ts +34 -0
- package/dist-client/modeller/command-preview.js +4 -2
- package/dist-client/modeller/command-preview.js.map +1 -1
- package/dist-client/modeller/drawn-shapes.d.ts +44 -0
- package/dist-client/modeller/drawn-shapes.js +12 -0
- package/dist-client/modeller/drawn-shapes.js.map +1 -0
- package/dist-client/modeller/editor.d.ts +3 -0
- package/dist-client/modeller/editor.js +16 -1
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-capability-panel.d.ts +1 -1
- package/dist-client/modeller/figure-clips.d.ts +1 -1
- package/dist-client/modeller/figure-controls.d.ts +1 -1
- package/dist-client/modeller/figure-links.d.ts +1 -1
- package/dist-client/modeller/figure-material-panel.d.ts +1 -1
- package/dist-client/modeller/figure-material-panel.js +2 -3
- package/dist-client/modeller/figure-material-panel.js.map +1 -1
- package/dist-client/modeller/figure-parts.d.ts +3 -2
- package/dist-client/modeller/figure-parts.js +7 -12
- package/dist-client/modeller/figure-parts.js.map +1 -1
- package/dist-client/modeller/figure-properties.d.ts +1 -1
- package/dist-client/modeller/figure-section-panel.d.ts +42 -0
- package/dist-client/modeller/figure-section-panel.js +289 -0
- package/dist-client/modeller/figure-section-panel.js.map +1 -0
- package/dist-client/modeller/gizmo.d.ts +3 -3
- package/dist-client/modeller/gizmo.js +24 -11
- package/dist-client/modeller/gizmo.js.map +1 -1
- package/dist-client/modeller/joint-fan.js +4 -3
- package/dist-client/modeller/joint-fan.js.map +1 -1
- package/dist-client/modeller/links.d.ts +4 -1
- package/dist-client/modeller/links.js +23 -25
- package/dist-client/modeller/links.js.map +1 -1
- package/dist-client/modeller/live.d.ts +3 -1
- package/dist-client/modeller/live.js +6 -3
- package/dist-client/modeller/live.js.map +1 -1
- package/dist-client/modeller/maturity.d.ts +3 -2
- package/dist-client/modeller/maturity.js +9 -6
- package/dist-client/modeller/maturity.js.map +1 -1
- package/dist-client/modeller/motion-ends.js +2 -1
- package/dist-client/modeller/motion-ends.js.map +1 -1
- package/dist-client/modeller/refusals.d.ts +0 -5
- package/dist-client/modeller/refusals.js +25 -0
- package/dist-client/modeller/refusals.js.map +1 -1
- package/dist-client/modeller/renderer.d.ts +3 -4
- package/dist-client/modeller/renderer.js +3 -2
- package/dist-client/modeller/renderer.js.map +1 -1
- package/dist-client/modeller/section-controls.d.ts +44 -0
- package/dist-client/modeller/section-controls.js +91 -0
- package/dist-client/modeller/section-controls.js.map +1 -0
- package/dist-client/modeller/starting-shape.d.ts +32 -0
- package/dist-client/modeller/starting-shape.js +37 -0
- package/dist-client/modeller/starting-shape.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/test/browser/acceptance-page.js +8 -0
- package/test/command-preview.test.ts +3 -2
- package/test/fixtures/joint-column.json +110 -15
- package/test/fixtures/joint-roller.json +66 -9
- package/test/fixtures/robot-arm-6dof.json +203 -27
- package/test/joint-fan.test.ts +10 -7
- package/test/links.test.ts +4 -4
- package/test/material.test.ts +7 -2
- package/test/palette-icons.test.ts +1 -1
- package/test/parts-wiring.test.ts +6 -2
- package/test/renderer.test.ts +2 -1
- package/test/resize-with-placement.test.ts +3 -3
- package/test/scene-canvas.test.ts +2 -1
- package/test/section-panel.test.ts +192 -0
- package/translations/en.json +24 -0
- package/translations/ja.json +24 -0
- package/translations/ko.json +24 -0
- package/translations/ms.json +24 -0
- package/translations/zh.json +24 -0
- package/dist-client/tsconfig.localkernel.tsbuildinfo +0 -1
|
@@ -14,6 +14,7 @@ import { drawableFigureParts } from './renderer.js';
|
|
|
14
14
|
import './canvas.js';
|
|
15
15
|
import './figure-parts.js';
|
|
16
16
|
import './figure-material-panel.js';
|
|
17
|
+
import './figure-section-panel.js';
|
|
17
18
|
import { faceHighlightOf, ghostPartsOf, previewWordsOf, rowWordsOf } from './command-preview.js';
|
|
18
19
|
import { motionEndsOf } from './motion-ends.js';
|
|
19
20
|
import './figure-links.js';
|
|
@@ -37,6 +38,7 @@ import { fieldWordsOf, followOf, measureNow, partSummaryOf, instanceRangeOf, ins
|
|
|
37
38
|
import { jointFanOf } from './joint-fan.js';
|
|
38
39
|
import { jointDragOf } from './joint-drag.js';
|
|
39
40
|
import { liveOverSession, NOTHING_LIVE, scrubbed, scrubStep } from './live.js';
|
|
41
|
+
import { startingShapeKindOfBody } from './starting-shape.js';
|
|
40
42
|
/** Product editor surface. The injected session is shared by page persistence and AI commands. */
|
|
41
43
|
let FigureEditor = class FigureEditor extends LitElement {
|
|
42
44
|
constructor() {
|
|
@@ -691,6 +693,11 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
691
693
|
hold(values, edit) {
|
|
692
694
|
this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) };
|
|
693
695
|
}
|
|
696
|
+
/** A command in hand, drawn and not run; `null` lets go of it and the figure as it stands is drawn again. */
|
|
697
|
+
holdAction(action) {
|
|
698
|
+
const { action: _, ...rest } = this.live;
|
|
699
|
+
this.live = action ? { ...rest, action } : rest;
|
|
700
|
+
}
|
|
694
701
|
changed() {
|
|
695
702
|
this.requestUpdate();
|
|
696
703
|
this.dispatchEvent(new CustomEvent('changed', { bubbles: true, composed: true }));
|
|
@@ -1162,6 +1169,8 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1162
1169
|
}
|
|
1163
1170
|
/** One command, one step of the history. A refusal a person can meet here is said in their words. */
|
|
1164
1171
|
linkCommand(action) {
|
|
1172
|
+
/* Committed or refused, a command in hand is let go of: the figure as it stands is drawn again. */
|
|
1173
|
+
this.holdAction(null);
|
|
1165
1174
|
this.retry = undefined;
|
|
1166
1175
|
this.notice = '';
|
|
1167
1176
|
const hadSize = this.hasSize();
|
|
@@ -1368,7 +1377,7 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
1368
1377
|
}
|
|
1369
1378
|
rows.set(id, {
|
|
1370
1379
|
id,
|
|
1371
|
-
|
|
1380
|
+
kind: startingShapeKindOfBody(g.shape) ?? '',
|
|
1372
1381
|
hidden: this.hiddenParts.has(id),
|
|
1373
1382
|
invisible: g.visible === false,
|
|
1374
1383
|
...(id !== g.id ? { copies: 1 } : {}),
|
|
@@ -2047,6 +2056,12 @@ let FigureEditor = class FigureEditor extends LitElement {
|
|
|
2047
2056
|
${this.renderGroups(this.withSizeRow(groupFields(partFields, this.selected), held), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable), held)}
|
|
2048
2057
|
${roomFields.length ? this.renderRoomOnly(roomFields, unavailable) : nothing}
|
|
2049
2058
|
${this.renderLinks(unavailable, 'shape')}
|
|
2059
|
+
<figure-section-panel
|
|
2060
|
+
.body=${{ ...part, id: this.selected }}
|
|
2061
|
+
?locked=${unavailable}
|
|
2062
|
+
@command=${(e) => this.linkCommand(e.detail.action)}
|
|
2063
|
+
@command-live=${(e) => this.holdAction(e.detail.action)}
|
|
2064
|
+
></figure-section-panel>
|
|
2050
2065
|
<figure-material-panel
|
|
2051
2066
|
.body=${{ ...part, id: this.selected }}
|
|
2052
2067
|
.palette=${view.palette ?? {}}
|