@things-factory/figure-ui 10.1.222 → 10.1.224
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/canvas.ts +2 -2
- package/client/modeller/consumer-capabilities.ts +66 -0
- package/client/modeller/data-interface.ts +230 -80
- package/client/modeller/editor.ts +14 -7
- package/client/modeller/figure-capability-panel.ts +145 -1
- package/client/modeller/figure-data-panel.ts +495 -188
- package/client/modeller/figure-links.ts +130 -12
- package/client/modeller/figure-preview.ts +19 -2
- package/client/modeller/figure-slot-layout-panel.ts +7 -3
- package/client/modeller/links.ts +58 -0
- package/client/modeller/refusals.ts +12 -4
- package/client/modeller/slot-layout-host.ts +76 -5
- package/dist-client/modeller/canvas.js +2 -2
- package/dist-client/modeller/canvas.js.map +1 -1
- package/dist-client/modeller/consumer-capabilities.d.ts +29 -0
- package/dist-client/modeller/consumer-capabilities.js +60 -0
- package/dist-client/modeller/consumer-capabilities.js.map +1 -0
- package/dist-client/modeller/data-interface.d.ts +83 -17
- package/dist-client/modeller/data-interface.js +194 -82
- package/dist-client/modeller/data-interface.js.map +1 -1
- package/dist-client/modeller/editor.d.ts +5 -2
- package/dist-client/modeller/editor.js +16 -5
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-capability-panel.d.ts +12 -0
- package/dist-client/modeller/figure-capability-panel.js +123 -1
- package/dist-client/modeller/figure-capability-panel.js.map +1 -1
- package/dist-client/modeller/figure-data-panel.d.ts +57 -13
- package/dist-client/modeller/figure-data-panel.js +461 -180
- package/dist-client/modeller/figure-data-panel.js.map +1 -1
- package/dist-client/modeller/figure-links.d.ts +11 -0
- package/dist-client/modeller/figure-links.js +137 -16
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/figure-preview.d.ts +4 -0
- package/dist-client/modeller/figure-preview.js +19 -1
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/modeller/figure-slot-layout-panel.js +6 -4
- package/dist-client/modeller/figure-slot-layout-panel.js.map +1 -1
- package/dist-client/modeller/links.d.ts +22 -0
- package/dist-client/modeller/links.js +48 -0
- package/dist-client/modeller/links.js.map +1 -1
- package/dist-client/modeller/refusals.js +14 -6
- package/dist-client/modeller/refusals.js.map +1 -1
- package/dist-client/modeller/slot-layout-host.d.ts +28 -3
- package/dist-client/modeller/slot-layout-host.js +68 -6
- package/dist-client/modeller/slot-layout-host.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/test/browser/data-table-page.js +9 -0
- package/test/browser/links.check.mjs +25 -3
- package/test/consumer-capabilities.test.ts +116 -0
- package/test/data-motion.test.ts +94 -27
- package/test/links.test.ts +15 -0
- package/test/slot-layout-host.test.ts +63 -5
- package/translations/en.json +81 -23
- package/translations/es.json +81 -23
- package/translations/ja.json +81 -23
- package/translations/ko.json +81 -23
- package/translations/ms.json +81 -23
- package/translations/zh.json +81 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figure-links.js","sourceRoot":"","sources":["../../client/modeller/figure-links.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAClD,OAAO,+BAA+B,CAAA;AACtC,OAAO,yBAAyB,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAG1F,OAAO,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,SAAS,EACT,eAAe,EACf,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,W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B,KAAK,EAAE;;4CAAqB;AACZ;IAAhB,KAAK,EAAE;;2CAA2C;AAClC;IAAhB,KAAK,EAAE;;0CAA6B;AAEpB;IAAhB,KAAK,EAAE;;6CAAkC;AACzB;IAAhB,KAAK,EAAE;;wCAAyB;AAEhB;IAAhB,KAAK,EAAE;;kDAA8B;AAErB;IAAhB,KAAK,EAAE;;+CAAuB;AArHpB,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAotBvB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport '@operato/input/ox-input-select-buttons.js'\nimport './figure-slot-layout-panel.js'\nimport './figure-size-editor.js'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { figureFaceOverhangOf, figureMotionsOf, motionIdOf } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureAuthoringAction, FigureFace } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n AXES,\n canFasten,\n canFollow,\n positionIsShare,\n heldBy,\n shownWhenOf,\n visibilityControlsOf,\n fasteningOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionFormRefusalOf,\n endPlaceKeyOf,\n motionJoint,\n controlIdFor,\n withoutAxis,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n rowBlockOf,\n fixedJointOf,\n rowOf,\n positionsWorkedOut,\n type Axis,\n type MotionForm\n} from './links.js'\nimport { SidePanelStyles } from '@things-factory/figure-viewer/dist-client/side-panel-styles.js'\nimport { insideAlignmentOf } from './fasten-geometry.js'\nimport { fastenFormOf, fastenPlanOf, fastenSentenceOf } from './fasten-form.js'\nimport type { FigureRevision } from './revision.js'\nimport { HelpToggles } from './help.js'\nimport { groupMenu, GroupMenuStyles } from './group-menu.js'\nimport { jointAxisWord } from './joint-axis.js'\nimport { placeTerms } from '@things-factory/figure-viewer/dist-client/detail-facts.js'\n\nconst freshMotion = (): MotionForm => ({ kind: 'slide', axis: 'x', id: '', min: 0, max: 500, follow: '', multiplier: 1, offset: 0, travel: '', travelPlus: 0 })\nconst freshRow = () => ({ axis: '' as Axis | '', pitch: 200, fills: true, count: 5 })\nconst freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as FigureFace, label: '', accepts: '', capacity: 1 })\n\n/**\n * What a part is tied to — its size response, what it is fastened to, how it moves.\n *\n * 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets\n * a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that\n * happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the\n * parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.\n *\n * The sections are dimensions, placement and joint, in that order. Every\n * change is one figure-model authoring command, sent as `command` and run by the editor through the session — one\n * step of the undo history. The fastening is said here in one line; it is chosen in the fastening window\n * (`figure-fasten-dialog.ts`), which the editor opens when this asks (`fasten-open`). Choices the command would refuse (a round body fastened, a size following an instance\n * size the figure does not declare) are not offered, so the author is not sent into a refusal.\n */\n@customElement('figure-links')\nexport class FigureLinks extends localize(i18next)(LitElement) {\n private readonly help = new HelpToggles(this)\n static styles = [SidePanelStyles, GroupMenuStyles, css`\n :host {\n display: block;\n }\n /* A group's sub-question, under its title: quieter than the title, as a label is. */\n p[group-question] {\n margin: 4px 0 0;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The fastening a part has, in one line, and 「바꾸기」 at its end. */\n div[fastened-summary] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n div[fastened-summary] > p {\n flex: 1;\n margin: 0;\n }\n /* Opening the form is an action: the primary colour, at the line's end. */\n div[fastened-summary] > button[act] {\n flex: none;\n margin: 0 -6px 0 0;\n }\n /* The measure's name, then its rule: X, or a cylinder's 반지름 · 길이, on one line. */\n div[row] > b {\n white-space: nowrap;\n }\n div[row] {\n display: grid;\n grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);\n gap: 6px;\n align-items: center;\n }\n b[bound] {\n font-weight: 600;\n }\n /* What each direction does now: read-only rows. */\n div[resize-now] { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 8px; margin: 12px 0; }\n div[resize-now] div[row] { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }\n div[resize-now] span[measure] { font-variant-numeric: tabular-nums; }\n /* Size behaviour is a choice about dimensions only. It never implies a placement or a fastening. */\n /* One of the size group's rows: the group's gap spaces it, as it does the rest (a margin on top of it left a hole). */\n details[resize-choice] { margin: 0; padding: 0; border: 0; }\n details[resize-choice] > div { display: grid; gap: 8px; padding: 8px 0; }\n p[fasten-mode] { margin: 0; font-weight: 600; }\n details { margin-top: 8px; }\n details[row-fold] { margin: 0; }\n details[row-fold] > summary { padding: 0; color: var(--md-sys-color-on-surface); }\n details[row-fold] > summary h3 { margin: 0; flex: 1; }\n details[row-fold][open] > summary { margin-bottom: 8px; }\n /* What the command would do, said beside the result drawn on the canvas. */\n ul[preview-words] { margin: 8px 0; padding: 8px 12px 8px 26px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); display: grid; gap: 4px; }\n p[preview-words] { margin: 8px 0; padding: 8px 12px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); }\n div[overhang] { display: grid; gap: 6px; margin: 8px 0; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--md-sys-color-outline-variant, #8884); }\n div[overhang] p { margin: 0; }\n ul[detach-words] { margin: 4px 0 10px; padding-left: 20px; display: grid; gap: 2px; }\n /* The difference a following measure keeps: under its choice, on the same line as its words. */\n label[inline-plus] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n label[inline-plus] input {\n flex: 1;\n min-width: 0;\n }\n `]\n\n /** The figure at the version on screen. */\n @property({ attribute: false }) revision?: FigureRevision\n private get asset(): FigureAsset | undefined {\n return this.revision?.asset\n }\n /** The selected part. */\n @property() partId = ''\n @property({ type: Boolean }) locked = false\n /** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */\n @property() section: 'shape' | 'response' | 'places' | 'motion' = 'shape'\n /**\n * Its tab is the one shown, and no window over it speaks instead. The response's row speaks of what a command would\n * draw, and the properties' says there is none: only the one in sight may, as the hidden one's silence would clear what\n * the shown one draws. While the fastening window is open it alone speaks (the editor sets this false).\n */\n @property({ type: Boolean }) active = true\n /** What the row's command would do, in words (the editor works it out: `command-preview.ts`). */\n @property({ attribute: false }) previewWords: string[] = []\n /** Where the selected part's motion takes it, at both ends of its range (the editor draws them on the canvas). */\n @property({ attribute: false }) motionEnds: { control: string; min: number; max: number; unit: string } | null = null\n /** Past the edge of the face it is fastened to, or parts fastened to it past theirs (ADR-0097 §5.5, Q3). */\n @property({ attribute: false }) overhangWords: string[] = []\n /** Wider than the face it is fastened to: how far past each edge, and whether off to one side -- a fact, not a warning. */\n @property({ attribute: false }) overhangNote: string[] = []\n /** What taking this part off would do, said beside the buttons that do it (worked out on a copy by the editor). */\n @property({ attribute: false }) detachWords: string[] = []\n /*\n What a section speaks of on the canvas: the response's row while its fold is open; the properties', the fastening the\n part has -- its face lit, as the one-line result says it.\n */\n private candidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private fastenCandidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private told = ''\n @state() private rowOpen = false\n private rowCandidate?: FigureAuthoringAction\n\n /** Why 정렬·간격 고치기 moved nothing, said under it; empty once it moved the part or the part changed. */\n @state() private fixNote = ''\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\n /** How places are made here: one at a time, or by the figure's rule. Unset: by the rule when the figure has one. */\n @state() private placesBy?: 'one' | 'rule'\n @state() private row = freshRow()\n /** The motion form is open over the part's own motion, to change it where it is. */\n @state() private editingMotion = false\n /** Which of the joint's axes the form is over (ADR-0159); one past the last is a new axis. */\n @state() private motionAxis = 0\n\n /*\n The forms describe the next command for the selected part, so another part starts from the defaults: carrying the\n last part's choices over fastened a shutter curtain level with a right edge nobody chose for it (2026-09-25).\n */\n /* The part the forms were loaded for. A panel made with a part already chosen loaded nothing, and said \"editing the\n fastening it has\" over an empty target (2026-09-27, :3391, the doors). */\n private loadedFor?: string\n willUpdate(changed: Map<string, unknown>) {\n /* Its tab shown again: what it would draw is said again, over whatever the other tab left. */\n if (changed.has('active') && this.active && changed.get('active') === false) this.told = ''\n /* What 고치기 said is about the figure as it was: another step or another part, and it no longer holds. */\n if (changed.has('asset') || changed.has('partId')) this.fixNote = ''\n if (this.asset && this.partId && this.partId !== this.loadedFor) {\n this.loadedFor = this.partId\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.rowOpen = false\n this.rowCandidate = undefined\n this.editingMotion = false\n this.motionAxis = 0\n }\n }\n\n updated() {\n /* Only the sections that hold a form speak of what it would do, and only while their tab is shown: the panel has\n one of these per section, and the others' silence cleared what it showed (2026-09-27, :3391). */\n const speaks = this.active && (this.section === 'shape' || this.section === 'response')\n if (!speaks) return\n const said = JSON.stringify(this.candidate ?? null)\n if (said === this.told) return\n this.told = said\n this.dispatchEvent(new CustomEvent('preview-command', { detail: this.candidate ?? null, bubbles: true, composed: true }))\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n /* The panel left: what it showed goes with it. */\n if (this.told && this.told !== 'null') this.dispatchEvent(new CustomEvent('preview-command', { detail: null, bubbles: true, composed: true }))\n this.told = ''\n }\n\n render() {\n const asset = this.asset\n this.candidate = undefined\n this.fastenCandidate = undefined\n this.rowCandidate = undefined\n if (!asset || !this.partId) return nothing\n if (this.section === 'motion')\n return html`<section><h3>${i18next.t('figure.label.motion')}${this.help.button('figure.text.motion-explained')}</h3>${this.help.hint('figure.text.motion-explained')}\n ${this.renderMotion(asset)}${this.renderShown(asset)}</section>`\n if (this.section === 'places') {\n /*\n One idea, places, two ways to make them (ADR-0118): one at a time on this part, or many by a rule -- the figure's\n slot layout. One section with a choice, not two screens for the same thing (chief architect, 2026-10-11).\n */\n const byRule = (this.placesBy ?? (asset.document.capabilities.slotLayout ? 'rule' : 'one')) === 'rule'\n return html`<section><h3>${i18next.t('figure.label.places-on-part', { part: this.partId })}${this.help.button('figure.text.place-explained')}</h3>${this.help.hint('figure.text.place-explained')}\n <ox-input-select-buttons\n places-by\n .value=${byRule ? 'rule' : 'one'}\n .options=${[\n { value: 'one', display: i18next.t('figure.label.places-one') },\n { value: 'rule', display: i18next.t('figure.label.places-by-rule') }\n ]}\n @change=${(e: CustomEvent) => (this.placesBy = e.detail === 'rule' ? 'rule' : 'one')}\n ></ox-input-select-buttons>\n ${byRule\n ? html`<figure-slot-layout-panel .asset=${asset} .partId=${this.partId} ?locked=${this.locked}></figure-slot-layout-panel>`\n : placeFacesOf(asset, this.partId).length\n ? this.renderPlaces(asset)\n : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n }\n /*\n Three groups in one order whatever the part's state (chief architect 2026-10-16): its size, its place, its row. The\n editor's own numbers go in through the slots, so a group keeps its place when a rule or a fastening takes them over.\n */\n /* Fastened, by a face or by an origin: either can be taken off, from the place group's 「⋯」. */\n const held = !!heldBy(asset, this.partId) || !!(this.revision && fasteningOf(this.revision, this.partId)?.atOrigin)\n if (this.section === 'response') {\n /*\n How the part answers a size it is placed at (user 2026-10-17, the 「반응형」 tab): its own measures, where it\n stands, and the row it may make -- what Build Once, Fit Anywhere is authored with, in one place.\n */\n const positions = held ? [] : positionsWorkedOut(asset, this.partId)\n this.rowCandidate = undefined\n const response = html`\n ${canFollow(asset, this.partId) ? html`<section size>\n <h3>${i18next.t('figure.label.group-size')}</h3>\n <figure-size-editor .revision=${this.revision} .partId=${this.partId} ?locked=${this.locked}></figure-size-editor>\n <slot name=\"size-note\"></slot>\n </section>` : nothing}\n ${positions.length\n ? html`<section position-response>\n <h3>${i18next.t('figure.label.group-position-response')}</h3>\n ${this.renderPositions(asset)}\n </section>`\n : nothing}\n ${rowOf(asset, this.partId) ? html`<slot name=\"row\"></slot>` : this.renderRow(asset)}\n `\n this.candidate = this.rowOpen && this.rowCandidate ? { action: this.rowCandidate } : undefined\n return response\n }\n const shown = html`\n <slot name=\"size\"></slot>\n <section fastening>\n <h3>\n ${i18next.t('figure.label.group-place')}${this.help.button('figure.text.fastening-explained')}\n ${groupMenu([{ label: i18next.t('figure.button.detach'), icon: 'link_off', disabled: this.locked || !held, run: () => this.command({ kind: 'detach', part: this.partId }) }])}\n </h3>${this.help.hint('figure.text.fastening-explained')}\n <slot name=\"place\"></slot>\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.part-cannot-fasten')}</p>`}\n </section>\n `\n this.candidate = this.fastenCandidate\n return shown\n }\n\n /** Where things are held on this part: a seat things rest on, or a grip things are held in. */\n private renderPlaces(asset: FigureAsset) {\n const faces = placeFacesOf(asset, this.partId)\n const p = this.place\n const face = faces.includes(p.face) ? p.face : faces[0]!\n const accepts = acceptsOf(p.accepts)\n const capacityOk = Number.isSafeInteger(p.capacity) && p.capacity >= 1\n const roleName = (role: string) => i18next.t('figure.label.place-' + role)\n return html`\n ${placesOn(asset, this.partId).map(\n one => html`<div pair>\n <span>\n <b bound>${one.label}</b>\n <small>${one.face ? i18next.t('figure.label.face-' + one.face) + ' · ' : ''}${placeTerms(one, (key, params) => i18next.t(key, params))}</small>\n </span>\n <button quiet ?disabled=${this.locked} @click=${() => this.command({ kind: 'remove-binding', id: one.id })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-place')}\n </button>\n </div>`\n )}\n ${holdsThings(asset)\n ? nothing\n : html`<p hint>${i18next.t('figure.text.place-needs-holding')}</p>\n <button act ?disabled=${this.locked} @click=${() => this.declareHolding(asset)}>\n <md-icon>inventory_2</md-icon>${i18next.t('figure.button.declare-holding')}\n </button>`}\n <div pair>\n <select @change=${(e: Event) => (this.place = { ...p, role: (e.target as HTMLSelectElement).value as 'seat' | 'grip' })}>\n <option value=\"grip\" ?selected=${p.role === 'grip'}>${roleName('grip')}</option>\n <option value=\"seat\" ?selected=${p.role === 'seat'}>${roleName('seat')}</option>\n </select>\n <select @change=${(e: Event) => (this.place = { ...p, face: (e.target as HTMLSelectElement).value as FigureFace })}>\n ${faces.map(one => html`<option value=${one} ?selected=${one === face}>${i18next.t('figure.label.face-' + one)}</option>`)}\n </select>\n </div>\n <div form>\n <span>${i18next.t('figure.label.place-name')}</span>\n <input .value=${p.label} placeholder=${roleName(p.role)} @change=${(e: Event) => (this.place = { ...p, label: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-accepts')}</span>\n <input .value=${p.accepts} placeholder=\"BOX, TOTE\" @input=${(e: Event) => (this.place = { ...p, accepts: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-capacity')}</span>\n <input type=\"number\" min=\"1\" step=\"1\" .value=${String(p.capacity)} @change=${(e: Event) => (this.place = { ...p, capacity: (e.target as HTMLInputElement).valueAsNumber })} />\n </div>\n ${accepts.length ? nothing : html`<small>${i18next.t('figure.text.place-accepts-needed')}</small>`}\n <button\n act\n ?disabled=${this.locked || !accepts.length || !capacityOk}\n @click=${() =>\n this.command({\n kind: 'add-binding',\n id: placeIdFor(asset, this.partId, p.role),\n label: p.label.trim() || roleName(p.role),\n role: p.role,\n part: this.partId,\n face,\n accepts,\n capacity: p.capacity\n })}\n >\n <md-icon>back_hand</md-icon>${i18next.t('figure.button.add-place')}\n </button>\n `\n }\n\n /** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */\n private declareHolding(asset: FigureAsset) {\n const names = [...new Set([...(asset.document.capabilities.names ?? []), 'Capacity', 'Holdable'])]\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-capabilities', names } }, bubbles: true, composed: true }))\n }\n\n /**\n * 정렬·간격 고치기: the part moved inside the face it is fastened on, as one step -- the least move on each side it is\n * out, or centred when it is wider than the face. When nothing of it can be moved, why is said under the button, not\n * nothing at all (:3300, 2026-10-11: the button only scrolled to the drawing, which was already in view). The command\n * is the fastening window's for the same choice (`fasten-form.ts`), with only the place across the face changed.\n */\n private fixAlignment() {\n const revision = this.revision\n if (!revision) return\n const form = fastenFormOf(revision, this.partId)\n /* Whether it is out, and the least move that brings it in, are the kernel's measure (ADR-0140 3.8). */\n const own = figureFaceOverhangOf(revision.asset, this.partId, revision.inputs)\n const fixed =\n own?.state === 'unknown'\n ? ({ cannot: 'unmeasured' } as const)\n : own?.state === 'out' || own?.state === 'possible'\n ? insideAlignmentOf(fastenPlanOf(revision, this.partId, form).view, form.align, form.alignMm)\n : ({ cannot: 'inside' } as const)\n if ('cannot' in fixed) {\n this.fixNote = i18next.t(`figure.text.fix-alignment-${fixed.cannot}`, { part: this.partId, on: form.target })\n return\n }\n this.fixNote = ''\n const action = fastenPlanOf(revision, this.partId, { ...form, align: fixed.align, alignMm: fixed.alignMm }).action\n if (action) this.command(action)\n }\n\n /** The fastening window, asked of the editor: it opens over the canvas on what the part has now. */\n private openFastening() {\n this.dispatchEvent(new CustomEvent('fasten-open', { bubbles: true, composed: true }))\n }\n\n /**\n * What holds the part, said as its state -- 「바닥에 붙어 있음」 -- with the ways to change it: open the fastening,\n * or take it off. Right after \"follow size, attached\" this is the result, not a refusal (designer 2026-09-27).\n */\n private heldWords(asset: FigureAsset) {\n const joint = (asset.joints ?? []).find(j => j.body1.part === this.partId)\n const gap = joint?.origin?.gap ?? 0\n const place = i18next.t(`figure.label.resize-place-${asset.placement ?? 'floor'}`)\n const where = !joint\n ? i18next.t('figure.text.held-by-rule')\n : 'plane' in joint.body0\n ? typeof gap === 'number'\n ? i18next.t('figure.text.held-on-plane', { place, gap: String(gap) })\n : i18next.t('figure.text.held-on-plane-worked-out', { place })\n : i18next.t('figure.text.held-on-part', { other: joint.body0.part, otherFace: i18next.t(endPlaceKeyOf(joint.body0)) })\n return where\n }\n\n /**\n * Positions worked out from other values, each with the way to\n * keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.\n */\n private renderPositions(asset: FigureAsset) {\n return positionsWorkedOut(asset, this.partId).map(\n axis => html`<div pair>\n <span>${axis.toUpperCase()} · ${i18next.t(positionIsShare(asset, this.partId, axis) ? 'figure.label.position-in-proportion' : 'figure.label.position-worked-out')}</span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'fix-position', part: this.partId, axis })}>\n <md-icon>push_pin</md-icon>${i18next.t('figure.button.fix-position')}\n </button>\n ${hasInstanceSize(asset, axis) && !positionIsShare(asset, this.partId, axis)\n ? html`<button act ?disabled=${this.locked} title=${i18next.t('figure.text.scale-position-explained')} @click=${() => this.command({ kind: 'scale-position', part: this.partId, axis })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.scale-position')}\n </button>`\n : nothing}\n </div>`\n )\n }\n\n /**\n * The fastening in one line -- what, on which face, how -- and 「바꾸기」 to open the window where it is chosen (chief\n * architect 2026-10-16; user 2026-10-17: the result here, the editing in a window with room). Taking it off is in the\n * group's 「⋯」. What hangs over the face, and the way to fix it, stay here: they are about the fastening as it is now.\n */\n private renderFastening(asset: FigureAsset) {\n const revision = this.revision!\n const own = fasteningOf(revision, this.partId)\n /* Placed by an origin (ADR-0107 decision 4): attach writes faces, so the window would move it off its origin. Said, and taken off only. */\n if (own?.atOrigin)\n return html`<div fastened fasten-at-origin>\n <p>${this.heldWords(asset)}</p>\n ${this.renderDetachWords()}\n </div>`\n const overhang = html`${this.overhangNote.length ? html`<p hint overhang-note>${this.overhangNote.join(' ')}</p>` : nothing}\n ${this.overhangWords.length\n ? html`<div overhang role=\"status\">\n ${this.overhangWords.map(line => html`<p>${line}</p>`)}\n ${own\n ? html`<button act fix-alignment ?disabled=${this.locked} @click=${() => this.fixAlignment()}>\n <md-icon>tune</md-icon>${i18next.t('figure.button.fix-alignment')}\n </button>\n ${this.fixNote ? html`<p hint fix-note>${this.fixNote}</p>` : nothing}`\n : nothing}\n </div>`\n : nothing}`\n if (own && heldBy(asset, this.partId)) {\n const form = fastenFormOf(revision, this.partId)\n const plan = fastenPlanOf(revision, this.partId, form)\n if (plan.action) this.fastenCandidate = { action: plan.action, ...(plan.face ? { face: plan.face } : {}) }\n const planeWord = i18next.t('figure.label.resize-place-' + (asset.placement ?? 'floor'))\n return html`\n ${overhang}\n <div fastened-summary>\n <p fasten-sentence>${fastenSentenceOf(form, plan, planeWord, (key, params) => i18next.t(key, params))}</p>\n <button act change-fastening ?disabled=${this.locked} @click=${() => this.openFastening()}>${i18next.t('figure.button.change-fastening')}</button>\n </div>\n ${this.renderDetachWords()}\n `\n }\n /* A blank attachment is not a form to decipher: what it does, and the way to the window. */\n return html`\n ${overhang}\n <p hint>${i18next.t('figure.text.fasten-start')}</p>\n <button act fasten-start ?disabled=${this.locked} @click=${() => this.openFastening()}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten-start')}\n </button>\n `\n }\n\n private renderDetachWords() {\n /* One thing to say is a line, not a list of one. */\n if (this.detachWords.length === 1) return html`<p hint detach-words>${this.detachWords[0]}</p>`\n return this.detachWords.length ? html`<ul detach-words>${this.detachWords.map(line => html`<li>${line}</li>`)}</ul>` : nothing\n }\n\n /**\n * Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its\n * face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section\n * (the editor's) shows it and takes it away.\n */\n private renderPreviewWords() {\n if (this.previewWords.length === 1) return html`<p preview-words role=\"status\">${this.previewWords[0]}</p>`\n return this.previewWords.length ? html`<ul preview-words role=\"status\">${this.previewWords.map(line => html`<li>${line}</li>`)}</ul>` : nothing\n }\n\n /**\n * A row (ADR-0097 §5.5): said as what it makes, \"arranged in a row\". Where it cannot be made here, why, rather than\n * nothing. Filling the length, the centre spacing is the author's; a count of their own is spread evenly over the\n * length -- figure-model draws it so, and the form does not ask for a spacing it would not use.\n */\n private renderRow(asset: FigureAsset) {\n if (rowOf(asset, this.partId)) return nothing\n const blocked = rowBlockOf(asset, this.partId)\n const axes = rowAxesOf(asset, this.partId)\n const r = this.row\n /*\n Folded, open while it is being worked (2026-10-02): a row is made now and then, and most parts stand on the plane,\n where the section said its reason open on every one. Opened, it says why or asks how.\n */\n const head = html`<summary><h3>${i18next.t('figure.label.repeat')} <span section-state>${i18next.t('figure.label.repeat-inactive')}</span></h3></summary>`\n if (blocked || !axes.length)\n return html`<section row><details row-fold open>\n ${head}\n <p hint row-blocked>${i18next.t(`figure.text.row-blocked-${blocked ?? 'unfastened'}`, { part: this.partId })}</p>\n ${blocked === 'unfastened'\n ? html`<button act @click=${() => this.dispatchEvent(new CustomEvent('go-fasten', { bubbles: true, composed: true }))}><md-icon>link</md-icon>${i18next.t('figure.button.go-fasten')}</button>`\n : nothing}\n </details></section>`\n const axis = axes.includes(r.axis as Axis) ? (r.axis as Axis) : axes[0]!\n const ok = r.fills ? r.pitch > 0 : Number.isSafeInteger(r.count) && r.count >= 1\n const action = ok\n ? ({ kind: 'make-repeat', part: this.partId, axis, pitch: r.fills ? r.pitch : Math.max(r.pitch, 1), ...(r.fills ? {} : { count: r.count }) } as FigureAuthoringAction)\n : undefined\n this.rowCandidate = action\n const set = (next: typeof r) => ((this.row = next), (this.rowOpen = true))\n /*\n Whether the row is being worked follows the fold's own toggle. A press on the heading focuses it before the click;\n set on focus, the fold opened there and the click then folded it again (2026-10-11: it took two clicks to open).\n */\n const toggled = (e: Event) => (this.rowOpen = (e.target as HTMLDetailsElement).open)\n return html`<section row><details row-fold ?open=${this.rowOpen} @toggle=${toggled}>\n ${head}\n <p hint>${i18next.t('figure.text.repeat-intro')}</p>\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select aria-label=${i18next.t('figure.label.repeat-axis')} ?disabled=${this.locked} @change=${(e: Event) => set({ ...r, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${axes.map(a => html`<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}\n </select>\n </div>\n <p hint>${i18next.t('figure.text.repeat-direction')}</p>\n <div choice-row role=\"radiogroup\" aria-label=${i18next.t('figure.label.row-basis')}>\n <label toggle><input type=\"radio\" name=\"row-basis\" ?disabled=${this.locked} .checked=${r.fills} @change=${() => set({ ...r, fills: true })} />${i18next.t('figure.label.repeat-fills')}</label>\n <label toggle><input type=\"radio\" name=\"row-basis\" ?disabled=${this.locked} .checked=${!r.fills} @change=${() => set({ ...r, fills: false })} />${i18next.t('figure.label.row-by-count')}</label>\n </div>\n ${r.fills\n ? html`<div form>\n <span>${i18next.t('figure.label.repeat-pitch')} · mm</span>\n <input aria-label=${i18next.t('figure.label.repeat-pitch')} ?disabled=${this.locked} type=\"number\" step=\"any\" min=\"0\" .value=${String(r.pitch)} @change=${(e: Event) => set({ ...r, pitch: Number((e.target as HTMLInputElement).value) })} />\n </div>`\n : html`<div form>\n <span>${i18next.t('figure.label.repeat-count')}</span>\n <input aria-label=${i18next.t('figure.label.repeat-count')} ?disabled=${this.locked} type=\"number\" step=\"1\" min=\"1\" .value=${String(r.count)} @change=${(e: Event) => set({ ...r, count: Number((e.target as HTMLInputElement).value) })} />\n </div>\n <p hint>${i18next.t('figure.text.row-count-spreads')}</p>`}\n ${action && this.rowOpen ? html`<p hint>${i18next.t('figure.text.repeat-draft')}</p>${this.renderPreviewWords()}` : nothing}\n <button act ?disabled=${this.locked || !action} @click=${() => action && this.command(action)}>\n <md-icon>view_week</md-icon>${i18next.t('figure.button.make-repeat')}\n </button>\n </details></section>`\n }\n\n /**\n * When the part is drawn: always, or while a control is at least a value -- a lamp lit while the gate is open. One\n * part edit (`set-visibility`), one step. Offered once the figure has a control; a motion is what makes one.\n */\n private renderShown(asset: FigureAsset) {\n const controls = visibilityControlsOf(asset)\n if (!controls.length) return nothing\n const now = shownWhenOf(asset, this.partId)\n const send = (shownWhen: { input: string; atLeast: number } | null) =>\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-visibility', target: this.partId, shownWhen } }, bubbles: true, composed: true }))\n const first = (id: string) => {\n const c = controls.find(one => one.id === id)!\n return Math.round((c.min + (c.max - c.min) * 0.01) * 1000) / 1000\n }\n const unit = now ? controls.find(c => c.id === now.input)?.unit : ''\n return html`<div form>\n <span>${i18next.t('figure.label.shown-when')}</span>\n <select\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const id = (e.target as HTMLSelectElement).value\n send(id ? { input: id, atLeast: now?.input === id ? now.atLeast : first(id) } : null)\n }}\n >\n <option value=\"\" ?selected=${!now}>${i18next.t('figure.label.shown-always')}</option>\n ${controls.map(c => html`<option value=${c.id} ?selected=${now?.input === c.id}>${i18next.t('figure.label.shown-while', { control: c.label })}</option>`)}\n </select>\n ${now\n ? html`<span>${i18next.t('figure.label.shown-at-least')}${unit ? ` (${unit})` : ''}</span>\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.atLeast)}\n @change=${(e: Event) => {\n const v = (e.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(v)) send({ input: now.input, atLeast: v })\n }}\n />`\n : nothing}\n </div>`\n }\n\n private renderMotion(asset: FigureAsset) {\n const now = motionOf(asset, this.partId)\n const joint = asset.joints?.find(j => j.body1.part === this.partId)\n if (now && !(this.editingMotion && joint)) {\n /* Which part moves, against what, which way, how far -- by name (ADR-0097 §5.5). */\n const against = joint ? ('plane' in joint.body0 ? i18next.t('figure.label.mounting-plane') : joint.body0.part) : ''\n const ends = this.motionEnds\n /* One row an axis (ADR-0159): how it moves and by what, changed or taken away where it is; more added under them. */\n const count = joint ? figureMotionsOf(joint).length : 1\n const edit = (k: number) => {\n if (!joint) return\n this.motionAxis = k\n this.motion = motionFormOf(joint, k)\n this.editingMotion = true\n }\n const row = (k: number) => {\n const it = k === 0 ? now : motionOf(asset, this.partId, k)\n if (!it) return nothing\n return html`<div pair motion-axis=${k}>\n <span>\n ${count > 1 ? html`<b>${i18next.t('figure.label.motion-axis-n', { n: k + 1 })}</b> ` : nothing}${i18next.t('figure.label.motion-' + it.kind)} · ${it.vector ? jointAxisWord(it.vector) : String(it.axis).toUpperCase()}\n ${it.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: it.travel.part, axis: it.travel.axis.toUpperCase(), plus: it.travel.plus ?? 0 })}</small>`\n : nothing}\n ${it.follows?.sum.length === 1\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: it.follows.sum[0]!.joint, multiplier: it.follows.sum[0]!.multiplier, offset: it.follows.offset })}</small>`\n : it.follows\n ? html`<small>${i18next.t('figure.label.motion-follow')}: ${it.follows.sum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')} + ${it.follows.offset}</small>`\n : it.control\n ? html`<small>${it.control.id} (${it.control.unit}) ${it.control.min} … ${it.control.max}</small>`\n : nothing}\n </span>\n ${count > 1\n ? html`<button act remove-axis ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: withoutAxis(joint, k) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-axis')}\n </button>`\n : html`<button act ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>`}\n <button act ?disabled=${this.locked || !joint} @click=${() => edit(k)}>\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\n </div>`\n }\n return html`<p motion-summary>\n ${i18next.t('figure.text.motion-summary', {\n part: this.partId,\n against,\n kind: i18next.t('figure.label.motion-' + now.kind),\n axis: now.vector ? jointAxisWord(now.vector) : String(now.axis).toUpperCase()\n })}\n </p>\n ${ends\n ? html`<p hint motion-ends>${i18next.t('figure.text.motion-ends-shown', { min: String(ends.min), max: String(ends.max), unit: ends.unit })}</p>`\n : nothing}\n ${Array.from({ length: count }, (_, k) => row(k))}\n <div pair>\n <button act add-axis ?disabled=${this.locked || !joint} @click=${() => edit(count)}>\n <md-icon>add</md-icon>${i18next.t('figure.button.add-axis')}\n </button>\n ${count > 1\n ? html`<button act ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>`\n : nothing}\n </div>`\n }\n /* A joint needs a parent (URDF): a part fastened to nothing is fastened first. */\n if (!joint)\n return html`<p hint>${i18next.t('figure.text.fasten-before-moving')}</p>\n <button act go-fasten @click=${() => this.dispatchEvent(new CustomEvent('go-fasten', { bubbles: true, composed: true }))}>\n <md-icon>link</md-icon>${i18next.t('figure.button.go-fasten')}\n </button>`\n const m = this.motion\n const unit = m.kind === 'slide' ? 'mm' : 'deg'\n /* A follower follows a joint that moves the same way; a choice the kind no longer allows is dropped. */\n const k = this.motionAxis\n const leaders = leadersFor(asset, this.partId, m.kind, motionIdOf(joint, k))\n const adding = k > 0 && k >= figureMotionsOf(joint).length\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n const refusal = motionFormRefusalOf(m, follow)\n return html`\n ${k > 0 ? html`<p motion-axis-heading><b>${i18next.t('figure.label.motion-axis-n', { n: k + 1 })}</b></p>` : nothing}\n <div pair>\n <select @change=${(e: Event) => this.setKind((e.target as HTMLSelectElement).value as 'slide' | 'turn' | 'continuous')}>\n <option value=\"slide\" ?selected=${m.kind === 'slide'}>${i18next.t('figure.label.motion-slide')}</option>\n <option value=\"turn\" ?selected=${m.kind === 'turn'}>${i18next.t('figure.label.motion-turn')}</option>\n <option value=\"continuous\" ?selected=${m.kind === 'continuous'}>${i18next.t('figure.label.motion-continuous')}</option>\n </select>\n ${m.axisVector\n ? html`<span motion-axis-vector>${i18next.t('figure.label.motion-axis')} ${jointAxisWord(m.axisVector)}</span>`\n : html`<select @change=${(e: Event) => (this.motion = { ...m, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${AXES.map(a => html`<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}\n </select>`}\n </div>\n ${m.followSum\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <span>${m.followSum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')}</span>\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : leaders.length\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, follow: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>\n ${leaders.map(j => html`<option value=${j.id} ?selected=${j.id === follow}>${j.part}${j.state?.id ? ` · ${j.state.id}` : j.id !== j.part ? ` · ${j.id}` : ''}</option>`)}\n </select>\n </div>`\n : nothing}\n ${m.followSum\n ? nothing\n : follow\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-multiplier')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.multiplier)} @change=${(e: Event) => (this.motion = { ...m, multiplier: Number((e.target as HTMLInputElement).value) })} />\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : html`<div form>\n ${m.kind === 'slide'\n ? html`<span>${i18next.t('figure.label.motion-travel')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, travel: (e.target as HTMLSelectElement).value })}>\n ${m.travelSum\n ? html`<option value=\"\" ?selected=${!m.travel}>${m.travelSum.sum.map(t => `${t.from.of === 'input' ? t.from.input : `${t.from.of === 'part' ? t.from.part : i18next.t('figure.label.motion-travel')} · ${t.from.axis.toUpperCase()}`}${t.times !== undefined && t.times !== 1 ? ` × ${t.times}` : ''}`).join(' + ')}</option>`\n : html`<option value=\"\" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>`}\n ${asset.appearance\n .map(look => look.target)\n .filter(one => canFollow(asset, one))\n .flatMap(one => AXES.map(a => html`<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}\n </select>\n ${m.travel\n ? html`<span>${i18next.t('figure.label.follows-plus')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.travelPlus ?? 0)} @change=${(e: Event) => (this.motion = { ...m, travelPlus: Number((e.target as HTMLInputElement).value) || 0 })} />`\n : nothing}`\n : nothing}\n <span>${i18next.t('figure.label.control-id')}</span>\n <input .value=${m.id} placeholder=${controlIdFor(this.partId, m.kind, k)} @change=${(e: Event) => (this.motion = { ...m, id: (e.target as HTMLInputElement).value.trim() })} />\n ${m.kind === 'continuous' || (m.kind === 'slide' && (m.travel || m.travelSum))\n ? nothing\n : html`<span>${i18next.t('figure.label.control-range')} (${unit})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(m.min)} @change=${(e: Event) => (this.motion = { ...m, min: Number((e.target as HTMLInputElement).value) })} />\n <input type=\"number\" step=\"any\" .value=${String(m.max)} @change=${(e: Event) => (this.motion = { ...m, max: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n </div>`}\n <button\n act\n ?disabled=${this.locked || !!refusal}\n title=${refusal === 'range' ? i18next.t('figure.text.range-needs-room') : ''}\n @click=${() => {\n this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId, k) })\n this.editingMotion = false\n this.motionAxis = 0\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(adding ? 'figure.button.add-axis' : this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => ((this.editingMotion = false), (this.motionAxis = 0))}><md-icon>undo</md-icon>${i18next.t('figure.button.cancel-motion-change')}</button>`\n : nothing}\n `\n }\n\n private setKind(kind: 'slide' | 'turn' | 'continuous') {\n this.motion = kind === 'slide' ? { ...this.motion, kind, min: 0, max: 500 } : { ...this.motion, kind, min: -90, max: 90 }\n }\n\n private command(action: FigureAuthoringAction) {\n this.dispatchEvent(new CustomEvent('command', { detail: { action }, bubbles: true, composed: true }))\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"figure-links.js","sourceRoot":"","sources":["../../client/modeller/figure-links.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAClD,OAAO,+BAA+B,CAAA;AACtC,OAAO,yBAAyB,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAG1F,OAAO,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,SAAS,EACT,eAAe,EACf,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EACL,kBAAkB,EAGlB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAEjB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAA;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE/E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;A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KAAK,EAAE,CAAC;;kDAA6B;AAE5B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAA4B;AAE3B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;gDAA2B;AAQzC;IAAhB,KAAK,EAAE;;4CAAwB;AAIf;IAAhB,KAAK,EAAE;;4CAAqB;AACZ;IAAhB,KAAK,EAAE;;2CAA2C;AAElC;IAAhB,KAAK,EAAE;;8CAAoD;AAC3C;IAAhB,KAAK,EAAE;;0CAA6B;AAEpB;IAAhB,KAAK,EAAE;;iDAA2C;AAElC;IAAhB,KAAK,EAAE;;6CAAkC;AACzB;IAAhB,KAAK,EAAE;;wCAAyB;AAEhB;IAAhB,KAAK,EAAE;;kDAA8B;AAErB;IAAhB,KAAK,EAAE;;+CAAuB;AAzHpB,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAi0BvB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport '@operato/input/ox-input-select-buttons.js'\nimport './figure-slot-layout-panel.js'\nimport './figure-size-editor.js'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { figureFaceOverhangOf, figureMotionsOf, motionIdOf } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureAuthoringAction, FigureBindingPlace, FigureFace } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n AXES,\n canFasten,\n canFollow,\n positionIsShare,\n heldBy,\n shownWhenOf,\n visibilityControlsOf,\n fasteningOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionFormRefusalOf,\n endPlaceKeyOf,\n motionJoint,\n controlIdFor,\n withoutAxis,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n rowBlockOf,\n fixedJointOf,\n rowOf,\n positionsWorkedOut,\n type Axis,\n type MotionForm,\n followOf,\n followableAxes,\n measureNow,\n freshStateSize,\n stateSizeIdFor,\n stateSizeCommandOf,\n stateSizeFixedOf,\n type StateSizeForm\n} from './links.js'\nimport { measureFactor } from './size-response.js'\nimport { SidePanelStyles } from '@things-factory/figure-viewer/dist-client/side-panel-styles.js'\nimport { insideAlignmentOf } from './fasten-geometry.js'\nimport { fastenFormOf, fastenPlanOf, fastenSentenceOf } from './fasten-form.js'\nimport type { FigureRevision } from './revision.js'\nimport { HelpToggles } from './help.js'\nimport { groupMenu, GroupMenuStyles } from './group-menu.js'\nimport { jointAxisWord } from './joint-axis.js'\nimport { placeTerms } from '@things-factory/figure-viewer/dist-client/detail-facts.js'\n\nconst freshMotion = (): MotionForm => ({ kind: 'slide', axis: 'x', id: '', min: 0, max: 500, follow: '', multiplier: 1, offset: 0, travel: '', travelPlus: 0 })\nconst freshRow = () => ({ axis: '' as Axis | '', pitch: 200, fills: true, count: 5 })\nconst freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as FigureFace, label: '', accepts: '', capacity: 1 })\n\n/**\n * What a part is tied to — its size response, what it is fastened to, how it moves.\n *\n * 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets\n * a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that\n * happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the\n * parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.\n *\n * The sections are dimensions, placement and joint, in that order. Every\n * change is one figure-model authoring command, sent as `command` and run by the editor through the session — one\n * step of the undo history. The fastening is said here in one line; it is chosen in the fastening window\n * (`figure-fasten-dialog.ts`), which the editor opens when this asks (`fasten-open`). Choices the command would refuse (a round body fastened, a size following an instance\n * size the figure does not declare) are not offered, so the author is not sent into a refusal.\n */\n@customElement('figure-links')\nexport class FigureLinks extends localize(i18next)(LitElement) {\n private readonly help = new HelpToggles(this)\n static styles = [SidePanelStyles, GroupMenuStyles, css`\n :host {\n display: block;\n }\n /* A group's sub-question, under its title: quieter than the title, as a label is. */\n p[group-question] {\n margin: 4px 0 0;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The fastening a part has, in one line, and 「바꾸기」 at its end. */\n div[fastened-summary] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n div[fastened-summary] > p {\n flex: 1;\n margin: 0;\n }\n /* Opening the form is an action: the primary colour, at the line's end. */\n div[fastened-summary] > button[act] {\n flex: none;\n margin: 0 -6px 0 0;\n }\n /* The measure's name, then its rule: X, or a cylinder's 반지름 · 길이, on one line. */\n div[row] > b {\n white-space: nowrap;\n }\n div[row] {\n display: grid;\n grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);\n gap: 6px;\n align-items: center;\n }\n b[bound] {\n font-weight: 600;\n }\n /* What each direction does now: read-only rows. */\n div[resize-now] { display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 8px; margin: 12px 0; }\n div[resize-now] div[row] { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }\n div[resize-now] span[measure] { font-variant-numeric: tabular-nums; }\n /* Size behaviour is a choice about dimensions only. It never implies a placement or a fastening. */\n /* One of the size group's rows: the group's gap spaces it, as it does the rest (a margin on top of it left a hole). */\n details[resize-choice] { margin: 0; padding: 0; border: 0; }\n details[resize-choice] > div { display: grid; gap: 8px; padding: 8px 0; }\n p[fasten-mode] { margin: 0; font-weight: 600; }\n details { margin-top: 8px; }\n details[row-fold] { margin: 0; }\n details[row-fold] > summary { padding: 0; color: var(--md-sys-color-on-surface); }\n details[row-fold] > summary h3 { margin: 0; flex: 1; }\n details[row-fold][open] > summary { margin-bottom: 8px; }\n /* What the command would do, said beside the result drawn on the canvas. */\n ul[preview-words] { margin: 8px 0; padding: 8px 12px 8px 26px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); display: grid; gap: 4px; }\n p[preview-words] { margin: 8px 0; padding: 8px 12px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); }\n div[overhang] { display: grid; gap: 6px; margin: 8px 0; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--md-sys-color-outline-variant, #8884); }\n div[overhang] p { margin: 0; }\n ul[detach-words] { margin: 4px 0 10px; padding-left: 20px; display: grid; gap: 2px; }\n /* The difference a following measure keeps: under its choice, on the same line as its words. */\n label[inline-plus] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n label[inline-plus] input {\n flex: 1;\n min-width: 0;\n }\n `]\n\n /** The figure at the version on screen. */\n @property({ attribute: false }) revision?: FigureRevision\n private get asset(): FigureAsset | undefined {\n return this.revision?.asset\n }\n /** The selected part. */\n @property() partId = ''\n @property({ type: Boolean }) locked = false\n /** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */\n @property() section: 'shape' | 'response' | 'places' | 'motion' = 'shape'\n /**\n * Its tab is the one shown, and no window over it speaks instead. The response's row speaks of what a command would\n * draw, and the properties' says there is none: only the one in sight may, as the hidden one's silence would clear what\n * the shown one draws. While the fastening window is open it alone speaks (the editor sets this false).\n */\n @property({ type: Boolean }) active = true\n /** What the row's command would do, in words (the editor works it out: `command-preview.ts`). */\n @property({ attribute: false }) previewWords: string[] = []\n /** Where the selected part's motion takes it, at both ends of its range (the editor draws them on the canvas). */\n @property({ attribute: false }) motionEnds: { control: string; min: number; max: number; unit: string } | null = null\n /** Past the edge of the face it is fastened to, or parts fastened to it past theirs (ADR-0097 §5.5, Q3). */\n @property({ attribute: false }) overhangWords: string[] = []\n /** Wider than the face it is fastened to: how far past each edge, and whether off to one side -- a fact, not a warning. */\n @property({ attribute: false }) overhangNote: string[] = []\n /** What taking this part off would do, said beside the buttons that do it (worked out on a copy by the editor). */\n @property({ attribute: false }) detachWords: string[] = []\n /*\n What a section speaks of on the canvas: the response's row while its fold is open; the properties', the fastening the\n part has -- its face lit, as the one-line result says it.\n */\n private candidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private fastenCandidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private told = ''\n @state() private rowOpen = false\n private rowCandidate?: FigureAuthoringAction\n\n /** Why 정렬·간격 고치기 moved nothing, said under it; empty once it moved the part or the part changed. */\n @state() private fixNote = ''\n @state() private motion: MotionForm = freshMotion()\n /* The form for a measure a control sets (「상태에 따라 크기」). */\n @state() private stateSize: StateSizeForm = freshStateSize()\n @state() private place = freshPlace()\n /** The id of the place the form changes, kept so the place keeps its id (a release refuses a place id that goes); null adds one. */\n @state() private placeEditing: string | null = null\n /** How places are made here: one at a time, or by the figure's rule. Unset: by the rule when the figure has one. */\n @state() private placesBy?: 'one' | 'rule'\n @state() private row = freshRow()\n /** The motion form is open over the part's own motion, to change it where it is. */\n @state() private editingMotion = false\n /** Which of the joint's axes the form is over (ADR-0159); one past the last is a new axis. */\n @state() private motionAxis = 0\n\n /*\n The forms describe the next command for the selected part, so another part starts from the defaults: carrying the\n last part's choices over fastened a shutter curtain level with a right edge nobody chose for it (2026-09-25).\n */\n /* The part the forms were loaded for. A panel made with a part already chosen loaded nothing, and said \"editing the\n fastening it has\" over an empty target (2026-09-27, :3391, the doors). */\n private loadedFor?: string\n willUpdate(changed: Map<string, unknown>) {\n /* Its tab shown again: what it would draw is said again, over whatever the other tab left. */\n if (changed.has('active') && this.active && changed.get('active') === false) this.told = ''\n /* What 고치기 said is about the figure as it was: another step or another part, and it no longer holds. */\n if (changed.has('asset') || changed.has('partId')) this.fixNote = ''\n if (this.asset && this.partId && this.partId !== this.loadedFor) {\n this.loadedFor = this.partId\n this.motion = freshMotion()\n this.place = freshPlace()\n this.placeEditing = null\n this.row = freshRow()\n this.rowOpen = false\n this.rowCandidate = undefined\n this.editingMotion = false\n this.motionAxis = 0\n }\n }\n\n updated() {\n /* Only the sections that hold a form speak of what it would do, and only while their tab is shown: the panel has\n one of these per section, and the others' silence cleared what it showed (2026-09-27, :3391). */\n const speaks = this.active && (this.section === 'shape' || this.section === 'response')\n if (!speaks) return\n const said = JSON.stringify(this.candidate ?? null)\n if (said === this.told) return\n this.told = said\n this.dispatchEvent(new CustomEvent('preview-command', { detail: this.candidate ?? null, bubbles: true, composed: true }))\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n /* The panel left: what it showed goes with it. */\n if (this.told && this.told !== 'null') this.dispatchEvent(new CustomEvent('preview-command', { detail: null, bubbles: true, composed: true }))\n this.told = ''\n }\n\n render() {\n const asset = this.asset\n this.candidate = undefined\n this.fastenCandidate = undefined\n this.rowCandidate = undefined\n if (!asset || !this.partId) return nothing\n if (this.section === 'motion')\n return html`<section><h3>${i18next.t('figure.label.motion')}${this.help.button('figure.text.motion-explained')}</h3>${this.help.hint('figure.text.motion-explained')}\n ${this.renderMotion(asset)}${this.renderShown(asset)}${this.renderStateSize(asset)}</section>`\n if (this.section === 'places') {\n /*\n One idea, places, two ways to make them (ADR-0118): one at a time on this part, or many by a rule -- the figure's\n slot layout. One section with a choice, not two screens for the same thing (chief architect, 2026-10-11).\n */\n const byRule = (this.placesBy ?? (asset.document.capabilities.slotLayout ? 'rule' : 'one')) === 'rule'\n return html`<section><h3>${i18next.t('figure.label.places-on-part', { part: this.partId })}${this.help.button('figure.text.place-explained')}</h3>${this.help.hint('figure.text.place-explained')}\n <ox-input-select-buttons\n places-by\n .value=${byRule ? 'rule' : 'one'}\n .options=${[\n { value: 'one', display: i18next.t('figure.label.places-one') },\n { value: 'rule', display: i18next.t('figure.label.places-by-rule') }\n ]}\n @change=${(e: CustomEvent) => (this.placesBy = e.detail === 'rule' ? 'rule' : 'one')}\n ></ox-input-select-buttons>\n ${byRule\n ? html`<figure-slot-layout-panel .asset=${asset} .partId=${this.partId} ?locked=${this.locked}></figure-slot-layout-panel>`\n : placeFacesOf(asset, this.partId).length\n ? this.renderPlaces(asset)\n : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n }\n /*\n Three groups in one order whatever the part's state (chief architect 2026-10-16): its size, its place, its row. The\n editor's own numbers go in through the slots, so a group keeps its place when a rule or a fastening takes them over.\n */\n /* Fastened, by a face or by an origin: either can be taken off, from the place group's 「⋯」. */\n const held = !!heldBy(asset, this.partId) || !!(this.revision && fasteningOf(this.revision, this.partId)?.atOrigin)\n if (this.section === 'response') {\n /*\n How the part answers a size it is placed at (user 2026-10-17, the 「반응형」 tab): its own measures, where it\n stands, and the row it may make -- what Build Once, Fit Anywhere is authored with, in one place.\n */\n const positions = held ? [] : positionsWorkedOut(asset, this.partId)\n this.rowCandidate = undefined\n const response = html`\n ${canFollow(asset, this.partId) ? html`<section size>\n <h3>${i18next.t('figure.label.group-size')}</h3>\n <figure-size-editor .revision=${this.revision} .partId=${this.partId} ?locked=${this.locked}></figure-size-editor>\n <slot name=\"size-note\"></slot>\n </section>` : nothing}\n ${positions.length\n ? html`<section position-response>\n <h3>${i18next.t('figure.label.group-position-response')}</h3>\n ${this.renderPositions(asset)}\n </section>`\n : nothing}\n ${rowOf(asset, this.partId) ? html`<slot name=\"row\"></slot>` : this.renderRow(asset)}\n `\n this.candidate = this.rowOpen && this.rowCandidate ? { action: this.rowCandidate } : undefined\n return response\n }\n const shown = html`\n <slot name=\"size\"></slot>\n <section fastening>\n <h3>\n ${i18next.t('figure.label.group-place')}${this.help.button('figure.text.fastening-explained')}\n ${groupMenu([{ label: i18next.t('figure.button.detach'), icon: 'link_off', disabled: this.locked || !held, run: () => this.command({ kind: 'detach', part: this.partId }) }])}\n </h3>${this.help.hint('figure.text.fastening-explained')}\n <slot name=\"place\"></slot>\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.part-cannot-fasten')}</p>`}\n </section>\n `\n this.candidate = this.fastenCandidate\n return shown\n }\n\n /** A place on this part into the form, to change it under its own id. */\n private editPlace(one: FigureBindingPlace) {\n this.placeEditing = one.id\n this.place = { role: one.role, face: one.face ?? 'top', label: one.label, accepts: (one.accepts ?? []).join(', '), capacity: one.capacity }\n }\n\n /** Where things are held on this part: a seat things rest on, or a grip things are held in. */\n private renderPlaces(asset: FigureAsset) {\n const faces = placeFacesOf(asset, this.partId)\n const p = this.place\n const face = faces.includes(p.face) ? p.face : faces[0]!\n const accepts = acceptsOf(p.accepts)\n const capacityOk = Number.isSafeInteger(p.capacity) && p.capacity >= 1\n const roleName = (role: string) => i18next.t('figure.label.place-' + role)\n return html`\n ${placesOn(asset, this.partId).map(\n one => html`<div pair>\n <span>\n <b bound>${one.label}</b>\n <small>${one.face ? i18next.t('figure.label.face-' + one.face) + ' · ' : ''}${placeTerms(one, (key, params) => i18next.t(key, params))}</small>\n </span>\n <button quiet edit-place ?disabled=${this.locked} @click=${() => this.editPlace(one)}>\n <md-icon>edit</md-icon>${i18next.t('figure.button.edit-place')}\n </button>\n <button quiet ?disabled=${this.locked} @click=${() => this.command({ kind: 'remove-binding', id: one.id })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-place')}\n </button>\n </div>`\n )}\n ${holdsThings(asset)\n ? nothing\n : html`<p hint>${i18next.t('figure.text.place-needs-holding')}</p>\n <button act ?disabled=${this.locked} @click=${() => this.declareHolding(asset)}>\n <md-icon>inventory_2</md-icon>${i18next.t('figure.button.declare-holding')}\n </button>`}\n <div pair>\n <select @change=${(e: Event) => (this.place = { ...p, role: (e.target as HTMLSelectElement).value as 'seat' | 'grip' })}>\n <option value=\"grip\" ?selected=${p.role === 'grip'}>${roleName('grip')}</option>\n <option value=\"seat\" ?selected=${p.role === 'seat'}>${roleName('seat')}</option>\n </select>\n <select @change=${(e: Event) => (this.place = { ...p, face: (e.target as HTMLSelectElement).value as FigureFace })}>\n ${faces.map(one => html`<option value=${one} ?selected=${one === face}>${i18next.t('figure.label.face-' + one)}</option>`)}\n </select>\n </div>\n <div form>\n <span>${i18next.t('figure.label.place-name')}</span>\n <input .value=${p.label} placeholder=${roleName(p.role)} @change=${(e: Event) => (this.place = { ...p, label: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-accepts')}</span>\n <input .value=${p.accepts} placeholder=${i18next.t('figure.text.place-accepts-any')} @input=${(e: Event) => (this.place = { ...p, accepts: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-capacity')}</span>\n <input type=\"number\" min=\"1\" step=\"1\" .value=${String(p.capacity)} @change=${(e: Event) => (this.place = { ...p, capacity: (e.target as HTMLInputElement).valueAsNumber })} />\n </div>\n <button\n act\n ?disabled=${this.locked || !capacityOk}\n @click=${() => {\n this.command({\n kind: 'add-binding',\n id: this.placeEditing ?? placeIdFor(asset, this.partId, p.role),\n label: p.label.trim() || roleName(p.role),\n role: p.role,\n part: this.partId,\n face,\n /* None named: it takes any item (ADR-0051 §4.1 decision 5). */\n ...(accepts.length ? { accepts } : {}),\n capacity: p.capacity,\n ...(this.placeEditing ? { replace: true } : {})\n })\n this.placeEditing = null\n this.place = freshPlace()\n }}\n >\n <md-icon>back_hand</md-icon>${i18next.t(this.placeEditing ? 'figure.button.save-place' : 'figure.button.add-place')}\n </button>\n ${this.placeEditing\n ? html`<button quiet @click=${() => ((this.placeEditing = null), (this.place = freshPlace()))}>${i18next.t('figure.button.cancel-place-edit')}</button>`\n : nothing}\n `\n }\n\n /** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */\n private declareHolding(asset: FigureAsset) {\n const names = [...new Set([...(asset.document.capabilities.names ?? []), 'Capacity', 'Holdable'])]\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-capabilities', names } }, bubbles: true, composed: true }))\n }\n\n /**\n * 정렬·간격 고치기: the part moved inside the face it is fastened on, as one step -- the least move on each side it is\n * out, or centred when it is wider than the face. When nothing of it can be moved, why is said under the button, not\n * nothing at all (:3300, 2026-10-11: the button only scrolled to the drawing, which was already in view). The command\n * is the fastening window's for the same choice (`fasten-form.ts`), with only the place across the face changed.\n */\n private fixAlignment() {\n const revision = this.revision\n if (!revision) return\n const form = fastenFormOf(revision, this.partId)\n /* Whether it is out, and the least move that brings it in, are the kernel's measure (ADR-0140 3.8). */\n const own = figureFaceOverhangOf(revision.asset, this.partId, revision.inputs)\n const fixed =\n own?.state === 'unknown'\n ? ({ cannot: 'unmeasured' } as const)\n : own?.state === 'out' || own?.state === 'possible'\n ? insideAlignmentOf(fastenPlanOf(revision, this.partId, form).view, form.align, form.alignMm)\n : ({ cannot: 'inside' } as const)\n if ('cannot' in fixed) {\n this.fixNote = i18next.t(`figure.text.fix-alignment-${fixed.cannot}`, { part: this.partId, on: form.target })\n return\n }\n this.fixNote = ''\n const action = fastenPlanOf(revision, this.partId, { ...form, align: fixed.align, alignMm: fixed.alignMm }).action\n if (action) this.command(action)\n }\n\n /** The fastening window, asked of the editor: it opens over the canvas on what the part has now. */\n private openFastening() {\n this.dispatchEvent(new CustomEvent('fasten-open', { bubbles: true, composed: true }))\n }\n\n /**\n * What holds the part, said as its state -- 「바닥에 붙어 있음」 -- with the ways to change it: open the fastening,\n * or take it off. Right after \"follow size, attached\" this is the result, not a refusal (designer 2026-09-27).\n */\n private heldWords(asset: FigureAsset) {\n const joint = (asset.joints ?? []).find(j => j.body1.part === this.partId)\n const gap = joint?.origin?.gap ?? 0\n const place = i18next.t(`figure.label.resize-place-${asset.placement ?? 'floor'}`)\n const where = !joint\n ? i18next.t('figure.text.held-by-rule')\n : 'plane' in joint.body0\n ? typeof gap === 'number'\n ? i18next.t('figure.text.held-on-plane', { place, gap: String(gap) })\n : i18next.t('figure.text.held-on-plane-worked-out', { place })\n : i18next.t('figure.text.held-on-part', { other: joint.body0.part, otherFace: i18next.t(endPlaceKeyOf(joint.body0)) })\n return where\n }\n\n /**\n * Positions worked out from other values, each with the way to\n * keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.\n */\n private renderPositions(asset: FigureAsset) {\n return positionsWorkedOut(asset, this.partId).map(\n axis => html`<div pair>\n <span>${axis.toUpperCase()} · ${i18next.t(positionIsShare(asset, this.partId, axis) ? 'figure.label.position-in-proportion' : 'figure.label.position-worked-out')}</span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'fix-position', part: this.partId, axis })}>\n <md-icon>push_pin</md-icon>${i18next.t('figure.button.fix-position')}\n </button>\n ${hasInstanceSize(asset, axis) && !positionIsShare(asset, this.partId, axis)\n ? html`<button act ?disabled=${this.locked} title=${i18next.t('figure.text.scale-position-explained')} @click=${() => this.command({ kind: 'scale-position', part: this.partId, axis })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.scale-position')}\n </button>`\n : nothing}\n </div>`\n )\n }\n\n /**\n * The fastening in one line -- what, on which face, how -- and 「바꾸기」 to open the window where it is chosen (chief\n * architect 2026-10-16; user 2026-10-17: the result here, the editing in a window with room). Taking it off is in the\n * group's 「⋯」. What hangs over the face, and the way to fix it, stay here: they are about the fastening as it is now.\n */\n private renderFastening(asset: FigureAsset) {\n const revision = this.revision!\n const own = fasteningOf(revision, this.partId)\n /* Placed by an origin (ADR-0107 decision 4): attach writes faces, so the window would move it off its origin. Said, and taken off only. */\n if (own?.atOrigin)\n return html`<div fastened fasten-at-origin>\n <p>${this.heldWords(asset)}</p>\n ${this.renderDetachWords()}\n </div>`\n const overhang = html`${this.overhangNote.length ? html`<p hint overhang-note>${this.overhangNote.join(' ')}</p>` : nothing}\n ${this.overhangWords.length\n ? html`<div overhang role=\"status\">\n ${this.overhangWords.map(line => html`<p>${line}</p>`)}\n ${own\n ? html`<button act fix-alignment ?disabled=${this.locked} @click=${() => this.fixAlignment()}>\n <md-icon>tune</md-icon>${i18next.t('figure.button.fix-alignment')}\n </button>\n ${this.fixNote ? html`<p hint fix-note>${this.fixNote}</p>` : nothing}`\n : nothing}\n </div>`\n : nothing}`\n if (own && heldBy(asset, this.partId)) {\n const form = fastenFormOf(revision, this.partId)\n const plan = fastenPlanOf(revision, this.partId, form)\n if (plan.action) this.fastenCandidate = { action: plan.action, ...(plan.face ? { face: plan.face } : {}) }\n const planeWord = i18next.t('figure.label.resize-place-' + (asset.placement ?? 'floor'))\n return html`\n ${overhang}\n <div fastened-summary>\n <p fasten-sentence>${fastenSentenceOf(form, plan, planeWord, (key, params) => i18next.t(key, params))}</p>\n <button act change-fastening ?disabled=${this.locked} @click=${() => this.openFastening()}>${i18next.t('figure.button.change-fastening')}</button>\n </div>\n ${this.renderDetachWords()}\n `\n }\n /* A blank attachment is not a form to decipher: what it does, and the way to the window. */\n return html`\n ${overhang}\n <p hint>${i18next.t('figure.text.fasten-start')}</p>\n <button act fasten-start ?disabled=${this.locked} @click=${() => this.openFastening()}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten-start')}\n </button>\n `\n }\n\n private renderDetachWords() {\n /* One thing to say is a line, not a list of one. */\n if (this.detachWords.length === 1) return html`<p hint detach-words>${this.detachWords[0]}</p>`\n return this.detachWords.length ? html`<ul detach-words>${this.detachWords.map(line => html`<li>${line}</li>`)}</ul>` : nothing\n }\n\n /**\n * Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its\n * face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section\n * (the editor's) shows it and takes it away.\n */\n private renderPreviewWords() {\n if (this.previewWords.length === 1) return html`<p preview-words role=\"status\">${this.previewWords[0]}</p>`\n return this.previewWords.length ? html`<ul preview-words role=\"status\">${this.previewWords.map(line => html`<li>${line}</li>`)}</ul>` : nothing\n }\n\n /**\n * A row (ADR-0097 §5.5): said as what it makes, \"arranged in a row\". Where it cannot be made here, why, rather than\n * nothing. Filling the length, the centre spacing is the author's; a count of their own is spread evenly over the\n * length -- figure-model draws it so, and the form does not ask for a spacing it would not use.\n */\n private renderRow(asset: FigureAsset) {\n if (rowOf(asset, this.partId)) return nothing\n const blocked = rowBlockOf(asset, this.partId)\n const axes = rowAxesOf(asset, this.partId)\n const r = this.row\n /*\n Folded, open while it is being worked (2026-10-02): a row is made now and then, and most parts stand on the plane,\n where the section said its reason open on every one. Opened, it says why or asks how.\n */\n const head = html`<summary><h3>${i18next.t('figure.label.repeat')} <span section-state>${i18next.t('figure.label.repeat-inactive')}</span></h3></summary>`\n if (blocked || !axes.length)\n return html`<section row><details row-fold open>\n ${head}\n <p hint row-blocked>${i18next.t(`figure.text.row-blocked-${blocked ?? 'unfastened'}`, { part: this.partId })}</p>\n ${blocked === 'unfastened'\n ? html`<button act @click=${() => this.dispatchEvent(new CustomEvent('go-fasten', { bubbles: true, composed: true }))}><md-icon>link</md-icon>${i18next.t('figure.button.go-fasten')}</button>`\n : nothing}\n </details></section>`\n const axis = axes.includes(r.axis as Axis) ? (r.axis as Axis) : axes[0]!\n const ok = r.fills ? r.pitch > 0 : Number.isSafeInteger(r.count) && r.count >= 1\n const action = ok\n ? ({ kind: 'make-repeat', part: this.partId, axis, pitch: r.fills ? r.pitch : Math.max(r.pitch, 1), ...(r.fills ? {} : { count: r.count }) } as FigureAuthoringAction)\n : undefined\n this.rowCandidate = action\n const set = (next: typeof r) => ((this.row = next), (this.rowOpen = true))\n /*\n Whether the row is being worked follows the fold's own toggle. A press on the heading focuses it before the click;\n set on focus, the fold opened there and the click then folded it again (2026-10-11: it took two clicks to open).\n */\n const toggled = (e: Event) => (this.rowOpen = (e.target as HTMLDetailsElement).open)\n return html`<section row><details row-fold ?open=${this.rowOpen} @toggle=${toggled}>\n ${head}\n <p hint>${i18next.t('figure.text.repeat-intro')}</p>\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select aria-label=${i18next.t('figure.label.repeat-axis')} ?disabled=${this.locked} @change=${(e: Event) => set({ ...r, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${axes.map(a => html`<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}\n </select>\n </div>\n <p hint>${i18next.t('figure.text.repeat-direction')}</p>\n <div choice-row role=\"radiogroup\" aria-label=${i18next.t('figure.label.row-basis')}>\n <label toggle><input type=\"radio\" name=\"row-basis\" ?disabled=${this.locked} .checked=${r.fills} @change=${() => set({ ...r, fills: true })} />${i18next.t('figure.label.repeat-fills')}</label>\n <label toggle><input type=\"radio\" name=\"row-basis\" ?disabled=${this.locked} .checked=${!r.fills} @change=${() => set({ ...r, fills: false })} />${i18next.t('figure.label.row-by-count')}</label>\n </div>\n ${r.fills\n ? html`<div form>\n <span>${i18next.t('figure.label.repeat-pitch')} · mm</span>\n <input aria-label=${i18next.t('figure.label.repeat-pitch')} ?disabled=${this.locked} type=\"number\" step=\"any\" min=\"0\" .value=${String(r.pitch)} @change=${(e: Event) => set({ ...r, pitch: Number((e.target as HTMLInputElement).value) })} />\n </div>`\n : html`<div form>\n <span>${i18next.t('figure.label.repeat-count')}</span>\n <input aria-label=${i18next.t('figure.label.repeat-count')} ?disabled=${this.locked} type=\"number\" step=\"1\" min=\"1\" .value=${String(r.count)} @change=${(e: Event) => set({ ...r, count: Number((e.target as HTMLInputElement).value) })} />\n </div>\n <p hint>${i18next.t('figure.text.row-count-spreads')}</p>`}\n ${action && this.rowOpen ? html`<p hint>${i18next.t('figure.text.repeat-draft')}</p>${this.renderPreviewWords()}` : nothing}\n <button act ?disabled=${this.locked || !action} @click=${() => action && this.command(action)}>\n <md-icon>view_week</md-icon>${i18next.t('figure.button.make-repeat')}\n </button>\n </details></section>`\n }\n\n /**\n * When the part is drawn: always, or while a control is at least a value -- a lamp lit while the gate is open. One\n * part edit (`set-visibility`), one step. Offered once the figure has a control; a motion is what makes one.\n */\n /**\n * A measure a control sets (modeller snag C1, 2026-10-26): a wound roll shrinking to its core. Each measure that does is\n * one line with the way back to a fixed number; the form makes another. Measures read as the size row shows them --\n * a cylinder's X as its diameter.\n */\n private renderStateSize(asset: FigureAsset) {\n const revision = this.revision\n if (!revision) return nothing\n const part = this.partId\n const axes = followableAxes(asset, part)\n if (!axes.length) return nothing\n const word = (axis: Axis) => `${axis.toUpperCase()}${measureFactor(asset, part, axis) === 2 ? ' · ' + i18next.t('figure.label.size-diameter') : ''}`\n const unitWord = (unit: string) => i18next.t(`figure.label.state-unit-${unit}`)\n const sized = axes.flatMap(axis => {\n const f = followOf(asset, part, axis)\n return f.of === 'state' ? [{ axis, f }] : []\n })\n const free = axes.filter(axis => !sized.some(one => one.axis === axis))\n const form = this.stateSize\n const axis = form.axis && free.includes(form.axis) ? form.axis : free[0] ?? ''\n const factor = axis ? measureFactor(asset, part, axis) : 1\n const atMax = Number.isFinite(form.atMax) ? form.atMax : axis ? (measureNow(revision, part, axis) ?? NaN) : NaN\n const id = form.id || stateSizeIdFor(asset, part)\n const controls = visibilityControlsOf(asset)\n const command = stateSizeCommandOf(asset, part, { ...form, axis, atMax }, factor, id)\n /* A control already there is taken with its unit and range; another unit or range would be refused. */\n const pickControl = (value: string) => {\n const there = controls.find(c => c.id === value)\n this.stateSize = there && ['percent', 'ratio', 'mm'].includes(there.unit)\n ? { ...form, id: value, unit: there.unit as StateSizeForm['unit'], min: there.min, max: there.max }\n : { ...form, id: value }\n }\n const number = (key: 'min' | 'max' | 'atMin' | 'atMax') => (e: Event) => (this.stateSize = { ...form, axis, [key]: (e.target as HTMLInputElement).valueAsNumber })\n return html`<h4 state-size>${i18next.t('figure.label.state-size')}</h4>\n ${sized.map(({ axis: one, f }) => {\n const k = measureFactor(asset, part, one)\n const input = controls.find(c => c.id === f.input)\n return html`<div pair state-size-row=${one}>\n <span>${word(one)}\n <small>${i18next.t('figure.text.state-size-row', {\n control: input?.label ?? f.input,\n min: String(input?.min ?? ''),\n max: String(input?.max ?? ''),\n unit: input ? unitWord(input.unit) : '',\n from: String(Math.round(f.at.min * k * 1000) / 1000),\n to: String(Math.round(f.at.max * k * 1000) / 1000)\n })}</small>\n </span>\n <button act ?disabled=${this.locked} @click=${() => {\n const back = stateSizeFixedOf(asset, part, one)\n if (back) this.command(back)\n }}><md-icon>close</md-icon>${i18next.t('figure.button.state-size-fix')}</button>\n </div>`\n })}\n ${free.length\n ? html`<div form state-size-form>\n <span>${i18next.t('figure.label.state-size-measure')}</span>\n <select ?disabled=${this.locked} @change=${(e: Event) => (this.stateSize = { ...form, axis: (e.target as HTMLSelectElement).value as Axis, atMax: NaN })}>\n ${free.map(one => html`<option value=${one} ?selected=${one === axis}>${word(one)}</option>`)}\n </select>\n <span>${i18next.t('figure.label.control-id')}</span>\n <input list=\"state-size-controls\" .value=${id} ?disabled=${this.locked} @change=${(e: Event) => pickControl((e.target as HTMLInputElement).value.trim())} />\n <datalist id=\"state-size-controls\">${controls.map(c => html`<option value=${c.id}>${c.label}</option>`)}</datalist>\n <span>${i18next.t('figure.label.state-size-unit')}</span>\n <select ?disabled=${this.locked} @change=${(e: Event) => {\n const unit = (e.target as HTMLSelectElement).value as StateSizeForm['unit']\n this.stateSize = { ...form, axis, unit, ...(unit === 'percent' ? { min: 0, max: 100 } : unit === 'ratio' ? { min: 0, max: 1 } : {}) }\n }}>\n ${(['percent', 'ratio', 'mm'] as const).map(u => html`<option value=${u} ?selected=${u === form.unit}>${unitWord(u)}</option>`)}\n </select>\n <span>${i18next.t('figure.label.control-range')} (${unitWord(form.unit)})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(form.min)} ?disabled=${this.locked} @change=${number('min')} />\n <input type=\"number\" step=\"any\" .value=${String(form.max)} ?disabled=${this.locked} @change=${number('max')} />\n </div>\n <span>${i18next.t('figure.label.state-size-at-min')} (mm)</span>\n <input type=\"number\" step=\"any\" min=\"0\" state-size-at-min .value=${Number.isFinite(form.atMin) ? String(form.atMin) : ''} ?disabled=${this.locked} @change=${number('atMin')} />\n <span>${i18next.t('figure.label.state-size-at-max')} (mm)</span>\n <input type=\"number\" step=\"any\" min=\"0\" state-size-at-max .value=${Number.isFinite(atMax) ? String(atMax) : ''} ?disabled=${this.locked} @change=${number('atMax')} />\n </div>\n <button act add-state-size ?disabled=${this.locked || !command} @click=${() => {\n if (!command) return\n this.command(command)\n this.stateSize = freshStateSize()\n }}><md-icon>open_in_full</md-icon>${i18next.t('figure.button.add-state-size')}</button>`\n : nothing}`\n }\n\n private renderShown(asset: FigureAsset) {\n const controls = visibilityControlsOf(asset)\n if (!controls.length) return nothing\n const now = shownWhenOf(asset, this.partId)\n const send = (shownWhen: { input: string; atLeast: number } | null) =>\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-visibility', target: this.partId, shownWhen } }, bubbles: true, composed: true }))\n const first = (id: string) => {\n const c = controls.find(one => one.id === id)!\n return Math.round((c.min + (c.max - c.min) * 0.01) * 1000) / 1000\n }\n const unit = now ? controls.find(c => c.id === now.input)?.unit : ''\n return html`<div form>\n <span>${i18next.t('figure.label.shown-when')}</span>\n <select\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const id = (e.target as HTMLSelectElement).value\n send(id ? { input: id, atLeast: now?.input === id ? now.atLeast : first(id) } : null)\n }}\n >\n <option value=\"\" ?selected=${!now}>${i18next.t('figure.label.shown-always')}</option>\n ${controls.map(c => html`<option value=${c.id} ?selected=${now?.input === c.id}>${i18next.t('figure.label.shown-while', { control: c.label })}</option>`)}\n </select>\n ${now\n ? html`<span>${i18next.t('figure.label.shown-at-least')}${unit ? ` (${unit})` : ''}</span>\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.atLeast)}\n @change=${(e: Event) => {\n const v = (e.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(v)) send({ input: now.input, atLeast: v })\n }}\n />`\n : nothing}\n </div>`\n }\n\n private renderMotion(asset: FigureAsset) {\n const now = motionOf(asset, this.partId)\n const joint = asset.joints?.find(j => j.body1.part === this.partId)\n if (now && !(this.editingMotion && joint)) {\n /* Which part moves, against what, which way, how far -- by name (ADR-0097 §5.5). */\n const against = joint ? ('plane' in joint.body0 ? i18next.t('figure.label.mounting-plane') : joint.body0.part) : ''\n const ends = this.motionEnds\n /* One row an axis (ADR-0159): how it moves and by what, changed or taken away where it is; more added under them. */\n const count = joint ? figureMotionsOf(joint).length : 1\n const edit = (k: number) => {\n if (!joint) return\n this.motionAxis = k\n this.motion = motionFormOf(joint, k)\n this.editingMotion = true\n }\n const row = (k: number) => {\n const it = k === 0 ? now : motionOf(asset, this.partId, k)\n if (!it) return nothing\n return html`<div pair motion-axis=${k}>\n <span>\n ${count > 1 ? html`<b>${i18next.t('figure.label.motion-axis-n', { n: k + 1 })}</b> ` : nothing}${i18next.t('figure.label.motion-' + it.kind)} · ${it.vector ? jointAxisWord(it.vector) : String(it.axis).toUpperCase()}\n ${it.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: it.travel.part, axis: it.travel.axis.toUpperCase(), plus: it.travel.plus ?? 0 })}</small>`\n : nothing}\n ${it.follows?.sum.length === 1\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: it.follows.sum[0]!.joint, multiplier: it.follows.sum[0]!.multiplier, offset: it.follows.offset })}</small>`\n : it.follows\n ? html`<small>${i18next.t('figure.label.motion-follow')}: ${it.follows.sum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')} + ${it.follows.offset}</small>`\n : it.control\n ? html`<small>${it.control.id} (${it.control.unit}) ${it.control.min} … ${it.control.max}</small>`\n : nothing}\n </span>\n ${count > 1\n ? html`<button act remove-axis ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: withoutAxis(joint, k) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-axis')}\n </button>`\n : html`<button act ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>`}\n <button act ?disabled=${this.locked || !joint} @click=${() => edit(k)}>\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\n </div>`\n }\n return html`<p motion-summary>\n ${i18next.t('figure.text.motion-summary', {\n part: this.partId,\n against,\n kind: i18next.t('figure.label.motion-' + now.kind),\n axis: now.vector ? jointAxisWord(now.vector) : String(now.axis).toUpperCase()\n })}\n </p>\n ${ends\n ? html`<p hint motion-ends>${i18next.t('figure.text.motion-ends-shown', { min: String(ends.min), max: String(ends.max), unit: ends.unit })}</p>`\n : nothing}\n ${Array.from({ length: count }, (_, k) => row(k))}\n <div pair>\n <button act add-axis ?disabled=${this.locked || !joint} @click=${() => edit(count)}>\n <md-icon>add</md-icon>${i18next.t('figure.button.add-axis')}\n </button>\n ${count > 1\n ? html`<button act ?disabled=${this.locked || !joint} @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>`\n : nothing}\n </div>`\n }\n /* A joint needs a parent (URDF): a part fastened to nothing is fastened first. */\n if (!joint)\n return html`<p hint>${i18next.t('figure.text.fasten-before-moving')}</p>\n <button act go-fasten @click=${() => this.dispatchEvent(new CustomEvent('go-fasten', { bubbles: true, composed: true }))}>\n <md-icon>link</md-icon>${i18next.t('figure.button.go-fasten')}\n </button>`\n const m = this.motion\n const unit = m.kind === 'slide' ? 'mm' : 'deg'\n /* A follower follows a joint that moves the same way; a choice the kind no longer allows is dropped. */\n const k = this.motionAxis\n const leaders = leadersFor(asset, this.partId, m.kind, motionIdOf(joint, k))\n const adding = k > 0 && k >= figureMotionsOf(joint).length\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n const refusal = motionFormRefusalOf(m, follow)\n return html`\n ${k > 0 ? html`<p motion-axis-heading><b>${i18next.t('figure.label.motion-axis-n', { n: k + 1 })}</b></p>` : nothing}\n <div pair>\n <select @change=${(e: Event) => this.setKind((e.target as HTMLSelectElement).value as 'slide' | 'turn' | 'continuous')}>\n <option value=\"slide\" ?selected=${m.kind === 'slide'}>${i18next.t('figure.label.motion-slide')}</option>\n <option value=\"turn\" ?selected=${m.kind === 'turn'}>${i18next.t('figure.label.motion-turn')}</option>\n <option value=\"continuous\" ?selected=${m.kind === 'continuous'}>${i18next.t('figure.label.motion-continuous')}</option>\n </select>\n ${m.axisVector\n ? html`<span motion-axis-vector>${i18next.t('figure.label.motion-axis')} ${jointAxisWord(m.axisVector)}</span>`\n : html`<select @change=${(e: Event) => (this.motion = { ...m, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${AXES.map(a => html`<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}\n </select>`}\n </div>\n ${m.followSum\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <span>${m.followSum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')}</span>\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : leaders.length\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, follow: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>\n ${leaders.map(j => html`<option value=${j.id} ?selected=${j.id === follow}>${j.part}${j.state?.id ? ` · ${j.state.id}` : j.id !== j.part ? ` · ${j.id}` : ''}</option>`)}\n </select>\n </div>`\n : nothing}\n ${m.followSum\n ? nothing\n : follow\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-multiplier')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.multiplier)} @change=${(e: Event) => (this.motion = { ...m, multiplier: Number((e.target as HTMLInputElement).value) })} />\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : html`<div form>\n ${m.kind === 'slide'\n ? html`<span>${i18next.t('figure.label.motion-travel')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, travel: (e.target as HTMLSelectElement).value })}>\n ${m.travelSum\n ? html`<option value=\"\" ?selected=${!m.travel}>${m.travelSum.sum.map(t => `${t.from.of === 'input' ? t.from.input : `${t.from.of === 'part' ? t.from.part : i18next.t('figure.label.motion-travel')} · ${t.from.axis.toUpperCase()}`}${t.times !== undefined && t.times !== 1 ? ` × ${t.times}` : ''}`).join(' + ')}</option>`\n : html`<option value=\"\" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>`}\n ${asset.appearance\n .map(look => look.target)\n .filter(one => canFollow(asset, one))\n .flatMap(one => AXES.map(a => html`<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}\n </select>\n ${m.travel\n ? html`<span>${i18next.t('figure.label.follows-plus')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.travelPlus ?? 0)} @change=${(e: Event) => (this.motion = { ...m, travelPlus: Number((e.target as HTMLInputElement).value) || 0 })} />`\n : nothing}`\n : nothing}\n <span>${i18next.t('figure.label.control-id')}</span>\n <input .value=${m.id} placeholder=${controlIdFor(this.partId, m.kind, k)} @change=${(e: Event) => (this.motion = { ...m, id: (e.target as HTMLInputElement).value.trim() })} />\n ${m.kind === 'continuous' || (m.kind === 'slide' && (m.travel || m.travelSum))\n ? nothing\n : html`<span>${i18next.t('figure.label.control-range')} (${unit})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(m.min)} @change=${(e: Event) => (this.motion = { ...m, min: Number((e.target as HTMLInputElement).value) })} />\n <input type=\"number\" step=\"any\" .value=${String(m.max)} @change=${(e: Event) => (this.motion = { ...m, max: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n </div>`}\n <button\n act\n ?disabled=${this.locked || !!refusal}\n title=${refusal === 'range' ? i18next.t('figure.text.range-needs-room') : ''}\n @click=${() => {\n this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId, k) })\n this.editingMotion = false\n this.motionAxis = 0\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(adding ? 'figure.button.add-axis' : this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => ((this.editingMotion = false), (this.motionAxis = 0))}><md-icon>undo</md-icon>${i18next.t('figure.button.cancel-motion-change')}</button>`\n : nothing}\n `\n }\n\n private setKind(kind: 'slide' | 'turn' | 'continuous') {\n this.motion = kind === 'slide' ? { ...this.motion, kind, min: 0, max: 500 } : { ...this.motion, kind, min: -90, max: 90 }\n }\n\n private command(action: FigureAuthoringAction) {\n this.dispatchEvent(new CustomEvent('command', { detail: { action }, bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -30,6 +30,8 @@ export declare class FigurePreview extends FigurePreview_base {
|
|
|
30
30
|
private valuing;
|
|
31
31
|
/** Data tried in the data tab: the preview's figures take it as their \`data\`, as a board's data source gives it; null when none is. */
|
|
32
32
|
sample: unknown;
|
|
33
|
+
/** Sample legends by role (ADR-0166 10): the scene's legends named as the roles, as a board would give them. */
|
|
34
|
+
legends: Record<string, unknown>;
|
|
33
35
|
/** The part chosen in the editor. The size help starts on it, so the help speaks of the part the author was working on. */
|
|
34
36
|
selected: string;
|
|
35
37
|
private setupPart;
|
|
@@ -69,6 +71,8 @@ export declare class FigurePreview extends FigurePreview_base {
|
|
|
69
71
|
private tellData;
|
|
70
72
|
/** The data sample to the figures standing now. */
|
|
71
73
|
private tellSample;
|
|
74
|
+
/** The sample legends as the scene's (its root container's, where a board's are): its tables choose again. */
|
|
75
|
+
private tellLegends;
|
|
72
76
|
willUpdate(changed: Map<string, unknown>): void;
|
|
73
77
|
firstUpdated(): void;
|
|
74
78
|
disconnectedCallback(): void;
|
|
@@ -3,7 +3,7 @@ import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
|
|
|
3
3
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
4
|
import { i18next, localize } from '@operato/i18n';
|
|
5
5
|
import { compileFigureAsset } from '@hatiolab/figure-model';
|
|
6
|
-
import { create, registerFigure, unregisterFigure } from '@hatiolab/things-scene';
|
|
6
|
+
import { create, figureLegendSourcesChanged, registerFigure, unregisterFigure } from '@hatiolab/things-scene';
|
|
7
7
|
import { DEFAULT_VIEW, previewBoardDepth, sceneLook, WORKBENCH } from '@things-factory/figure-viewer/dist-client/figure-view.js';
|
|
8
8
|
import { dialShape } from './angle-dial.js';
|
|
9
9
|
import { domainOf, motionWrittenByData, typedValueOf, valueRowsOf } from './data-interface.js';
|
|
@@ -33,6 +33,8 @@ let FigurePreview = class FigurePreview extends localize(i18next)(LitElement) {
|
|
|
33
33
|
this.valuing = {};
|
|
34
34
|
/** Data tried in the data tab: the preview's figures take it as their \`data\`, as a board's data source gives it; null when none is. */
|
|
35
35
|
this.sample = null;
|
|
36
|
+
/** Sample legends by role (ADR-0166 10): the scene's legends named as the roles, as a board would give them. */
|
|
37
|
+
this.legends = {};
|
|
36
38
|
/** The part chosen in the editor. The size help starts on it, so the help speaks of the part the author was working on. */
|
|
37
39
|
this.selected = '';
|
|
38
40
|
this.setupPart = '';
|
|
@@ -474,9 +476,19 @@ let FigurePreview = class FigurePreview extends localize(i18next)(LitElement) {
|
|
|
474
476
|
if (this.sample !== null && this.sample !== undefined)
|
|
475
477
|
this.tellData(this.sample);
|
|
476
478
|
}
|
|
479
|
+
/** The sample legends as the scene's (its root container's, where a board's are): its tables choose again. */
|
|
480
|
+
tellLegends() {
|
|
481
|
+
const container = this.scene?.rootContainer;
|
|
482
|
+
if (!container)
|
|
483
|
+
return;
|
|
484
|
+
container.style = { ...this.legends };
|
|
485
|
+
figureLegendSourcesChanged();
|
|
486
|
+
}
|
|
477
487
|
willUpdate(changed) {
|
|
478
488
|
if (changed.has('sample') && this.scene)
|
|
479
489
|
this.tellData(this.sample);
|
|
490
|
+
if (changed.has('legends') && this.scene)
|
|
491
|
+
this.tellLegends();
|
|
480
492
|
if (!this.hasUpdated)
|
|
481
493
|
return;
|
|
482
494
|
if (!this.active) {
|
|
@@ -576,6 +588,7 @@ let FigurePreview = class FigurePreview extends localize(i18next)(LitElement) {
|
|
|
576
588
|
this.scene.rootContainer.rebuildContentModel(model, { preserveThreeD: true });
|
|
577
589
|
this.standing = signature;
|
|
578
590
|
this.cannot = '';
|
|
591
|
+
this.tellLegends();
|
|
579
592
|
this.tellSample();
|
|
580
593
|
return;
|
|
581
594
|
}
|
|
@@ -588,6 +601,7 @@ let FigurePreview = class FigurePreview extends localize(i18next)(LitElement) {
|
|
|
588
601
|
this.scene = create({
|
|
589
602
|
target: this.stage,
|
|
590
603
|
model,
|
|
604
|
+
style: { ...this.legends },
|
|
591
605
|
mode: 0
|
|
592
606
|
});
|
|
593
607
|
this.standing = signature;
|
|
@@ -654,6 +668,10 @@ __decorate([
|
|
|
654
668
|
property({ attribute: false }),
|
|
655
669
|
__metadata("design:type", Object)
|
|
656
670
|
], FigurePreview.prototype, "sample", void 0);
|
|
671
|
+
__decorate([
|
|
672
|
+
property({ attribute: false }),
|
|
673
|
+
__metadata("design:type", Object)
|
|
674
|
+
], FigurePreview.prototype, "legends", void 0);
|
|
657
675
|
__decorate([
|
|
658
676
|
property(),
|
|
659
677
|
__metadata("design:type", Object)
|