@things-factory/figure-ui 10.1.128 → 10.1.141

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.
Files changed (95) hide show
  1. package/client/modeller/align.ts +24 -18
  2. package/client/modeller/editor.ts +165 -253
  3. package/client/modeller/fasten-geometry.ts +12 -9
  4. package/client/modeller/figure-facts.ts +12 -14
  5. package/client/modeller/figure-links.ts +16 -12
  6. package/client/modeller/figure-preview.ts +13 -4
  7. package/client/modeller/figure-properties.ts +6 -5
  8. package/client/modeller/figure-verdict.ts +14 -8
  9. package/client/modeller/joint-fan.ts +15 -17
  10. package/client/modeller/links.ts +17 -23
  11. package/client/modeller/live.ts +6 -3
  12. package/client/modeller/motion-ends.ts +6 -7
  13. package/client/modeller/occupancy.ts +2 -3
  14. package/client/modeller/product-session.ts +15 -0
  15. package/client/modeller/revision.ts +66 -0
  16. package/client/pages/figure-modeller-page.ts +5 -18
  17. package/dist-client/modeller/align.d.ts +12 -7
  18. package/dist-client/modeller/align.js +21 -17
  19. package/dist-client/modeller/align.js.map +1 -1
  20. package/dist-client/modeller/editor.d.ts +8 -34
  21. package/dist-client/modeller/editor.js +175 -250
  22. package/dist-client/modeller/editor.js.map +1 -1
  23. package/dist-client/modeller/fasten-geometry.d.ts +3 -2
  24. package/dist-client/modeller/fasten-geometry.js +11 -9
  25. package/dist-client/modeller/fasten-geometry.js.map +1 -1
  26. package/dist-client/modeller/figure-facts.d.ts +9 -1
  27. package/dist-client/modeller/figure-facts.js +11 -15
  28. package/dist-client/modeller/figure-facts.js.map +1 -1
  29. package/dist-client/modeller/figure-links.d.ts +4 -5
  30. package/dist-client/modeller/figure-links.js +14 -13
  31. package/dist-client/modeller/figure-links.js.map +1 -1
  32. package/dist-client/modeller/figure-preview.d.ts +5 -2
  33. package/dist-client/modeller/figure-preview.js +13 -4
  34. package/dist-client/modeller/figure-preview.js.map +1 -1
  35. package/dist-client/modeller/figure-properties.d.ts +3 -2
  36. package/dist-client/modeller/figure-properties.js +6 -6
  37. package/dist-client/modeller/figure-properties.js.map +1 -1
  38. package/dist-client/modeller/figure-verdict.d.ts +4 -2
  39. package/dist-client/modeller/figure-verdict.js +12 -9
  40. package/dist-client/modeller/figure-verdict.js.map +1 -1
  41. package/dist-client/modeller/joint-fan.d.ts +8 -4
  42. package/dist-client/modeller/joint-fan.js +15 -16
  43. package/dist-client/modeller/joint-fan.js.map +1 -1
  44. package/dist-client/modeller/links.d.ts +6 -5
  45. package/dist-client/modeller/links.js +17 -24
  46. package/dist-client/modeller/links.js.map +1 -1
  47. package/dist-client/modeller/live.d.ts +3 -2
  48. package/dist-client/modeller/live.js +7 -3
  49. package/dist-client/modeller/live.js.map +1 -1
  50. package/dist-client/modeller/motion-ends.d.ts +2 -2
  51. package/dist-client/modeller/motion-ends.js +5 -6
  52. package/dist-client/modeller/motion-ends.js.map +1 -1
  53. package/dist-client/modeller/occupancy.d.ts +2 -2
  54. package/dist-client/modeller/occupancy.js +2 -3
  55. package/dist-client/modeller/occupancy.js.map +1 -1
  56. package/dist-client/modeller/product-session.d.ts +44 -39
  57. package/dist-client/modeller/product-session.js +17 -0
  58. package/dist-client/modeller/product-session.js.map +1 -1
  59. package/dist-client/modeller/revision.d.ts +37 -0
  60. package/dist-client/modeller/revision.js +39 -0
  61. package/dist-client/modeller/revision.js.map +1 -0
  62. package/dist-client/pages/figure-modeller-page.d.ts +0 -6
  63. package/dist-client/pages/figure-modeller-page.js +6 -14
  64. package/dist-client/pages/figure-modeller-page.js.map +1 -1
  65. package/dist-client/tsconfig.tsbuildinfo +1 -1
  66. package/package.json +7 -7
  67. package/test/align.test.ts +14 -12
  68. package/test/browser/modeller-page.js +52 -4
  69. package/test/browser/modeller-revision.check.mjs +144 -0
  70. package/test/command-preview.test.ts +9 -8
  71. package/test/fasten-drawing.test.ts +1 -1
  72. package/test/fasten-geometry.test.ts +10 -9
  73. package/test/fields.test.ts +1 -1
  74. package/test/first-minute.test.ts +1 -1
  75. package/test/gizmo.test.ts +1 -1
  76. package/test/joint-fan.test.ts +30 -14
  77. package/test/joint-frames.test.ts +9 -8
  78. package/test/links.test.ts +13 -12
  79. package/test/live.test.ts +3 -3
  80. package/test/parts-wiring.test.ts +1 -1
  81. package/test/properties.test.ts +6 -5
  82. package/test/release-panel.test.ts +3 -3
  83. package/test/resize-with-placement.test.ts +8 -6
  84. package/test/revision-of.ts +22 -0
  85. package/test/revision.test.ts +172 -0
  86. package/test/section-editor.test.ts +4 -3
  87. package/test/section-panel.test.ts +5 -4
  88. package/test/verdict.test.ts +1 -1
  89. package/client/modeller/evaluated.ts +0 -47
  90. package/dist-client/modeller/evaluated.d.ts +0 -12
  91. package/dist-client/modeller/evaluated.js +0 -42
  92. package/dist-client/modeller/evaluated.js.map +0 -1
  93. package/dist-client/tsconfig.scratch.tsbuildinfo +0 -1
  94. package/test/evaluated.test.ts +0 -40
  95. package/test/mode-switch.test.ts +0 -43
@@ -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,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGrD,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,OAAO,EACP,IAAI,EACJ,SAAS,EACT,OAAO,EACP,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,QAAQ,EAER,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,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AAC;;2CAAe;AAE/B;IAAX,QAAQ,EAAE;;4CAAiD;AAE5B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAA4B;AAE3B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CAAsF;AAErF;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,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;;4CAA6C;AAKpC;IAAhB,KAAK,EAAE;;sDAAkC;AAEzB;IAAhB,KAAK,EAAE;;4CAAwB;AACf;IAAhB,KAAK,EAAE;;2CAA+B;AACtB;IAAhB,KAAK,EAAE;;2CAA2C;AAClC;IAAhB,KAAK,EAAE;;0CAA6B;AACpB;IAAhB,KAAK,EAAE;;wCAAyB;AAEhB;IAAhB,KAAK,EAAE;;kDAA8B;AAhG3B,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAw5BvB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { FIGURE_FACES } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureAuthoringAction, FigureDimensionSource, FigureFace } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n alignAxesOf,\n mountingPlaneOf,\n alignOf,\n AXES,\n canFasten,\n facesOf,\n canFollow,\n dimensionNow,\n followableAxes,\n positionIsShare,\n choiceOf,\n fastenedTo,\n heldBy,\n followOf,\n hangsFrom,\n shownWhenOf,\n visibilityControlsOf,\n placeKeptOf,\n fasteningOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionFormRefusalOf,\n endPlaceKeyOf,\n motionJoint,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n rowBlockOf,\n fixedJointOf,\n rowOf,\n positionsWorkedOut,\n fieldWordsOf,\n measureNow,\n type Alignment,\n type Axis,\n type Follow,\n type MotionForm\n} from './links.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport './figure-fasten-drawing.js'\nimport type { FastenChange } from './figure-fasten-drawing.js'\nimport { faceViewOf, modeOf, myFaceFor, turnsInPlace, type FastenMode } from './fasten-geometry.js'\nimport { HelpToggles } from './help.js'\nimport { jointAxisWord } from './joint-axis.js'\n\nconst FACES = Object.keys(FIGURE_FACES) as FigureFace[]\n/** The target list's entry for the plane the figure stands by. */\nconst PLANE = '__plane'\n\nconst freshFasten = () => ({\n face: 'bottom' as FigureFace | 'centre',\n toPlane: false,\n target: '',\n targetFace: 'top' as FigureFace,\n facing: 'meet' as 'meet' | 'flush',\n gap: 0,\n twist: 0,\n align: {} as Partial<Record<Axis, Alignment>>,\n alignMm: {} as Partial<Record<Axis, number>>,\n alignInput: {} as Partial<Record<Axis, string>>\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. 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, css`\n :host {\n display: block;\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; gap: 4px; margin: 12px 0; }\n div[resize-now] div[row] { grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; }\n div[resize-now] span[measure] { font-variant-numeric: tabular-nums; }\n button[link] { background: none; border: none; padding: 0; color: var(--md-sys-color-primary, #477b9e); text-decoration: underline; cursor: pointer; font: inherit; }\n /* Size behaviour is a choice about dimensions only. It never implies a placement or a fastening. */\n details[resize-choice] { margin: 12px 0; padding: 0; border: 0; }\n details[resize-choice] > div { display: grid; gap: 8px; padding: 8px 0; }\n div[resize-held] { display: grid; gap: 8px; margin: 12px 0; padding: 10px 12px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); }\n div[resize-held] p { margin: 0; display: flex; align-items: center; gap: 6px; }\n p[fasten-mode] { margin: 0; font-weight: 600; }\n section[fastening][spotlit] { outline: 2px solid var(--md-sys-color-primary, #477b9e); outline-offset: 4px; border-radius: 6px; transition: outline-color 0.3s; }\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; }\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[row-basis] { display: grid; gap: 4px; margin: 8px 0; }\n div[row-basis] label { display: flex; align-items: center; gap: 6px; }\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 span[fasten-summary] { opacity: 0.8; }\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 asset being edited. */\n @property({ attribute: false }) asset?: FigureAsset\n /** The selected part. */\n @property() partId = ''\n /** The part's own extent along its axes now, in mm — what a dimension is fixed at when it stops following. */\n @property({ attribute: false }) dims?: [number, number, number]\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' | 'places' | 'motion' = 'shape'\n /** What the fastening 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 The fastening command the form describes now, and the face it aims at: told to the editor whenever it changes, so\n the result is seen before it is done (ADR-0097 §5.5). Nothing is told while no target is chosen.\n */\n private candidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private told = ''\n /* Two forms describe a command here: the fastening and the row. The one being worked on is the one seen. */\n @state() private working: 'fasten' | 'row' = 'fasten'\n private fastenCandidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private rowCandidate?: FigureAuthoringAction\n\n /** A new fastening starts with a target. Its face and alignment are asked only after that target is chosen. */\n @state() private choosingFastening = false\n /** The fastening section, marked for a moment when \"open attachment settings\" brings it into view. */\n @state() private spotlit = false\n @state() private fasten = freshFasten()\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\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\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 if (this.asset && this.partId && this.partId !== this.loadedFor) {\n this.loadedFor = this.partId\n /* A part's own fastening is not another part's choices: the form opens on it (walk 1, 2026-09-26). */\n const own = this.asset && this.partId ? fasteningOf(this.asset, this.partId) : null\n this.fasten = own ? ({ ...freshFasten(), ...own } as ReturnType<typeof freshFasten>) : freshFasten()\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.editingMotion = false\n this.choosingFastening = false\n }\n }\n\n updated() {\n /* Only the section that holds the fastening form speaks of it: the panel has one of these per section, and the\n others' silence cleared what it showed (2026-09-27, :3391). */\n if (this.section !== 'shape' && !this.told) 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 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 ${placeFacesOf(asset, this.partId).length ? this.renderPlaces(asset) : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n const shown = html`\n <section>\n <h3>${i18next.t('figure.label.resize-intent')}</h3>\n ${canFollow(asset, this.partId) ? this.renderDimensions(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n <section fastening ?spotlit=${this.spotlit} @focusin=${() => (this.working = 'fasten')}>\n <h3>${i18next.t('figure.label.placement')}${this.help.button('figure.text.fastening-explained')}</h3>${this.help.hint('figure.text.fastening-explained')}\n ${this.renderPositions(asset)}\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n ${this.renderRow(asset)}\n `\n this.candidate = this.working === 'row' && this.rowCandidate ? { action: this.rowCandidate } : 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>${roleName(one.role)} · ${one.face ? i18next.t('figure.label.face-' + one.face) : ''} · ${one.accepts.join(', ')} · ${i18next.t('figure.label.place-holds', { count: one.capacity })}</small>\n </span>\n <button act ?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 private renderDimensions(asset: FigureAsset) {\n const editable = followableAxes(asset, this.partId)\n const round = editable.length === 2\n const word = (axis: Axis) => i18next.t(round && axis === 'x' ? 'figure.label.resize-diameter' : `figure.label.resize-${axis}`)\n const others = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFollow(asset, one))\n const followsAll = editable.every(axis => followOf(asset, this.partId, axis).of === 'instance')\n /* A size of its own on every axis is the usual: nothing to read, only the way to make it follow (user 2026-10-01). */\n const allOwn = editable.every(axis => followOf(asset, this.partId, axis).of === 'own')\n return html`${asset.sizing === 'uniform' ? html`<p hint>${i18next.t('figure.text.resize-uniform-warning')}</p>` : nothing}\n ${allOwn ? nothing : html`<div resize-now>${editable.map(axis => {\n const now = followOf(asset, this.partId, axis)\n const following = now.of === 'instance' && now.axis === axis\n const custom = now.of !== 'own' && !following\n const mm = measureNow(asset, this.partId, axis)\n return html`<div row>\n <b>${word(axis)}</b>\n <span measure>${mm === undefined ? '—' : `${Math.round(mm)} mm`}</span>\n <span>${i18next.t(custom ? 'figure.label.resize-custom' : following ? 'figure.label.resize-following' : 'figure.label.follows-nothing')}</span>\n ${following\n ? html`<button link resize-unfollow=${axis} ?disabled=${this.locked}\n @click=${() => {\n this.follow(asset, axis, 'own', now)\n }}>${i18next.t('figure.button.resize-unfollow')}</button>`\n : nothing}\n </div>`\n })}</div>`}\n ${followsAll\n ? html`<p hint>${i18next.t('figure.text.resize-all-following')}</p>`\n : html`<button act follow-size ?disabled=${this.locked || asset.sizing === 'uniform'} @click=${() => this.command({ kind: 'follow-size', part: this.partId })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size')}\n </button>`}\n <details resize-choice><summary>${i18next.t('figure.label.resize-advanced')}</summary><div>${followableAxes(asset, this.partId).map(axis => {\n const now = followOf(asset, this.partId, axis)\n const value = choiceOf(now)\n /* A cylinder's two measures are its radius and its length; its X and Y name them. */\n const name = round ? i18next.t(axis === 'x' ? 'figure.label.field-radius' : 'figure.label.field-length') : axis.toUpperCase()\n return html`<div row>\n <b>${name}</b>\n <select ?disabled=${this.locked} @change=${(e: Event) => this.follow(asset, axis, (e.target as HTMLSelectElement).value, now)}>\n <option value=\"own\" ?selected=${value === 'own'}>${i18next.t('figure.label.follows-nothing')}</option>\n ${AXES.filter(one => hasInstanceSize(asset, one)).map(\n one => html`<option value=${`share:${one}`} ?selected=${value === `share:${one}`}>\n ${i18next.t('figure.label.follows-instance-share')} · ${one.toUpperCase()}\n </option>\n <option value=${`instance:${one}`} ?selected=${value === `instance:${one}`}>\n ${i18next.t('figure.label.follows-instance')} · ${one.toUpperCase()}\n </option>`\n )}\n ${others.flatMap(other =>\n AXES.map(\n one => html`<option value=${`part:${other}:${one}`} ?selected=${value === `part:${other}:${one}`}>${other} · ${one.toUpperCase()}</option>`\n )\n )}\n ${now.of === 'expression' || now.of === 'input'\n ? html`<option value=${value} selected>${now.of === 'input' ? now.input : i18next.t('figure.label.follows-expression')}</option>`\n : nothing}\n </select>\n ${now.of === 'instance' || now.of === 'part'\n ? html`<span></span>\n <label inline-plus>\n ${i18next.t('figure.label.follows-plus')}\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.plus ?? 0)}\n @change=${(e: Event) => this.followPlus(axis, now, Number((e.target as HTMLInputElement).value) || 0)}\n />\n </label>`\n : nothing}\n </div>`\n })}</div></details>`\n }\n\n /**\n * \"Open attachment settings\": the fastening this part has now -- its face, what it is on, the gap -- in the form below,\n * brought into view with the focus on it. The form is loaded again first: the part was fastened by \"follow size,\n * attached\" while it was selected, so the form still held what it had before (designer 2026-09-27: it opened the\n * holding places instead).\n */\n /** The face the part sits on, in view with the focus on it: where the place across the face is dragged or keyed. */\n private async showWhere() {\n this.working = 'fasten'\n await this.updateComplete\n const where = this.renderRoot.querySelector('figure-fasten-drawing')?.shadowRoot?.querySelector<HTMLElement>('div[where]')\n if (!where) return\n where.scrollIntoView({ block: 'nearest', behavior: 'smooth' })\n where.focus({ preventScroll: true })\n }\n\n /** The fastening form, open on this part and in view: for \"fasten it first\" from elsewhere. */\n async showFastening() {\n if (this.asset) await this.openFastening(this.asset)\n }\n\n private async openFastening(asset: FigureAsset) {\n const own = fasteningOf(asset, this.partId)\n this.fasten = own ? ({ ...freshFasten(), ...own } as ReturnType<typeof freshFasten>) : freshFasten()\n this.spotlit = true\n await this.updateComplete\n const section = this.renderRoot.querySelector<HTMLElement>('section[fastening]')\n section?.scrollIntoView({ block: 'start', behavior: 'smooth' })\n /* Into the form itself, not the section's help button. */\n ;(section?.querySelector<HTMLElement>('select, input') ?? section?.querySelector<HTMLElement>('button'))?.focus({ preventScroll: true })\n setTimeout(() => (this.spotlit = false), 1600)\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 face = joint ? i18next.t(endPlaceKeyOf(joint.body1)) : ''\n const gap = typeof joint?.origin?.gap === 'number' ? joint.origin.gap : 0\n const where = !joint\n ? i18next.t('figure.text.held-by-rule')\n : 'plane' in joint.body0\n ? i18next.t('figure.text.held-on-plane', { face, place: i18next.t(`figure.label.resize-place-${asset.placement ?? 'floor'}`), gap: String(gap) })\n : i18next.t('figure.text.held-on-part', { face, other: joint.body0.part, otherFace: i18next.t(endPlaceKeyOf(joint.body0)) })\n return where\n }\n\n private renderHeld(asset: FigureAsset) {\n const joint = (asset.joints ?? []).find(j => j.body1.part === this.partId)\n return html`<div resize-held>\n <p><md-icon>link</md-icon> ${this.heldWords(asset)}</p>\n <button act open-fastening @click=${() => this.openFastening(asset)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.open-fastening')}\n </button>\n ${joint\n ? html`<button act detach-held ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach-held')}\n </button>\n ${this.renderDetachWords()}`\n : nothing}\n </div>`\n }\n\n /** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */\n private followPlus(axis: Axis, now: Follow, plus: number) {\n if (now.of !== 'instance' && now.of !== 'part') return\n if ((now.plus ?? 0) === plus) return\n const source: FigureDimensionSource = now.of === 'instance' ? { of: 'instance', axis: now.axis } : { of: 'part', part: now.part, axis: now.axis }\n const times = now.of === 'instance' ? now.times : (now.times ?? 1)\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, ...(times !== 1 ? { times } : {}), ...(plus ? { plus } : {}), replace: true })\n }\n\n private follow(asset: FigureAsset, axis: Axis, choice: string, now: Follow) {\n const following = now.of !== 'own'\n /* The measure as it stands: a dimension stops following at it, and a share is taken of it. */\n const current = dimensionNow(asset, this.partId, axis) ?? this.dims?.[AXES.indexOf(axis)] ?? 100\n if (choice === 'own') {\n if (!following) return\n this.command({ kind: 'unlink-dimension', part: this.partId, axis, mm: Math.max(1, Math.round(current)) })\n return\n }\n const [of, a, b] = choice.split(':')\n if (of === 'share') {\n /* A proportional rule: this measure is the share of the instance size it is now, so it grows with the figure. */\n const size = asset.designInputs[`size.${a}`]\n if (!size) return\n const times = Math.round((current / size) * 1e6) / 1e6\n this.command({ kind: 'link-dimension', part: this.partId, axis, source: { of: 'instance', axis: a as Axis }, times, replace: following })\n return\n }\n const source: FigureDimensionSource = of === 'instance' ? { of: 'instance', axis: a as Axis } : { of: 'part', part: a!, axis: b as Axis }\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, replace: following })\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 * A new aim for the fastening: where on the face is filled in as where the part stands now, so fastening it keeps it\n * there (`placeKeptOf`). The author changes it from there.\n */\n private aimAt(asset: FigureAsset, f: ReturnType<typeof freshFasten>) {\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : f.target ? { part: f.target, face: targetFace } : undefined\n this.fasten = { ...f, ...(aim ? placeKeptOf(asset, this.partId, aim, !!f.twist) : { align: {}, alignMm: {}, alignInput: {} }) }\n }\n\n private renderFastening(asset: FigureAsset) {\n const held = heldBy(asset, this.partId)\n /* Placed by an origin (ADR-0107 decision 4): attach writes faces, so the form would move it off its origin. Said, and taken off only. */\n if (fasteningOf(asset, this.partId)?.atOrigin) {\n this.fastenCandidate = undefined\n return html`<div fastened fasten-at-origin>\n <p>${this.heldWords(asset)}</p>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n ${this.renderDetachWords()}\n </div>`\n }\n const f = this.fasten\n /* Not a part that hangs from this one: fastening a frame to its own roller would close a loop. */\n const targets = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFasten(asset, one))\n /* Shown, not dropped, and not choosable, with the reason (ADR-0097 §5.5): fastening it would close a loop. */\n const loops = (one: string) => hangsFrom(asset, one, this.partId)\n /* The faces are the ones each shape declares: a part is fastened by one of its outer faces, to any face of the target. */\n /* On the mounting plane only the faces it takes: a bottom or a top on the floor, a back on a wall. */\n const plane = mountingPlaneOf(asset)\n const planeWord = i18next.t('figure.label.resize-place-' + (asset.placement ?? 'floor'))\n /* Its outer faces, and its centre -- a roller spins about its middle (ADR-0093); the mounting plane takes a face. */\n const mineFaces: Array<FigureFace | 'centre'> = [\n ...(facesOf(asset, this.partId).filter(face => FACES.includes(face as FigureFace) && (!f.toPlane || plane.faces.includes(face as FigureFace))) as FigureFace[]),\n ...(f.toPlane ? [] : (['centre'] as const))\n ]\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : { part: f.target, face: targetFace }\n /* The part's own face is not chosen: the target's face and how give it (user 2026-10-01; the kernel takes no other). */\n const mode: FastenMode = f.toPlane ? 'meet' : modeOf(f.face, f.facing)\n const derived = f.toPlane || f.target ? myFaceFor(asset, this.partId, aim, mode) : undefined\n const myFace = derived ?? (mineFaces.includes(f.face) ? f.face : mineFaces[0]!)\n const align = f.target || f.toPlane ? alignOf(asset, this.partId, aim, f.align, f.alignMm, !!f.twist, f.alignInput) : undefined\n const action =\n f.toPlane || f.target\n ? ({\n kind: 'attach',\n part: this.partId,\n face: myFace,\n to: f.toPlane ? { plane: 'mounting-plane' } : { part: f.target, face: targetFace },\n ...(f.toPlane ? {} : { facing: f.facing }),\n ...(f.gap ? { gap: f.gap } : {}),\n twist: f.twist,\n ...(align ? { align } : {}),\n replace: !!held\n } as FigureAuthoringAction)\n : undefined\n if (action) this.fastenCandidate = { action, ...(f.toPlane ? {} : { face: { part: f.target, face: targetFace } }) }\n /*\n What the folded details hold that is not their default, said while folded; the way and the place on the face are\n the drawing's, and said there (user 2026-10-02: the details had selects repeating the drawing). Nothing is said\n for the default.\n */\n const detail = [\n ...(f.gap ? [i18next.t('figure.text.fasten-summary-gap', { mm: String(f.gap) })] : []),\n ...(f.twist ? [i18next.t('figure.text.fasten-summary-twist', { degrees: String(f.twist) })] : [])\n ]\n /* Across the face, a row only where the drawing cannot set it: no drawing of the face, or a share or a field to follow. */\n const view = f.toPlane || f.target ? faceViewOf(asset, this.partId, aim) : undefined\n const alignRows = (f.toPlane || f.target ? alignAxesOf(asset, this.partId, aim, !!f.twist) : []).filter(\n ({ axis }) => !view || !view.axes.includes(axis) || !!f.alignInput?.[axis] || hasInstanceSize(asset, axis)\n )\n /* A fastening the part has is changed as soon as something is chosen, as the drawing does; a new one waits for 붙이기. */\n const settle = () => this.onFastenRelease(!!held)\n /*\n Fastening it anew is said, so the form is not taken for the one it has (designer 2026-09-27). The one it has is\n said once, by the sentence over the drawing -- the panel's head says it too; a third and a fourth line saying the\n same (「현재 관계 수정」, 「붙은 곳」) went (user 2026-10-01, the panel checked for balance).\n */\n const current = asset.joints?.find(j => j.body1.part === this.partId)\n const editing = i18next.t('figure.text.fasten-new')\n /* A blank attachment is not a form to decipher. Ask for the thing to attach to first. */\n if (!current && !this.choosingFastening && !f.target)\n return html`\n <p hint>${i18next.t('figure.text.fasten-start')}</p>\n <button act ?disabled=${this.locked} @click=${() => (this.choosingFastening = true)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten-start')}\n </button>\n `\n return html`\n ${current ? nothing : html`<p fasten-mode>${editing}</p>`}\n ${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 ${current\n ? html`<button act @click=${() => this.showWhere()}><md-icon>tune</md-icon>${i18next.t('figure.button.fix-alignment')}</button>`\n : nothing}\n </div>`\n : nothing}\n ${held\n ? html`<div fastened>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n ${this.renderDetachWords()}\n </div>`\n : nothing}\n <div form>\n <span>${i18next.t('figure.label.target-part')}</span>\n <select @change=${(e: Event) => {\n const value = (e.target as HTMLSelectElement).value\n this.aimAt(asset, value === PLANE ? { ...f, toPlane: true, target: '' } : { ...f, toPlane: false, target: value })\n if (value) settle()\n }}>\n <option value=\"\" ?selected=${!f.target && !f.toPlane}>${i18next.t('figure.label.target-part-placeholder')}</option>\n <option value=${PLANE} ?selected=${f.toPlane}>${planeWord}</option>\n ${targets.map(one =>\n loops(one)\n ? html`<option value=${one} disabled>${i18next.t('figure.text.target-would-loop', { part: one, mine: this.partId })}</option>`\n : html`<option value=${one} ?selected=${one === f.target && !f.toPlane}>${one}</option>`\n )}\n </select>\n </div>\n ${f.toPlane || f.target\n ? html`<p fasten-sentence>${this.sentenceOf(myFace, f.toPlane ? planeWord : `${f.target}의 ${i18next.t('figure.label.face-' + targetFace)}`, mode)}</p>\n <figure-fasten-drawing\n .target=${f.toPlane ? '' : f.target}\n .planeWord=${planeWord}\n .faces=${theirFaces}\n .face=${targetFace}\n .modes=${f.toPlane ? (['meet'] as FastenMode[]) : ([...(['meet', 'flush'] as FastenMode[]), ...(turnsInPlace(asset, this.partId) ? (['centre'] as FastenMode[]) : [])])}\n .mode=${mode}\n .view=${view}\n .align=${f.align}\n .alignMm=${f.alignMm}\n .gap=${f.gap}\n .partName=${this.partId}\n ?locked=${this.locked}\n ?said=${!!held}\n @fasten-change=${(e: CustomEvent<FastenChange>) => this.onFastenChange(asset, e.detail)}\n @fasten-release=${() => this.onFastenRelease(!!held)}\n ></figure-fasten-drawing>`\n : html`<p hint>${i18next.t('figure.text.fasten-target-first')}</p>`}\n ${(f.toPlane || f.target) ? html`<details fasten-detail>\n <summary>${i18next.t('figure.label.fasten-detail')}${detail.length ? html` · <span fasten-summary>${detail.join(' · ')}</span>` : nothing}</summary>\n ${alignRows.length ? this.renderAlignment(alignRows, settle) : nothing}\n <div form>\n <span>${i18next.t('figure.label.gap')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.gap)} @change=${(e: Event) => ((this.fasten = { ...f, gap: Number((e.target as HTMLInputElement).value) || 0 }), settle())} />\n <span>${i18next.t('figure.label.twist')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.twist)} @change=${(e: Event) => ((this.fasten = { ...f, twist: Number((e.target as HTMLInputElement).value) || 0 }), settle())} />\n </div>\n </details>\n ${/* What 붙이기 would do; a fastening the part has is changed at once, and the canvas shows it. */ action && !held && this.working === 'fasten' ? this.renderPreviewWords() : nothing}\n ${held\n ? nothing\n : html`<button act ?disabled=${this.locked || !action} @click=${() => action && this.command(action)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten')}\n </button>`}` : nothing}\n `\n }\n\n /** 「lid 의 아랫면을 bin 의 윗면에 맞닿게」: what the fastening is, in one line, the part's own face said as a result. */\n private sentenceOf(myFace: string, to: string, mode: FastenMode) {\n return i18next.t(`figure.text.fasten-sentence-${mode}`, { part: this.partId, face: i18next.t('figure.label.face-' + myFace), to })\n }\n\n /** A change the drawing asks: to the form only; the preview behind follows the form. */\n private onFastenChange(asset: FigureAsset, c: FastenChange) {\n const f = this.fasten\n if ('targetFace' in c) this.aimAt(asset, { ...f, targetFace: c.targetFace as FigureFace })\n else if ('mode' in c) this.fasten = { ...f, face: c.mode === 'centre' ? 'centre' : f.face === 'centre' ? 'bottom' : f.face, facing: c.mode === 'flush' ? 'flush' : 'meet' }\n else if ('gap' in c) this.fasten = { ...f, gap: c.gap }\n else\n this.fasten = {\n ...f,\n align: { ...f.align, [c.axis]: c.how },\n alignMm: c.how === 'mm' ? { ...f.alignMm, [c.axis]: c.mm ?? 0 } : f.alignMm\n }\n }\n\n /** Let go: a fastening the part already has is applied as it now is (one step); a new one waits for 붙이기. */\n private async onFastenRelease(held: boolean) {\n if (!held) return\n await this.updateComplete\n if (this.fastenCandidate) this.command(this.fastenCandidate.action)\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 * Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on\n * either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.\n */\n private renderAlignment(axes: { axis: Axis; edges: boolean }[], settle: () => void) {\n const f = this.fasten\n const set = (axis: Axis, how: Alignment) => ((this.fasten = { ...f, align: { ...f.align, [axis]: how } }), settle())\n const setMm = (axis: Axis, mm: number) => ((this.fasten = { ...f, alignMm: { ...f.alignMm, [axis]: mm } }), settle())\n return html`<div form>\n ${axes.map(({ axis, edges }) => {\n const how = f.align[axis] === 'min' || f.align[axis] === 'max' ? (edges ? f.align[axis]! : 'centre') : (f.align[axis] ?? 'centre')\n return html`<span>${i18next.t('figure.label.align-' + axis)}</span>\n <select @change=${(e: Event) => set(axis, (e.target as HTMLSelectElement).value as Alignment)}>\n <option value=\"centre\" ?selected=${how === 'centre'}>${i18next.t('figure.label.align-centre')}</option>\n ${edges\n ? html`<option value=\"min\" ?selected=${how === 'min'}>${i18next.t(`figure.label.align-${axis}-min`)}</option>\n <option value=\"max\" ?selected=${how === 'max'}>${i18next.t(`figure.label.align-${axis}-max`)}</option>`\n : nothing}\n ${f.alignInput?.[axis]\n ? html`<option value=\"input\" ?selected=${how === 'input'}>${i18next.t('figure.label.align-input', { field: fieldWordsOf(f.alignInput[axis]!, key => i18next.t(key)) })}</option>`\n : nothing}\n <option value=\"mm\" ?selected=${how === 'mm'}>${i18next.t('figure.label.align-mm')}</option>\n ${this.asset && hasInstanceSize(this.asset, axis)\n ? html`<option value=\"share\" ?selected=${how === 'share'}>${i18next.t('figure.label.align-share')}</option>`\n : nothing}\n </select>\n ${how === 'mm' || how === 'share'\n ? html`<span></span><input type=\"number\" step=\"any\" aria-label=${i18next.t('figure.label.align-mm')} .value=${String(f.alignMm[axis] ?? 0)} @change=${(e: Event) => setMm(axis, Number((e.target as HTMLInputElement).value) || 0)} />`\n : nothing}`\n })}\n </div>`\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')}</h3></summary>`\n if (blocked || !axes.length)\n return html`<section row><details row-fold>\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.openFastening(asset)}><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.working = 'row'))\n return html`<section row @focusin=${() => (this.working = 'row')}><details row-fold ?open=${this.working === 'row'}>\n ${head}\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select @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 <div row-basis role=\"radiogroup\" aria-label=${i18next.t('figure.label.row-basis')}>\n <label><input type=\"radio\" name=\"row-basis\" .checked=${r.fills} @change=${() => set({ ...r, fills: true })} />${i18next.t('figure.label.repeat-fills')}</label>\n <label><input type=\"radio\" name=\"row-basis\" .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 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 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.working === 'row' ? 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 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 <div pair>\n <span>\n ${i18next.t('figure.label.motion-' + now.kind)} · ${now.vector ? jointAxisWord(now.vector) : String(now.axis).toUpperCase()}\n ${now.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`\n : nothing}\n ${now.follows?.sum.length === 1\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.sum[0]!.joint, multiplier: now.follows.sum[0]!.multiplier, offset: now.follows.offset })}</small>`\n : now.follows\n ? html`<small>${i18next.t('figure.label.motion-follow')}: ${now.follows.sum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')} + ${now.follows.offset}</small>`\n : now.control\n ? html`<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`\n : nothing}\n </span>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}\n >\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => {\n if (!joint) return\n this.motion = motionFormOf(joint)\n this.editingMotion = true\n }}\n >\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\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 leaders = leadersFor(asset, this.partId, m.kind)\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n const refusal = motionFormRefusalOf(m, follow)\n return html`\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.body1.part}${j.state ? ` · ${j.state.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=${`${this.partId}-${m.kind}`} @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) })\n this.editingMotion = false\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => (this.editingMotion = false)}><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,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;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ADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA05BvB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { FIGURE_FACES } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureAuthoringAction, FigureDimensionSource, FigureFace } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n alignAxesOf,\n mountingPlaneOf,\n alignOf,\n AXES,\n canFasten,\n facesOf,\n canFollow,\n dimensionNow,\n followableAxes,\n positionIsShare,\n choiceOf,\n fastenedTo,\n heldBy,\n followOf,\n hangsFrom,\n shownWhenOf,\n visibilityControlsOf,\n placeKeptOf,\n fasteningOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionFormRefusalOf,\n endPlaceKeyOf,\n motionJoint,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n rowBlockOf,\n fixedJointOf,\n rowOf,\n positionsWorkedOut,\n fieldWordsOf,\n measureNow,\n type Alignment,\n type Axis,\n type Follow,\n type MotionForm\n} from './links.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport './figure-fasten-drawing.js'\nimport type { FastenChange } from './figure-fasten-drawing.js'\nimport { faceViewOf, modeOf, myFaceFor, turnsInPlace, type FastenMode } from './fasten-geometry.js'\nimport { boxOf } from './align.js'\nimport type { FigureRevision } from './revision.js'\nimport { HelpToggles } from './help.js'\nimport { jointAxisWord } from './joint-axis.js'\n\nconst FACES = Object.keys(FIGURE_FACES) as FigureFace[]\n/** The target list's entry for the plane the figure stands by. */\nconst PLANE = '__plane'\n\nconst freshFasten = () => ({\n face: 'bottom' as FigureFace | 'centre',\n toPlane: false,\n target: '',\n targetFace: 'top' as FigureFace,\n facing: 'meet' as 'meet' | 'flush',\n gap: 0,\n twist: 0,\n align: {} as Partial<Record<Axis, Alignment>>,\n alignMm: {} as Partial<Record<Axis, number>>,\n alignInput: {} as Partial<Record<Axis, string>>\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. 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, css`\n :host {\n display: block;\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; gap: 4px; margin: 12px 0; }\n div[resize-now] div[row] { grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; }\n div[resize-now] span[measure] { font-variant-numeric: tabular-nums; }\n button[link] { background: none; border: none; padding: 0; color: var(--md-sys-color-primary, #477b9e); text-decoration: underline; cursor: pointer; font: inherit; }\n /* Size behaviour is a choice about dimensions only. It never implies a placement or a fastening. */\n details[resize-choice] { margin: 12px 0; padding: 0; border: 0; }\n details[resize-choice] > div { display: grid; gap: 8px; padding: 8px 0; }\n div[resize-held] { display: grid; gap: 8px; margin: 12px 0; padding: 10px 12px; border-radius: 6px; background: var(--md-sys-color-surface-container, #8881); }\n div[resize-held] p { margin: 0; display: flex; align-items: center; gap: 6px; }\n p[fasten-mode] { margin: 0; font-weight: 600; }\n section[fastening][spotlit] { outline: 2px solid var(--md-sys-color-primary, #477b9e); outline-offset: 4px; border-radius: 6px; transition: outline-color 0.3s; }\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; }\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[row-basis] { display: grid; gap: 4px; margin: 8px 0; }\n div[row-basis] label { display: flex; align-items: center; gap: 6px; }\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 span[fasten-summary] { opacity: 0.8; }\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' | 'places' | 'motion' = 'shape'\n /** What the fastening 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 The fastening command the form describes now, and the face it aims at: told to the editor whenever it changes, so\n the result is seen before it is done (ADR-0097 §5.5). Nothing is told while no target is chosen.\n */\n private candidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private told = ''\n /* Two forms describe a command here: the fastening and the row. The one being worked on is the one seen. */\n @state() private working: 'fasten' | 'row' = 'fasten'\n private fastenCandidate?: { action: FigureAuthoringAction; face?: { part: string; face: string } }\n private rowCandidate?: FigureAuthoringAction\n\n /** A new fastening starts with a target. Its face and alignment are asked only after that target is chosen. */\n @state() private choosingFastening = false\n /** The fastening section, marked for a moment when \"open attachment settings\" brings it into view. */\n @state() private spotlit = false\n @state() private fasten = freshFasten()\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\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\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 if (this.asset && this.partId && this.partId !== this.loadedFor) {\n this.loadedFor = this.partId\n /* A part's own fastening is not another part's choices: the form opens on it (walk 1, 2026-09-26). */\n const own = this.revision && this.partId ? fasteningOf(this.revision, this.partId) : null\n this.fasten = own ? ({ ...freshFasten(), ...own } as ReturnType<typeof freshFasten>) : freshFasten()\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.editingMotion = false\n this.choosingFastening = false\n }\n }\n\n updated() {\n /* Only the section that holds the fastening form speaks of it: the panel has one of these per section, and the\n others' silence cleared what it showed (2026-09-27, :3391). */\n if (this.section !== 'shape' && !this.told) 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 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 ${placeFacesOf(asset, this.partId).length ? this.renderPlaces(asset) : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n const shown = html`\n <section>\n <h3>${i18next.t('figure.label.resize-intent')}</h3>\n ${canFollow(asset, this.partId) ? this.renderDimensions(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n <section fastening ?spotlit=${this.spotlit} @focusin=${() => (this.working = 'fasten')}>\n <h3>${i18next.t('figure.label.placement')}${this.help.button('figure.text.fastening-explained')}</h3>${this.help.hint('figure.text.fastening-explained')}\n ${this.renderPositions(asset)}\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n ${this.renderRow(asset)}\n `\n this.candidate = this.working === 'row' && this.rowCandidate ? { action: this.rowCandidate } : 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>${roleName(one.role)} · ${one.face ? i18next.t('figure.label.face-' + one.face) : ''} · ${one.accepts.join(', ')} · ${i18next.t('figure.label.place-holds', { count: one.capacity })}</small>\n </span>\n <button act ?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 private renderDimensions(asset: FigureAsset) {\n const editable = followableAxes(asset, this.partId)\n const round = editable.length === 2\n const word = (axis: Axis) => i18next.t(round && axis === 'x' ? 'figure.label.resize-diameter' : `figure.label.resize-${axis}`)\n const others = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFollow(asset, one))\n const followsAll = editable.every(axis => followOf(asset, this.partId, axis).of === 'instance')\n /* A size of its own on every axis is the usual: nothing to read, only the way to make it follow (user 2026-10-01). */\n const allOwn = editable.every(axis => followOf(asset, this.partId, axis).of === 'own')\n return html`${asset.sizing === 'uniform' ? html`<p hint>${i18next.t('figure.text.resize-uniform-warning')}</p>` : nothing}\n ${allOwn ? nothing : html`<div resize-now>${editable.map(axis => {\n const now = followOf(asset, this.partId, axis)\n const following = now.of === 'instance' && now.axis === axis\n const custom = now.of !== 'own' && !following\n const mm = measureNow(this.revision!, this.partId, axis)\n return html`<div row>\n <b>${word(axis)}</b>\n <span measure>${mm === undefined ? '—' : `${Math.round(mm)} mm`}</span>\n <span>${i18next.t(custom ? 'figure.label.resize-custom' : following ? 'figure.label.resize-following' : 'figure.label.follows-nothing')}</span>\n ${following\n ? html`<button link resize-unfollow=${axis} ?disabled=${this.locked}\n @click=${() => {\n this.follow(asset, axis, 'own', now)\n }}>${i18next.t('figure.button.resize-unfollow')}</button>`\n : nothing}\n </div>`\n })}</div>`}\n ${followsAll\n ? html`<p hint>${i18next.t('figure.text.resize-all-following')}</p>`\n : html`<button act follow-size ?disabled=${this.locked || asset.sizing === 'uniform'} @click=${() => this.command({ kind: 'follow-size', part: this.partId })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size')}\n </button>`}\n <details resize-choice><summary>${i18next.t('figure.label.resize-advanced')}</summary><div>${followableAxes(asset, this.partId).map(axis => {\n const now = followOf(asset, this.partId, axis)\n const value = choiceOf(now)\n /* A cylinder's two measures are its radius and its length; its X and Y name them. */\n const name = round ? i18next.t(axis === 'x' ? 'figure.label.field-radius' : 'figure.label.field-length') : axis.toUpperCase()\n return html`<div row>\n <b>${name}</b>\n <select ?disabled=${this.locked} @change=${(e: Event) => this.follow(asset, axis, (e.target as HTMLSelectElement).value, now)}>\n <option value=\"own\" ?selected=${value === 'own'}>${i18next.t('figure.label.follows-nothing')}</option>\n ${AXES.filter(one => hasInstanceSize(asset, one)).map(\n one => html`<option value=${`share:${one}`} ?selected=${value === `share:${one}`}>\n ${i18next.t('figure.label.follows-instance-share')} · ${one.toUpperCase()}\n </option>\n <option value=${`instance:${one}`} ?selected=${value === `instance:${one}`}>\n ${i18next.t('figure.label.follows-instance')} · ${one.toUpperCase()}\n </option>`\n )}\n ${others.flatMap(other =>\n AXES.map(\n one => html`<option value=${`part:${other}:${one}`} ?selected=${value === `part:${other}:${one}`}>${other} · ${one.toUpperCase()}</option>`\n )\n )}\n ${now.of === 'expression' || now.of === 'input'\n ? html`<option value=${value} selected>${now.of === 'input' ? now.input : i18next.t('figure.label.follows-expression')}</option>`\n : nothing}\n </select>\n ${now.of === 'instance' || now.of === 'part'\n ? html`<span></span>\n <label inline-plus>\n ${i18next.t('figure.label.follows-plus')}\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.plus ?? 0)}\n @change=${(e: Event) => this.followPlus(axis, now, Number((e.target as HTMLInputElement).value) || 0)}\n />\n </label>`\n : nothing}\n </div>`\n })}</div></details>`\n }\n\n /**\n * \"Open attachment settings\": the fastening this part has now -- its face, what it is on, the gap -- in the form below,\n * brought into view with the focus on it. The form is loaded again first: the part was fastened by \"follow size,\n * attached\" while it was selected, so the form still held what it had before (designer 2026-09-27: it opened the\n * holding places instead).\n */\n /** The face the part sits on, in view with the focus on it: where the place across the face is dragged or keyed. */\n private async showWhere() {\n this.working = 'fasten'\n await this.updateComplete\n const where = this.renderRoot.querySelector('figure-fasten-drawing')?.shadowRoot?.querySelector<HTMLElement>('div[where]')\n if (!where) return\n where.scrollIntoView({ block: 'nearest', behavior: 'smooth' })\n where.focus({ preventScroll: true })\n }\n\n /** The fastening form, open on this part and in view: for \"fasten it first\" from elsewhere. */\n async showFastening() {\n if (this.asset) await this.openFastening(this.asset)\n }\n\n private async openFastening(asset: FigureAsset) {\n const own = fasteningOf(this.revision!, this.partId)\n this.fasten = own ? ({ ...freshFasten(), ...own } as ReturnType<typeof freshFasten>) : freshFasten()\n this.spotlit = true\n await this.updateComplete\n const section = this.renderRoot.querySelector<HTMLElement>('section[fastening]')\n section?.scrollIntoView({ block: 'start', behavior: 'smooth' })\n /* Into the form itself, not the section's help button. */\n ;(section?.querySelector<HTMLElement>('select, input') ?? section?.querySelector<HTMLElement>('button'))?.focus({ preventScroll: true })\n setTimeout(() => (this.spotlit = false), 1600)\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 face = joint ? i18next.t(endPlaceKeyOf(joint.body1)) : ''\n const gap = typeof joint?.origin?.gap === 'number' ? joint.origin.gap : 0\n const where = !joint\n ? i18next.t('figure.text.held-by-rule')\n : 'plane' in joint.body0\n ? i18next.t('figure.text.held-on-plane', { face, place: i18next.t(`figure.label.resize-place-${asset.placement ?? 'floor'}`), gap: String(gap) })\n : i18next.t('figure.text.held-on-part', { face, other: joint.body0.part, otherFace: i18next.t(endPlaceKeyOf(joint.body0)) })\n return where\n }\n\n private renderHeld(asset: FigureAsset) {\n const joint = (asset.joints ?? []).find(j => j.body1.part === this.partId)\n return html`<div resize-held>\n <p><md-icon>link</md-icon> ${this.heldWords(asset)}</p>\n <button act open-fastening @click=${() => this.openFastening(asset)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.open-fastening')}\n </button>\n ${joint\n ? html`<button act detach-held ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach-held')}\n </button>\n ${this.renderDetachWords()}`\n : nothing}\n </div>`\n }\n\n /** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */\n private followPlus(axis: Axis, now: Follow, plus: number) {\n if (now.of !== 'instance' && now.of !== 'part') return\n if ((now.plus ?? 0) === plus) return\n const source: FigureDimensionSource = now.of === 'instance' ? { of: 'instance', axis: now.axis } : { of: 'part', part: now.part, axis: now.axis }\n const times = now.of === 'instance' ? now.times : (now.times ?? 1)\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, ...(times !== 1 ? { times } : {}), ...(plus ? { plus } : {}), replace: true })\n }\n\n private follow(asset: FigureAsset, axis: Axis, choice: string, now: Follow) {\n const following = now.of !== 'own'\n /* The measure as it stands: a dimension stops following at it, and a share is taken of it. */\n /* The part's own extent along the axis now, as drawn: what a dimension is fixed at when it stops following. */\n const current = dimensionNow(this.revision!, this.partId, axis) ?? boxOf(this.revision!, this.partId)?.dims[AXES.indexOf(axis)] ?? 100\n if (choice === 'own') {\n if (!following) return\n this.command({ kind: 'unlink-dimension', part: this.partId, axis, mm: Math.max(1, Math.round(current)) })\n return\n }\n const [of, a, b] = choice.split(':')\n if (of === 'share') {\n /* A proportional rule: this measure is the share of the instance size it is now, so it grows with the figure. */\n const size = asset.designInputs[`size.${a}`]\n if (!size) return\n const times = Math.round((current / size) * 1e6) / 1e6\n this.command({ kind: 'link-dimension', part: this.partId, axis, source: { of: 'instance', axis: a as Axis }, times, replace: following })\n return\n }\n const source: FigureDimensionSource = of === 'instance' ? { of: 'instance', axis: a as Axis } : { of: 'part', part: a!, axis: b as Axis }\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, replace: following })\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 * A new aim for the fastening: where on the face is filled in as where the part stands now, so fastening it keeps it\n * there (`placeKeptOf`). The author changes it from there.\n */\n private aimAt(asset: FigureAsset, f: ReturnType<typeof freshFasten>) {\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : f.target ? { part: f.target, face: targetFace } : undefined\n this.fasten = { ...f, ...(aim ? placeKeptOf(this.revision!, this.partId, aim, !!f.twist) : { align: {}, alignMm: {}, alignInput: {} }) }\n }\n\n private renderFastening(asset: FigureAsset) {\n const held = heldBy(asset, this.partId)\n /* Placed by an origin (ADR-0107 decision 4): attach writes faces, so the form would move it off its origin. Said, and taken off only. */\n if (fasteningOf(this.revision!, this.partId)?.atOrigin) {\n this.fastenCandidate = undefined\n return html`<div fastened fasten-at-origin>\n <p>${this.heldWords(asset)}</p>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n ${this.renderDetachWords()}\n </div>`\n }\n const f = this.fasten\n /* Not a part that hangs from this one: fastening a frame to its own roller would close a loop. */\n const targets = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFasten(asset, one))\n /* Shown, not dropped, and not choosable, with the reason (ADR-0097 §5.5): fastening it would close a loop. */\n const loops = (one: string) => hangsFrom(asset, one, this.partId)\n /* The faces are the ones each shape declares: a part is fastened by one of its outer faces, to any face of the target. */\n /* On the mounting plane only the faces it takes: a bottom or a top on the floor, a back on a wall. */\n const plane = mountingPlaneOf(asset)\n const planeWord = i18next.t('figure.label.resize-place-' + (asset.placement ?? 'floor'))\n /* Its outer faces, and its centre -- a roller spins about its middle (ADR-0093); the mounting plane takes a face. */\n const mineFaces: Array<FigureFace | 'centre'> = [\n ...(facesOf(asset, this.partId).filter(face => FACES.includes(face as FigureFace) && (!f.toPlane || plane.faces.includes(face as FigureFace))) as FigureFace[]),\n ...(f.toPlane ? [] : (['centre'] as const))\n ]\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : { part: f.target, face: targetFace }\n /* The part's own face is not chosen: the target's face and how give it (user 2026-10-01; the kernel takes no other). */\n const mode: FastenMode = f.toPlane ? 'meet' : modeOf(f.face, f.facing)\n const derived = f.toPlane || f.target ? myFaceFor(this.revision!, this.partId, aim, mode) : undefined\n const myFace = derived ?? (mineFaces.includes(f.face) ? f.face : mineFaces[0]!)\n const align = f.target || f.toPlane ? alignOf(asset, this.partId, aim, f.align, f.alignMm, !!f.twist, f.alignInput) : undefined\n const action =\n f.toPlane || f.target\n ? ({\n kind: 'attach',\n part: this.partId,\n face: myFace,\n to: f.toPlane ? { plane: 'mounting-plane' } : { part: f.target, face: targetFace },\n ...(f.toPlane ? {} : { facing: f.facing }),\n ...(f.gap ? { gap: f.gap } : {}),\n twist: f.twist,\n ...(align ? { align } : {}),\n replace: !!held\n } as FigureAuthoringAction)\n : undefined\n if (action) this.fastenCandidate = { action, ...(f.toPlane ? {} : { face: { part: f.target, face: targetFace } }) }\n /*\n What the folded details hold that is not their default, said while folded; the way and the place on the face are\n the drawing's, and said there (user 2026-10-02: the details had selects repeating the drawing). Nothing is said\n for the default.\n */\n const detail = [\n ...(f.gap ? [i18next.t('figure.text.fasten-summary-gap', { mm: String(f.gap) })] : []),\n ...(f.twist ? [i18next.t('figure.text.fasten-summary-twist', { degrees: String(f.twist) })] : [])\n ]\n /* Across the face, a row only where the drawing cannot set it: no drawing of the face, or a share or a field to follow. */\n const view = f.toPlane || f.target ? faceViewOf(this.revision!, this.partId, aim) : undefined\n const alignRows = (f.toPlane || f.target ? alignAxesOf(asset, this.partId, aim, !!f.twist) : []).filter(\n ({ axis }) => !view || !view.axes.includes(axis) || !!f.alignInput?.[axis] || hasInstanceSize(asset, axis)\n )\n /* A fastening the part has is changed as soon as something is chosen, as the drawing does; a new one waits for 붙이기. */\n const settle = () => this.onFastenRelease(!!held)\n /*\n Fastening it anew is said, so the form is not taken for the one it has (designer 2026-09-27). The one it has is\n said once, by the sentence over the drawing -- the panel's head says it too; a third and a fourth line saying the\n same (「현재 관계 수정」, 「붙은 곳」) went (user 2026-10-01, the panel checked for balance).\n */\n const current = asset.joints?.find(j => j.body1.part === this.partId)\n const editing = i18next.t('figure.text.fasten-new')\n /* A blank attachment is not a form to decipher. Ask for the thing to attach to first. */\n if (!current && !this.choosingFastening && !f.target)\n return html`\n <p hint>${i18next.t('figure.text.fasten-start')}</p>\n <button act ?disabled=${this.locked} @click=${() => (this.choosingFastening = true)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten-start')}\n </button>\n `\n return html`\n ${current ? nothing : html`<p fasten-mode>${editing}</p>`}\n ${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 ${current\n ? html`<button act @click=${() => this.showWhere()}><md-icon>tune</md-icon>${i18next.t('figure.button.fix-alignment')}</button>`\n : nothing}\n </div>`\n : nothing}\n ${held\n ? html`<div fastened>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n ${this.renderDetachWords()}\n </div>`\n : nothing}\n <div form>\n <span>${i18next.t('figure.label.target-part')}</span>\n <select @change=${(e: Event) => {\n const value = (e.target as HTMLSelectElement).value\n this.aimAt(asset, value === PLANE ? { ...f, toPlane: true, target: '' } : { ...f, toPlane: false, target: value })\n if (value) settle()\n }}>\n <option value=\"\" ?selected=${!f.target && !f.toPlane}>${i18next.t('figure.label.target-part-placeholder')}</option>\n <option value=${PLANE} ?selected=${f.toPlane}>${planeWord}</option>\n ${targets.map(one =>\n loops(one)\n ? html`<option value=${one} disabled>${i18next.t('figure.text.target-would-loop', { part: one, mine: this.partId })}</option>`\n : html`<option value=${one} ?selected=${one === f.target && !f.toPlane}>${one}</option>`\n )}\n </select>\n </div>\n ${f.toPlane || f.target\n ? html`<p fasten-sentence>${this.sentenceOf(myFace, f.toPlane ? planeWord : `${f.target}의 ${i18next.t('figure.label.face-' + targetFace)}`, mode)}</p>\n <figure-fasten-drawing\n .target=${f.toPlane ? '' : f.target}\n .planeWord=${planeWord}\n .faces=${theirFaces}\n .face=${targetFace}\n .modes=${f.toPlane ? (['meet'] as FastenMode[]) : ([...(['meet', 'flush'] as FastenMode[]), ...(turnsInPlace(asset, this.partId) ? (['centre'] as FastenMode[]) : [])])}\n .mode=${mode}\n .view=${view}\n .align=${f.align}\n .alignMm=${f.alignMm}\n .gap=${f.gap}\n .partName=${this.partId}\n ?locked=${this.locked}\n ?said=${!!held}\n @fasten-change=${(e: CustomEvent<FastenChange>) => this.onFastenChange(asset, e.detail)}\n @fasten-release=${() => this.onFastenRelease(!!held)}\n ></figure-fasten-drawing>`\n : html`<p hint>${i18next.t('figure.text.fasten-target-first')}</p>`}\n ${(f.toPlane || f.target) ? html`<details fasten-detail>\n <summary>${i18next.t('figure.label.fasten-detail')}${detail.length ? html` · <span fasten-summary>${detail.join(' · ')}</span>` : nothing}</summary>\n ${alignRows.length ? this.renderAlignment(alignRows, settle) : nothing}\n <div form>\n <span>${i18next.t('figure.label.gap')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.gap)} @change=${(e: Event) => ((this.fasten = { ...f, gap: Number((e.target as HTMLInputElement).value) || 0 }), settle())} />\n <span>${i18next.t('figure.label.twist')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.twist)} @change=${(e: Event) => ((this.fasten = { ...f, twist: Number((e.target as HTMLInputElement).value) || 0 }), settle())} />\n </div>\n </details>\n ${/* What 붙이기 would do; a fastening the part has is changed at once, and the canvas shows it. */ action && !held && this.working === 'fasten' ? this.renderPreviewWords() : nothing}\n ${held\n ? nothing\n : html`<button act ?disabled=${this.locked || !action} @click=${() => action && this.command(action)}>\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten')}\n </button>`}` : nothing}\n `\n }\n\n /** 「lid 의 아랫면을 bin 의 윗면에 맞닿게」: what the fastening is, in one line, the part's own face said as a result. */\n private sentenceOf(myFace: string, to: string, mode: FastenMode) {\n return i18next.t(`figure.text.fasten-sentence-${mode}`, { part: this.partId, face: i18next.t('figure.label.face-' + myFace), to })\n }\n\n /** A change the drawing asks: to the form only; the preview behind follows the form. */\n private onFastenChange(asset: FigureAsset, c: FastenChange) {\n const f = this.fasten\n if ('targetFace' in c) this.aimAt(asset, { ...f, targetFace: c.targetFace as FigureFace })\n else if ('mode' in c) this.fasten = { ...f, face: c.mode === 'centre' ? 'centre' : f.face === 'centre' ? 'bottom' : f.face, facing: c.mode === 'flush' ? 'flush' : 'meet' }\n else if ('gap' in c) this.fasten = { ...f, gap: c.gap }\n else\n this.fasten = {\n ...f,\n align: { ...f.align, [c.axis]: c.how },\n alignMm: c.how === 'mm' ? { ...f.alignMm, [c.axis]: c.mm ?? 0 } : f.alignMm\n }\n }\n\n /** Let go: a fastening the part already has is applied as it now is (one step); a new one waits for 붙이기. */\n private async onFastenRelease(held: boolean) {\n if (!held) return\n await this.updateComplete\n if (this.fastenCandidate) this.command(this.fastenCandidate.action)\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 * Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on\n * either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.\n */\n private renderAlignment(axes: { axis: Axis; edges: boolean }[], settle: () => void) {\n const f = this.fasten\n const set = (axis: Axis, how: Alignment) => ((this.fasten = { ...f, align: { ...f.align, [axis]: how } }), settle())\n const setMm = (axis: Axis, mm: number) => ((this.fasten = { ...f, alignMm: { ...f.alignMm, [axis]: mm } }), settle())\n return html`<div form>\n ${axes.map(({ axis, edges }) => {\n const how = f.align[axis] === 'min' || f.align[axis] === 'max' ? (edges ? f.align[axis]! : 'centre') : (f.align[axis] ?? 'centre')\n return html`<span>${i18next.t('figure.label.align-' + axis)}</span>\n <select @change=${(e: Event) => set(axis, (e.target as HTMLSelectElement).value as Alignment)}>\n <option value=\"centre\" ?selected=${how === 'centre'}>${i18next.t('figure.label.align-centre')}</option>\n ${edges\n ? html`<option value=\"min\" ?selected=${how === 'min'}>${i18next.t(`figure.label.align-${axis}-min`)}</option>\n <option value=\"max\" ?selected=${how === 'max'}>${i18next.t(`figure.label.align-${axis}-max`)}</option>`\n : nothing}\n ${f.alignInput?.[axis]\n ? html`<option value=\"input\" ?selected=${how === 'input'}>${i18next.t('figure.label.align-input', { field: fieldWordsOf(f.alignInput[axis]!, key => i18next.t(key)) })}</option>`\n : nothing}\n <option value=\"mm\" ?selected=${how === 'mm'}>${i18next.t('figure.label.align-mm')}</option>\n ${this.asset && hasInstanceSize(this.asset, axis)\n ? html`<option value=\"share\" ?selected=${how === 'share'}>${i18next.t('figure.label.align-share')}</option>`\n : nothing}\n </select>\n ${how === 'mm' || how === 'share'\n ? html`<span></span><input type=\"number\" step=\"any\" aria-label=${i18next.t('figure.label.align-mm')} .value=${String(f.alignMm[axis] ?? 0)} @change=${(e: Event) => setMm(axis, Number((e.target as HTMLInputElement).value) || 0)} />`\n : nothing}`\n })}\n </div>`\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')}</h3></summary>`\n if (blocked || !axes.length)\n return html`<section row><details row-fold>\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.openFastening(asset)}><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.working = 'row'))\n return html`<section row @focusin=${() => (this.working = 'row')}><details row-fold ?open=${this.working === 'row'}>\n ${head}\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select @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 <div row-basis role=\"radiogroup\" aria-label=${i18next.t('figure.label.row-basis')}>\n <label><input type=\"radio\" name=\"row-basis\" .checked=${r.fills} @change=${() => set({ ...r, fills: true })} />${i18next.t('figure.label.repeat-fills')}</label>\n <label><input type=\"radio\" name=\"row-basis\" .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 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 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.working === 'row' ? 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 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 <div pair>\n <span>\n ${i18next.t('figure.label.motion-' + now.kind)} · ${now.vector ? jointAxisWord(now.vector) : String(now.axis).toUpperCase()}\n ${now.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`\n : nothing}\n ${now.follows?.sum.length === 1\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.sum[0]!.joint, multiplier: now.follows.sum[0]!.multiplier, offset: now.follows.offset })}</small>`\n : now.follows\n ? html`<small>${i18next.t('figure.label.motion-follow')}: ${now.follows.sum.map(t => `${t.joint} × ${t.multiplier}`).join(' + ')} + ${now.follows.offset}</small>`\n : now.control\n ? html`<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`\n : nothing}\n </span>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => joint && this.command({ kind: 'set-joint', joint: fixedJointOf(joint) })}\n >\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => {\n if (!joint) return\n this.motion = motionFormOf(joint)\n this.editingMotion = true\n }}\n >\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\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 leaders = leadersFor(asset, this.partId, m.kind)\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n const refusal = motionFormRefusalOf(m, follow)\n return html`\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.body1.part}${j.state ? ` · ${j.state.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=${`${this.partId}-${m.kind}`} @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) })\n this.editingMotion = false\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => (this.editingMotion = false)}><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,11 +1,14 @@
1
1
  import { LitElement } from 'lit';
2
- import type { FigureAsset } from '@hatiolab/figure-model';
3
2
  import { type ViewSettings } from './figure-view.js';
3
+ import { type FigureRevision } from './revision.js';
4
4
  declare const FigurePreview_base: (new (...args: any[]) => LitElement) & typeof LitElement;
5
5
  export declare class FigurePreview extends FigurePreview_base {
6
6
  static styles: import("lit").CSSResult;
7
7
  /** The figure being authored, as the editor holds it now. */
8
- asset?: FigureAsset;
8
+ revision?: FigureRevision;
9
+ private get asset();
10
+ /** The size the figure was made at, once per version: without a declared size it is measured by evaluating the figure. */
11
+ private authoredSize;
9
12
  /** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */
10
13
  context: string;
11
14
  /**