@things-factory/figure-ui 10.1.116 → 10.1.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/graphql/index.ts +1 -0
- package/client/modeller/editor.ts +2 -2
- package/client/modeller/fasten-geometry.ts +1 -1
- package/client/modeller/figure-first-save.ts +1 -1
- package/client/modeller/figure-history-panel.ts +21 -0
- package/client/modeller/figure-links.ts +33 -11
- package/client/modeller/first-save.ts +6 -6
- package/client/modeller/joint-axis.ts +36 -0
- package/client/modeller/joint-drag.ts +27 -7
- package/client/modeller/joint-fan.ts +2 -1
- package/client/modeller/links.ts +43 -10
- package/client/pages/figure-list-page.ts +3 -1
- package/client/pages/figure-modeller-page.ts +5 -2
- package/client/types.ts +2 -0
- package/dist-client/graphql/index.js +1 -0
- package/dist-client/graphql/index.js.map +1 -1
- package/dist-client/modeller/clips.d.ts +1 -1
- package/dist-client/modeller/editor.js +2 -2
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/fasten-geometry.js +1 -1
- package/dist-client/modeller/fasten-geometry.js.map +1 -1
- package/dist-client/modeller/figure-first-save.js +1 -1
- package/dist-client/modeller/figure-first-save.js.map +1 -1
- package/dist-client/modeller/figure-history-panel.d.ts +4 -0
- package/dist-client/modeller/figure-history-panel.js +23 -0
- package/dist-client/modeller/figure-history-panel.js.map +1 -1
- package/dist-client/modeller/figure-links.d.ts +1 -0
- package/dist-client/modeller/figure-links.js +31 -12
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/first-save.d.ts +2 -2
- package/dist-client/modeller/first-save.js +6 -6
- package/dist-client/modeller/first-save.js.map +1 -1
- package/dist-client/modeller/joint-axis.d.ts +13 -0
- package/dist-client/modeller/joint-axis.js +31 -0
- package/dist-client/modeller/joint-axis.js.map +1 -0
- package/dist-client/modeller/joint-drag.js +26 -6
- package/dist-client/modeller/joint-drag.js.map +1 -1
- package/dist-client/modeller/joint-fan.js +2 -1
- package/dist-client/modeller/joint-fan.js.map +1 -1
- package/dist-client/modeller/links.d.ts +16 -1
- package/dist-client/modeller/links.js +39 -9
- package/dist-client/modeller/links.js.map +1 -1
- package/dist-client/pages/figure-list-page.js +2 -1
- package/dist-client/pages/figure-list-page.js.map +1 -1
- package/dist-client/pages/figure-modeller-page.js +4 -1
- package/dist-client/pages/figure-modeller-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types.d.ts +2 -0
- package/dist-client/types.js.map +1 -1
- package/docs/product-cutover.md +7 -7
- package/package.json +6 -6
- package/test/command-preview.test.ts +2 -2
- package/test/first-save-suggest.test.ts +5 -5
- package/test/first-save.test.ts +15 -13
- package/test/joint-frames.test.ts +293 -0
- package/test/package-download.test.ts +16 -0
- package/translations/en.json +3 -2
- package/translations/ja.json +3 -2
- package/translations/ko.json +3 -2
- package/translations/ms.json +3 -2
- package/translations/zh.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../client/modeller/editor.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,iBAAiB,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,uBAAuB,EAA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,KAAK,EAAE;;iDAAwC;AAE/B;IAAhB,KAAK,EAAE;;0CAAwC;AAE/B;IAAhB,KAAK,EAAE;;oDAA6C;AAKpC;IAAhB,KAAK,EAAE;;6CAAiD;AAxX9C,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAurExB","sourcesContent":["import { LitElement, html, css, nothing, type PropertyValues } from 'lit'\nimport { i18next } from '@operato/i18n'\nimport type { OxThreePane } from '@operato/layout'\nimport '@operato/layout'\nimport { notify } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { live } from 'lit/directives/live.js'\nimport { PART_LIMIT, parseFigureRecipe, resolveFigureRecipe, figurePartCountOf, figureRecipeIdFor, parseFigureAsset, figureSizeEditChanges, figureScaleAnchorOf, figureSectionMeasuresOf, figurePlaneAlignChanges, type FigurePlaneContact, type FigureClipLoss, figurePartFaceOf, type FigureFaceArea, figureRowOf, type FigureRowReading, figureFaceOverhangOf, type FigureFaceOverhang, figureRoomOnlyInputsOf, figureRoomRefitOf } from '@hatiolab/figure-model'\nimport type { RecipeTemplate } from './recipes.js'\nimport './figure-recipe-catalog.js'\nimport type { FigureAsset, FigureAuthoringAction, FigureEvaluatedShape, FigureInputChange, FigurePartEdit, FigurePrimitiveCreation, FigureProposalStep, FigureRecipe, FigureRecipeValue, FigurePlacement, FigureFaceMappingNeed, FigureFaceRemap } from '@hatiolab/figure-model'\nimport type { FigureProductSession } from './product-session.js'\nimport { captureFigureThumbnail } from './thumbnail.js'\nimport { drawableFigureParts } from './renderer.js'\nimport './canvas.js'\nimport './figure-parts.js'\nimport './figure-material-panel.js'\nimport './figure-section-panel.js'\nimport './figure-section-editor.js'\nimport { faceHighlightOf, ghostPartsOf, previewWordsOf, rowWordsOf, type HeldPreview } from './command-preview.js'\nimport { motionEndsOf, type MotionEnds } from './motion-ends.js'\nimport './figure-links.js'\nimport './figure-controls.js'\nimport './figure-clips.js'\nimport './figure-preview.js'\nimport './figure-settings.js'\nimport { DEFAULT_VIEW, type ViewSettings } from './figure-view.js'\nimport './figure-capability-panel.js'\nimport { gizmoChanges, gizmoReachOf, type GizmoReach, type GizmoResult } from './gizmo.js'\nimport { keyActionOf } from './keys.js'\nimport { groupFields, ownerOf, partLabelOf, repeatOf, type FieldLike, type FieldGroup } from './fields.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { alignChanges, boxOf, canMirror, mirrorChanges, type AlignTool } from './align.js'\nimport type { FigurePaletteKind, FigurePartRow } from './figure-parts.js'\nimport { paletteRecipe } from './palette.js'\nimport { apexOver, drawnOf } from './section-drawing.js'\nimport { END_FACE } from './section-controls.js'\nimport type { FigureCanvas } from './canvas.js'\nimport { nudgeOf, placementOf, type ScaleAnchor } from './stage-model.js'\n\n/** The numbers a rule gives a part's position, turn and size, per axis, for the cells that have no field. */\ntype HeldValues = { position?: number[]; rotation?: number[]; size?: (number | undefined)[]; sizeRuled?: boolean }\nimport { roomRefitRowsOf } from './occupancy.js'\nimport { editRefusalOf, inDeclaredRoom, inputRangeRefusalOf, narrowingRetryOf, partRefusalOf, placementRefusalOf, recipeRefusalOf, removalNoticeOf, sizeRangeRefusalOf } from './refusals.js'\nimport type { FigureRenderPart } from './renderer.js'\nimport type { FigureBudgetLine } from './maturity.js'\nimport { fieldWordsOf, followOf, measureNow, partSummaryOf, instanceRangeOf, instanceRangeToDeclare, proportionToFollow, rangeDiffers, rangeWith, turnsAboutAJoint, valueNow } from './links.js'\nimport { jointFanOf } from './joint-fan.js'\nimport { jointDragOf } from './joint-drag.js'\nimport type { FirstSave } from './first-save.js'\nimport { isLive, livePartsOf, liveOverSession, NOTHING_LIVE, scrubbed, scrubStep, type LiveValues } from './live.js'\nimport { startingShapeKindOfBody } from './starting-shape.js'\n\n\n/**\n * The side's tabs: properties, what it does (places), motion, the verdict, the view, the release history. A figure-level tab (verdict, history) gives way to properties when a part is chosen; a tab about\n * parts keeps showing the newly chosen part.\n */\ntype SideTab = 'properties' | 'capability' | 'motion' | 'verdict' | 'view' | 'history'\n\n/** Whether the narrow fold was said in this browser before; true from now on. Storage refused: said, as before. */\nfunction foldSaid(): boolean {\n try {\n if (localStorage.getItem('figure-fold-said')) return true\n localStorage.setItem('figure-fold-said', '1')\n } catch {\n /* No storage here: said every time, as it was. */\n }\n return false\n}\n\n/** Product editor surface. The injected session is shared by page persistence and AI commands. */\n@customElement('figure-editor')\nexport class FigureEditor extends LitElement {\n /* The operato scrollbar, as every scrolling panel of the app has it -- the side panel scrolled with the browser's own. */\n static styles = [ScrollbarStyles, SidePanelStyles, css`\n :host {\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n /* The editor folds by the width it is given, not the window's (UX ruling, 2026-09-24). */\n container-type: inline-size;\n font: 13px sans-serif;\n color: var(--md-sys-color-on-surface);\n }\n /* The bar over the work is ox-canvas-bar (ADR-0060 decision 8): the folds at its edges, undo, redo and\n fit in the suite's places. What the editor puts in it - the mode switch, the status, save - is styled here. */\n ox-canvas-bar button[mode] {\n height: 28px;\n padding: 0 10px;\n border-radius: 999em;\n border-color: transparent;\n background: none;\n }\n ox-canvas-bar button[mode][aria-pressed='true'] {\n border-color: var(--md-sys-color-primary);\n }\n /* The gizmo's tools, drawn as the bar's own icon buttons (undo, redo, fit). */\n ox-canvas-bar .gizmo-tools {\n display: inline-flex;\n gap: 2px;\n padding-left: 4px;\n border-left: 1px solid var(--md-sys-color-outline-variant);\n }\n ox-canvas-bar button[tool] {\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: var(--md-sys-shape-corner-small, 8px);\n background: transparent;\n color: var(--md-sys-color-on-surface-variant);\n cursor: pointer;\n }\n ox-canvas-bar button[tool]:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container-high);\n color: var(--md-sys-color-on-surface);\n }\n ox-canvas-bar button[tool][aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n ox-canvas-bar button[tool]:disabled {\n opacity: 0.38;\n cursor: default;\n }\n /*\n Slotted into the bar from here, the tools do not get the bar's own icon size (20px, set inside its shadow): they\n showed at md-icon's 24px, heavier than undo, redo and fit beside them. The same size, and the bar's focus ring.\n */\n ox-canvas-bar button[tool] md-icon {\n --md-icon-size: 20px;\n }\n ox-canvas-bar button[tool]:focus-visible {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 1px;\n }\n figure-preview {\n min-width: 0;\n min-height: 0;\n }\n ox-canvas-bar .status {\n padding: 0 8px;\n color: var(--md-sys-color-on-surface-variant);\n }\n ox-canvas-bar .status[dirty] {\n color: var(--md-sys-color-primary);\n font-weight: 600;\n }\n ox-canvas-bar button[save] {\n height: 32px;\n padding: 0 14px;\n border: none;\n border-radius: 999em;\n color: var(--md-sys-color-on-primary);\n background: var(--md-sys-color-primary);\n }\n /* The three panes are ox-three-pane's (ADR-0060 decision 8): widths 200 | 1fr | 340, 160 | 300 under\n 860px and one column with the middle first under 560px are the frame's, as are the dividers. */\n ox-three-pane {\n flex: 1;\n min-height: 0;\n }\n figure-parts {\n min-height: 0;\n }\n figure-canvas {\n flex: 1;\n min-width: 0;\n min-height: 0;\n }\n div[middle] {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 0;\n }\n /* A new figure's first question, over the empty canvas. */\n div[start] {\n position: absolute;\n inset: 50% auto auto 50%;\n z-index: 10;\n color: var(--md-sys-color-on-surface);\n transform: translate(-50%, -50%);\n width: min(440px, calc(100% - 32px));\n box-sizing: border-box;\n padding: 20px;\n border-radius: 12px;\n background: var(--md-sys-color-surface, #fff);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);\n }\n div[start] button[start-button] {\n width: auto;\n margin: 0;\n font-size: var(--ui-t-body);\n height: 36px;\n padding: 0 16px;\n border: 1px solid var(--md-sys-color-outline);\n border-radius: 999em;\n color: var(--md-sys-color-primary);\n background: var(--md-sys-color-surface, #fff);\n cursor: pointer;\n }\n div[start] button[start-button]:hover:not(:disabled) {\n background: var(--md-sys-color-primary-container);\n }\n div[start] button[start-button][pressed] {\n color: var(--md-sys-color-on-primary);\n background: var(--md-sys-color-primary);\n border-color: var(--md-sys-color-primary);\n }\n div[start] button[start-button]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n div[start] h2 {\n margin: 0 0 12px;\n font-size: var(--ui-t-title);\n }\n div[start-paths] {\n display: grid;\n gap: 14px;\n }\n div[start-paths] h3 {\n margin: 0 0 6px;\n font-size: var(--ui-t-body);\n }\n div[start-shapes] {\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n }\n div[start] small {\n display: block;\n margin-top: 4px;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The side: tabs over one panel at a time, each using the whole height. */\n aside {\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: var(--md-sys-color-surface-container-lowest);\n }\n div[tabs] {\n display: flex;\n flex: none;\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n button[tab] {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 1px;\n min-width: 0;\n height: 48px;\n padding: 0;\n border: none;\n border-radius: 0;\n border-bottom: 2px solid transparent;\n background: none;\n color: var(--md-sys-color-on-surface-variant);\n }\n button[tab]:hover:not([on]) {\n background: var(--md-sys-color-surface-container);\n }\n button[tab][on] {\n color: var(--md-sys-color-primary);\n border-bottom-color: var(--md-sys-color-primary);\n }\n button[tab] md-icon {\n font-size: 20px;\n width: 20px;\n height: 20px;\n }\n button[tab] span[tab-label] {\n max-width: 100%;\n overflow: hidden;\n font-size: 0.66rem;\n line-height: 1.2;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n span[badge] {\n position: absolute;\n top: 3px;\n right: 2px;\n padding: 0 5px;\n font-size: 0.62rem;\n font-weight: 700;\n line-height: 1.5;\n color: var(--md-sys-color-on-primary-container);\n background: var(--md-sys-color-primary-container);\n border-radius: 999em;\n pointer-events: none;\n }\n /* The sections inside carry the margins (side-panel-styles); the panel only scrolls. */\n div[panel] {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 0;\n }\n div[panel][flush] {\n padding: 0;\n }\n /* Hidden, not removed: a panel keeps what it holds (the verdict its last answer) while another tab is open. */\n [off] {\n display: none !important;\n }\n /* Which part the panel speaks of. */\n div[subject] {\n position: sticky;\n top: 0;\n z-index: 1;\n display: grid;\n gap: 4px;\n padding: 10px 12px;\n background: var(--md-sys-color-surface-container-lowest);\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n /* The panel's three sizes (side-panel-styles): the part's kind at the title's, its two lines at the hint's. */\n div[subject-summary] {\n display: grid;\n gap: 2px;\n }\n div[subject-summary] b {\n font-size: var(--ui-t-body, 13px);\n font-weight: 600;\n }\n div[subject-summary] b span {\n font-weight: 400;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[subject-summary] small {\n color: var(--md-sys-color-on-surface-variant);\n }\n button {\n font: inherit;\n box-sizing: border-box;\n height: 32px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n background: var(--md-sys-color-surface);\n color: inherit;\n padding: 0 8px;\n min-width: 0;\n }\n button {\n cursor: pointer;\n }\n button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n button[aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n border-color: var(--md-sys-color-primary);\n }\n .hint {\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.5;\n }\n `]\n @property({ attribute: false }) session?: FigureProductSession\n /** The saved figure's state and version, as the server gave them (the page reads the row). */\n @property({ attribute: false }) releaseState?: { state?: 'draft' | 'released'; version: number }\n /** The recipe templates (ADR-0095), read by the page from the server. */\n @property({ attribute: false }) templates: RecipeTemplate[] = []\n /** Reads a template's guide; given by the page. */\n @property({ attribute: false }) guideOf?: (name: string) => Promise<string>\n @property({ attribute: false }) thumbnailOf?: (name: string) => string\n /** The 「보드에서 바꿀 수 있음」 form being filled for a row, before it is published (ADR-0096). */\n @state() private publishing?: { part: string; label: string; min: number; max: number }\n @state() private catalogOpen = false\n /** Why the last recipe was refused, in the kernel's words. */\n @state() private recipeError = ''\n @property({ type: Number }) revision = 0\n /** The verdict's count, drawn on its tab so it stays in sight while another tab is open. */\n @property({ type: Number }) instances?: number\n /** The cost line the parts list shows, from the maturity report. */\n @property({ attribute: false }) budget?: FigureBudgetLine\n /**\n * Asks the type and name of a figure saved for the first time (the host has the catalogue's names); undefined\n * when the author cancels, and then nothing is saved. Without it a new figure is saved under a temporary type.\n */\n @property({ attribute: false }) firstSave?: (name: string) => Promise<FirstSave | undefined>\n @state() private selected = ''\n @state() private error = ''\n /*\n * An edit that takes a face away which something stands on (ADR-0100 A8): held, with what the kernel says stands\n * there, until the author chooses where each goes -- then the same edit goes again with the remap. Shown where the\n * edit was made (`from`).\n */\n @state() private faceMapping?: { action: FigureAuthoringAction; need: FigureFaceMappingNeed; from: 'section-editor' | 'panel' }\n /** The same link offered again with the size range narrowed, after a link the declared range could not hold. */\n @state() private retry?: { label: string; action?: FigureAuthoringAction; run?: () => void }\n @state() private tab: SideTab = 'properties'\n /** The frame the bar folds - found after the first render, since the bar is drawn before it. */\n @state() private panes?: OxThreePane\n /** What the middle shows: the parts being edited, or the figure placed on a board at eight sizes. */\n @state() private middle: 'edit' | 'preview' = 'edit'\n /** The gizmo shown on the selected part, as the tools in the bar and W · E · R choose it; none once the part changes. */\n @state() private gizmoMode?: 'translate' | 'rotate' | 'scale'\n /** A line saying what a command did besides what was asked; gone at the next command. */\n @state() private notice = ''\n /**\n * How the workbench shows the figure, in the board's own state names. The viewer's, kept in\n * their browser, never in the figure.\n */\n @state() private view: ViewSettings = FigureEditor.storedView()\n private static storedView(): ViewSettings {\n try {\n const stored = JSON.parse(localStorage.getItem('figure-view') ?? 'null')\n return stored && typeof stored === 'object' ? { ...DEFAULT_VIEW, ...stored } : { ...DEFAULT_VIEW }\n } catch {\n return { ...DEFAULT_VIEW }\n }\n }\n private setView(view: ViewSettings) {\n this.view = { ...DEFAULT_VIEW, ...view }\n try {\n localStorage.setItem('figure-view', JSON.stringify(this.view))\n } catch {\n /* A browser that keeps nothing still shows the change for this visit. */\n }\n }\n /**\n * Parts hidden on the workbench — the author's view while working, not the asset's visibility. Not saved: a part\n * hidden here is still in the figure, still checked, still drawn on a board.\n */\n /** The page offers an AI draft for a new figure (the modeller page, through the app's assistant dock). */\n @property({ type: Boolean }) aiDraft = false\n @state() private hiddenParts = new Set<string>()\n /** A value in hand -- typed, held on a spinner, scrubbed, dragged -- drawn at once and recorded on release. */\n @state() private live: LiveValues = NOTHING_LIVE\n /** The part whose drawn section is open in the section editor (ADR-0100 §3.2), or null. */\n @state() private sectionEditing: string | null = null\n /**\n * A command seen before it is done (ADR-0097 §5.5): worked out on a copy for the figure, version, part and command it\n * names, and shown only while all four are still the ones on screen. Nothing of it is saved or undone.\n */\n @state() private preview?: HeldPreview & { part: string }\n private previewDrawn?: { of: HeldPreview; ghost: FigureRenderPart[]; highlight: FigureRenderPart | null }\n private lastContext: string | null = null\n /**\n * Move, turn and size on the canvas, in the bar's tools: the gizmo the W · E · R keys give, found without knowing the\n * keys (2026-09-26 -- a person dragging the part turned the camera). Each is offered only where the part's own\n * numbers can take it (`gizmoReachOf`).\n */\n private renderGizmoTools(editing: boolean) {\n const reach = editing && this.selected ? this.reachOf(this.selected) : undefined\n const tools = [\n { mode: 'translate', icon: 'open_with', key: 'W', can: !!reach?.translate },\n { mode: 'rotate', icon: '3d_rotation', key: 'E', can: !!reach?.rotate },\n { mode: 'scale', icon: 'open_in_full', key: 'R', can: !!reach?.scale }\n ] as const\n return html`<span class=\"gizmo-tools\" role=\"group\" aria-label=${i18next.t('figure.label.gizmo-tools')}>\n ${tools.map(\n tool => html`<button\n tool\n aria-pressed=${String(this.gizmoMode === tool.mode)}\n ?disabled=${!tool.can}\n aria-label=${i18next.t('figure.button.gizmo-' + tool.mode)}\n title=${`${i18next.t('figure.button.gizmo-' + tool.mode)} (${tool.key})${tool.can || !this.selected ? '' : ' · ' + i18next.t(tool.mode === 'scale' && this.sizeDragUnsure(this.asset() as FigureAsset, this.selected) ? 'figure.text.gizmo-size-turned-fastening' : 'figure.text.gizmo-not-own', { part: partLabelOf(this.selected), extreme: this.keptExtremeWord() })}`}\n @click=${() => this.useGizmo(tool.mode)}\n >\n <md-icon>${tool.icon}</md-icon>\n </button>`\n )}\n </span>`\n }\n /** The modeller's keys (`keys.ts`): undo, redo, duplicate, remove, back to the whole figure, the gizmo's modes. */\n private onKey = (e: KeyboardEvent) => {\n const view = this.session?.read()\n if (!view || view.loading || view.saving || !view.context || !this.isConnected) return\n /*\n * The section editor open takes the keys for its own: Esc cancels it, Delete deletes a point, Ctrl+Z undoes a point.\n * Heard here first, they deselected the part, deleted the part and undid the figure's last step (2026-09-30).\n */\n if (this.sectionEditing) return\n const canvas = this.renderRoot.querySelector<FigureCanvas>('figure-canvas')\n const path = e.composedPath()\n const action = keyActionOf(\n { key: e.key, ctrlKey: e.ctrlKey, metaKey: e.metaKey, shiftKey: e.shiftKey, altKey: e.altKey, target: path[0] as HTMLElement, inScene: !!canvas && path.includes(canvas) },\n this.selected\n )\n if (!action) return\n e.preventDefault()\n /*\n The session's history is the only one. With the canvas focused the scene took Ctrl+Z as well, undoing on its own\n board the last value the canvas had written -- which the canvas then told as a drag: an undo of a drag on a\n part placed by a rule wrote the drag again (2026-09-25). Heard first (capture) and kept from the scene.\n */\n e.stopPropagation()\n if (action === 'translate' || action === 'rotate' || action === 'scale') canvas && this.useGizmo(action)\n else if (action === 'undo') view.canUndo && this.run(() => this.session!.undo())\n else if (action === 'redo') view.canRedo && this.run(() => this.session!.redo())\n else if (action === 'duplicate') this.duplicatePart(this.selected)\n else if (action === 'remove') this.removePart(this.selected)\n else this.selected = ''\n }\n connectedCallback() {\n super.connectedCallback()\n window.addEventListener('keydown', this.onKey, true)\n this.widthWatch.observe(this)\n }\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKey, true)\n this.widthWatch.disconnect()\n super.disconnectedCallback()\n }\n /*\n Narrow, the parts list gives way to the canvas rather than all three shrinking (designer 2026-09-27, U11): under\n FOLD_START_UNDER px the canvas would be left under about 560 px beside both sides. The fold is said once, and the\n bar's own toggle opens it again; opened by the author, it is not folded again until the screen has been wide.\n Said once in this browser, not on every opening (2026-10-02): the list folds as before, the notice does not come back.\n */\n private static readonly FOLD_START_UNDER = 1100\n private foldedForWidth = false\n private keptOpenByAuthor = false\n private widthWatch = new ResizeObserver(([entry]) => this.fitPanesTo(entry!.contentRect.width))\n private fitPanesTo(width: number) {\n const panes = this.panes\n if (!panes || !width) return\n if (this.foldedForWidth && !panes.foldStart) this.keptOpenByAuthor = true\n if (width < FigureEditor.FOLD_START_UNDER) {\n if (!panes.foldStart && !this.keptOpenByAuthor) {\n panes.foldStart = true\n this.foldedForWidth = true\n if (!foldSaid()) notify({ level: 'info', message: i18next.t('figure.text.parts-panel-folded-narrow') })\n }\n } else {\n if (this.foldedForWidth && panes.foldStart) panes.foldStart = false\n this.foldedForWidth = false\n this.keptOpenByAuthor = false\n }\n }\n /**\n * Refusals and notices go to the app's shared surfaces, as every screen's do (user, 2026-09-27: 「왜 모두가 사용하는\n * notification 오류 표현 방법을 사용하지 않고」 · 「혹은 oxprompt 에서 확인하고 진행하던지」). A refusal with a way on --\n * delete and fit the space again, narrow the range -- asks in the app's prompt and goes on when confirmed; any\n * other refusal is the app's notification, which stays until it is closed.\n */\n private toldViewError = ''\n private tell(changed: PropertyValues) {\n if (changed.has('error') && this.error) {\n const retry = this.retry\n if (retry) this.ask(this.error, retry)\n else notify({ level: 'error', message: this.error })\n }\n if (changed.has('notice') && this.notice) notify({ level: 'info', message: this.notice })\n const viewError = this.session?.read()?.error ?? ''\n if (viewError && viewError !== this.toldViewError) notify({ level: 'error', message: viewError })\n this.toldViewError = viewError\n }\n /*\n An edit that would stop clips is refused by figure-model with the clips named (CLIPS_DROPPED). The person is told\n which, and why, before anything is written; agreed, the same edit is made again letting exactly those go, as one\n step undo brings back (designer 2026-09-27).\n */\n private askClipLoss(error: unknown, again: () => void): boolean {\n if ((error as { code?: string })?.code !== 'CLIPS_DROPPED') return false\n const clips = (error as { clips: FigureClipLoss[] }).clips\n /* The consent is for this edit, on this figure as it is now: held with it while the person reads. */\n const session = this.session!\n const { context, revision } = session.read()\n void this.confirmClipLoss(clips, again, { session, context: context!, revision: revision! })\n return true\n }\n private async confirmClipLoss(clips: FigureClipLoss[], again: () => void, asked: { session: FigureProductSession; context: string; revision: number }) {\n const agreed = await OxPrompt.open({\n type: 'warning',\n text: i18next.t('figure.text.clips-would-go', { clips: clips.map(c => i18next.t(`figure.text.clip-${c.why}`, { clip: c.clip })).join(', ') }),\n confirmButton: { text: i18next.t('figure.button.let-clips-go') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (!agreed) return\n /* Changed while the person read -- another figure, or an edit in between: the consent was not for this; nothing is applied. */\n const now = this.session === asked.session ? asked.session.read() : undefined\n if (!now || now.context !== asked.context || now.revision !== asked.revision) {\n this.error = i18next.t('figure.text.clips-consent-stale')\n return\n }\n asked.session.withConsent({ dropClips: clips.map(c => c.id), context: asked.context, revision: asked.revision }, again)\n }\n private async ask(message: string, retry: { label: string; action?: FigureAuthoringAction; run?: () => void }) {\n const agreed = await OxPrompt.open({\n type: 'question',\n text: message,\n confirmButton: { text: retry.label },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (!agreed) return\n if (retry.run) retry.run()\n else this.linkCommand(retry.action!)\n }\n /*\n Per model and per part, how far its properties panel was scrolled and which of its folds were open, so going back\n to one finds it as it was left (designer 2026-09-27, B.1). The path stays held at the top, so a scroll kept cannot\n hide which part the panel speaks of. Another model starts clean.\n */\n private panelMemory = new Map<string, { top: number; open: boolean[] }>()\n private restorePanelFor?: string\n private propertiesPanel() {\n return this.renderRoot.querySelector<HTMLElement>('div[panel]')\n }\n private foldsOf(panel: HTMLElement): HTMLDetailsElement[] {\n const folds = [...panel.querySelectorAll('details')]\n for (const inner of panel.querySelectorAll('figure-links')) folds.push(...(inner.shadowRoot?.querySelectorAll('details') ?? []))\n return folds\n }\n protected willUpdate(_changed: PropertyValues) {\n const view = this.session?.read()\n if (view?.context !== this.lastContext) {\n this.lastContext = view?.context ?? null\n this.selected = ''\n this.error = ''\n this.hiddenParts = new Set()\n this.panelMemory.clear()\n } else if (_changed.has('selected')) {\n const panel = this.propertiesPanel()\n const was = (_changed.get('selected') as string | undefined) ?? ''\n if (panel) this.panelMemory.set(was || '@model', { top: panel.scrollTop, open: this.foldsOf(panel).map(d => d.open) })\n this.restorePanelFor = this.selected || '@model'\n }\n if (view && !view.geometry.some(g => ownerOf(g.id) === this.selected)) this.selected = ''\n if (_changed.has('selected')) this.gizmoMode = undefined\n /*\n * The section editor is of one part: when the selection moves off it by any way -- another part picked, the scene's\n * own Esc, the part removed, another figure opened -- it closes and lets go of the preview it held.\n */\n if (this.sectionEditing && this.sectionEditing !== this.selected) this.leaveSectionEditor(this.selected)\n }\n /**\n * The selection moved off the part being edited. With nothing changed there the editor closes; with changes, the part\n * stays selected while the editor asks (apply, let go, keep editing), and the move goes on only once it closed. A part\n * gone or another figure opened has nothing to go back to: the editor closes.\n */\n private leaveSectionEditor(next: string) {\n const editing = this.sectionEditing!\n const editor = this.renderRoot.querySelector('figure-section-editor') as (HTMLElement & { dirty: boolean; requestClose(): Promise<boolean> }) | null\n const view = this.session?.read()\n const stillThere = !!view?.geometry.some(g => ownerOf(g.id) === editing)\n if (!editor?.dirty || !stillThere) {\n this.closeSectionEditor()\n return\n }\n this.selected = editing\n editor.requestClose().then(closed => {\n if (closed && this.selected === editing) this.selected = next\n })\n }\n /** The scene toggles: the mode already shown takes the gizmo away. */\n private useGizmo(mode: 'translate' | 'rotate' | 'scale') {\n if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale') {\n const asset = this.asset() as FigureAsset | undefined\n if (asset && this.sizeDragUnsure(asset, this.selected)) {\n this.error = i18next.t('figure.text.gizmo-size-turned-fastening', { part: partLabelOf(this.selected), extreme: this.keptExtremeWord() })\n return\n }\n }\n this.renderRoot.querySelector<FigureCanvas>('figure-canvas')?.gizmo(mode)\n this.gizmoMode = this.gizmoMode === mode ? undefined : mode\n }\n /**\n * A refusal no particular sentence knows: figure-model's code said as a refusal, never its English; any other error\n * (the network, the server) as it came.\n */\n private said(error: unknown): string {\n return (error as { code?: string })?.code ? editRefusalOf(error, (key, params) => i18next.t(key, params)) : error instanceof Error ? error.message : String(error)\n }\n private run(action: () => unknown) {\n try {\n action()\n this.error = ''\n /* The next step stands on its own: what the last removal let go of is no longer the news. */\n this.notice = ''\n this.changed()\n } catch (error) {\n if (this.askClipLoss(error, () => this.run(action))) return\n const say = (key: string, params: Record<string, string>) => i18next.t(key, params)\n this.error = sizeRangeRefusalOf(error, say) ?? inputRangeRefusalOf(error, say) ?? this.said(error)\n } finally {\n /* Committed or refused, the value in hand is gone: the figure as it stands is drawn again. */\n this.live = NOTHING_LIVE\n }\n }\n /** What the canvas draws: the figure with the value in hand when there is one, and without the parts hidden on the workbench. */\n private drawnParts(geometry: Parameters<typeof drawableFigureParts>[0] | undefined, asset: unknown) {\n const parts = (asset ? liveOverSession(asset as FigureAsset, this.currentInputs(), this.live) : null) ?? drawableFigureParts(geometry ?? [])\n return parts.filter(body => !this.hiddenParts.has(ownerOf((body as { id: string }).id)))\n }\n /**\n * Where the selected part turns and how far, with the pose as it is drawn now -- a value in hand included, so the\n * fan follows the arm while a control is dragged. Its size comes from what the joint turns (`joint-fan`).\n */\n private fanOf(asset: FigureAsset | undefined) {\n if (!asset || !this.selected || this.hiddenParts.has(this.selected)) return null\n try {\n return jointFanOf(asset, this.selected, { ...this.currentInputs(), ...this.live.values })\n } catch {\n return null\n }\n }\n /**\n * Every input as the session holds it now -- the pose the author has set with the controls, and design values. The\n * asset's source carries only the saved defaults, so drawing a value in hand over it put every other joint back to its\n * saved angle while one slider moved, and the arm jumped when released (user, 2026-09-24).\n */\n private currentInputs(): Record<string, number> {\n const view = this.session?.read()\n return view ? Object.fromEntries(view.fields.map(field => [field.id, field.value as number])) : {}\n }\n /** A value in hand: an input's value (design or pose) or a part edit. Nothing is recorded. */\n private hold(values: Record<string, number>, edit?: FigurePartEdit) {\n this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) }\n }\n private closeSectionEditor() {\n this.sectionEditing = null\n this.holdAction(null)\n }\n /** A command in hand, drawn and not run; `null` lets go of it and the figure as it stands is drawn again. */\n private holdAction(action: FigureAuthoringAction | null) {\n const { action: _, ...rest } = this.live\n this.live = action ? { ...rest, action } : rest\n }\n\n private changed() {\n this.requestUpdate()\n this.dispatchEvent(new CustomEvent('changed', { bubbles: true, composed: true }))\n }\n private async save() {\n if (!this.session) return\n try {\n /*\n The card's picture is taken before the save starts, from a canvas of its own at the card's size —\n not from the one on screen, which stands wherever the author left it turned. A picture that cannot\n be taken is not an error: the save goes on without it (see `thumbnail.ts`).\n */\n let type: string | undefined\n if (!this.session.read().id && this.firstSave) {\n const answer = await this.firstSave(this.session.read().name ?? '')\n if (!answer) return\n /* The name is the figure's own, in the asset: one step of the history, like typing it in the properties. */\n if (answer.name !== this.session.read().name) {\n this.session.command({ kind: 'rename', name: answer.name })\n this.changed()\n }\n type = answer.type\n }\n const view = this.session.read()\n const thumbnail = await captureFigureThumbnail(drawableFigureParts(view.geometry ?? []), view.palette ?? {})\n const promise = this.session.save({ thumbnail, type })\n this.changed()\n await promise\n this.error = ''\n } catch (error) {\n /* Not reached: whether it was written is not known, and the edits are still here -- said so, not \"not saved\". */\n this.error = (error as { code?: string })?.code === 'SAVE_UNREACHABLE' ? i18next.t('figure.text.save-unreachable') : this.said(error)\n } finally {\n this.changed()\n }\n }\n private add(kind: FigurePaletteKind) {\n if (!this.session) return\n this.run(() => {\n const ids = new Set(this.session!.read().geometry.map(g => g.id))\n let n = 1\n while (ids.has(`${kind}-${n}`)) n++\n const part = paletteRecipe(kind, `${kind}-${n}`)\n this.session!.add(part)\n this.selected = part.id\n })\n }\n /**\n * The list's own operations, as part edits — each one step of the session's history. The copy and the moved\n * part stay selected.\n */\n private duplicatePart(id: string) {\n this.run(() => {\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n this.selected = this.session!.read().geometry.find(g => !before.has(g.id))?.id ?? id\n })\n }\n private movePart(id: string, to: number) {\n this.run(() => this.session!.edit({ kind: 'move-part', target: id, to }))\n }\n private removePart(id: string, refitRoom = false) {\n this.retry = undefined\n try {\n const view = this.session!.edit({ kind: 'remove-part', target: id, ...(refitRoom ? { refitRoom: true } : {}) }) as { removal?: Parameters<typeof removalNoticeOf>[0] }\n this.error = ''\n /* What else the removal let go of, named (chief architect, 2026-09-27); undo brings it back. */\n this.notice = removalNoticeOf(view.removal, (key, params) => i18next.t(key, params)) ?? ''\n if (this.selected === id) this.selected = ''\n this.changed()\n } catch (error) {\n if (this.askClipLoss(error, () => this.removePart(id, refitRoom))) return\n /*\n A part in the declared space goes, and the space is fitted to the parts left, in the same click: every space\n this product declares is fitted to the parts (「부품에 맞추기」, the AI's fit-room -- no padding), so fitting it\n again keeps what it says, and there is nothing to ask (user, 2026-09-27: 「이 확인이 꼭 필요한가 ?」).\n */\n if (!refitRoom && inDeclaredRoom(error)) {\n this.removePart(id, true)\n if (!this.error) this.notice = [this.notice, i18next.t('figure.text.removal-space-refitted')].filter(Boolean).join(' ')\n return\n }\n this.error = partRefusalOf(error, id, (key, params) => i18next.t(key, params)) ?? this.said(error)\n }\n }\n private toggleHiddenPart(id: string) {\n const next = new Set(this.hiddenParts)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n this.hiddenParts = next\n }\n /** Whether the figure declares its size (the three size inputs). */\n private hasSize(): boolean {\n const values = this.designValues()\n return ['x', 'y', 'z'].every(axis => typeof values[`size.${axis}`] === 'number')\n }\n /**\n * A recipe put in (ADR-0095): resolved on the figure as it stands -- its parts take the next free name, onto the part\n * chosen -- and applied as one step. Refused, the kernel's sentence goes to the form as it is (condition 3).\n */\n private insertRecipe(recipe: FigureRecipe, values: Record<string, FigureRecipeValue>) {\n try {\n const asset = JSON.parse(this.session!.source()) as FigureAsset\n const checked = parseFigureRecipe(recipe)\n const id = figureRecipeIdFor(asset, checked)\n const steps = resolveFigureRecipe(checked, { id, ...(checked.target === 'part' ? { target: this.selected } : {}), values })\n this.session!.applyRecipe(steps)\n this.recipeError = ''\n this.catalogOpen = false\n this.error = ''\n this.changed()\n } catch (error) {\n this.recipeError = recipeRefusalOf(error, (key, params) => i18next.t(key, params)) ?? this.said(error)\n }\n }\n /** The design values of the asset being edited. */\n private designValues(): Record<string, number> {\n try {\n return this.session ? (JSON.parse(this.session.source()).designInputs ?? {}) : {}\n } catch {\n return {}\n }\n }\n /** What the gizmo may write for the selected part — read off the asset being edited. */\n private reachOf(id: string): GizmoReach {\n const none = { translate: false, rotate: false, scale: false }\n /* A repeat is moved and sized through its row, not by a gizmo on one copy. */\n if (!id || !this.session || !this.session.read().geometry.some(g => g.id === id)) return none\n try {\n const asset = JSON.parse(this.session.source())\n const reach = gizmoReachOf(asset, id)\n /*\n A size drag shows the face it keeps and the commit keeps the same (figureScaleAnchorOf). Where figure-model cannot\n say which face that is -- a part fastened turned or twisted -- the drag would show one result and write another,\n so sizing by the gizmo is not offered there; the fields still size it (designer 2026-09-27).\n */\n if (reach.scale && this.sizeDragUnsure(asset, id)) return { ...reach, scale: false }\n return reach\n } catch {\n return none\n }\n }\n /** Whether a size drag on this part could not show what is written: figure-model gives no face it keeps. */\n private sizeDragUnsure(asset: FigureAsset, id: string): boolean {\n try {\n return !figureScaleAnchorOf(asset, ownerOf(id))\n } catch {\n return true\n }\n }\n /** A drag, written back as the part's own inputs — one step of the history, like typing the numbers. */\n private transformed(id: string, result: GizmoResult) {\n const view = this.session!.read()\n /* A part hanging from a joint: the drag edits the joint -- its value, or where it sits (ADR-0093). */\n const asset = JSON.parse(this.session!.source()) as FigureAsset\n const drawn = view.geometry.find(g => g.id === id) as unknown as FigureRenderPart | undefined\n const drag = drawn ? jointDragOf(asset, ownerOf(id), drawn, result, this.currentInputs()) : null\n if (drag) {\n if (drag.kind === 'value') this.run(() => this.session!.apply([{ kind: 'set-state', input: drag.input, unit: drag.unit, value: drag.value }]))\n else if (drag.kind === 'joint') this.run(() => this.session!.command({ kind: 'set-joint', joint: drag.joint }))\n else {\n this.error = i18next.t(`figure.text.gizmo-joint-${drag.reason}`, { joint: drag.joint, leader: drag.leader ?? '', axis: drag.axis ?? '' })\n this.requestUpdate()\n }\n return\n }\n const sizes = Object.fromEntries(view.fields.map(field => [field.id, field.value as number]))\n /*\n A part a joint places, scaled: only its measures change. The shift of its centre that an anchored scale makes is\n the joint's to give -- the face on the joint stays there by itself (user, 2026-09-25: 「'R'모드에서 크기가 변하지 않는다」;\n the shift had been taken for a move of the joint, and the size was dropped).\n */\n const jointed = !!asset.joints?.some(j => j.body1.part === ownerOf(id))\n /* A size drag this part cannot show truly is not written: it springs back, and the reason is said. */\n if (result.scale && result.scale.some(k => Math.abs(k - 1) > 1e-4) && this.sizeDragUnsure(asset, id)) {\n this.error = i18next.t('figure.text.gizmo-size-turned-fastening', { part: partLabelOf(id), extreme: this.keptExtremeWord() })\n return this.requestUpdate()\n }\n /*\n A size dragged keeps the face the figure's placement keeps, as a size typed does (figure-model's one rule): the\n gizmo's own anchoring on the opposite face is what the drag shows, not what is written (designer 2026-09-27).\n */\n const scaled = !!result.scale && !result.rotation && result.scale.some(k => Math.abs(k - 1) > 1e-4)\n const taken = jointed || scaled ? { scale: result.scale } : result\n const written = gizmoChanges(id, this.reachOf(id), taken, sizes)\n const changes = scaled && !jointed ? figureSizeEditChanges(asset, ownerOf(id), written) : written\n if (changes.length) {\n this.run(() => this.session!.apply(changes))\n return\n }\n if (jointed && result.scale) {\n /* Only measures that follow another were pulled: the relation says their size, and it is not broken here. */\n const axes = (['x', 'y', 'z'] as const).filter((_, i) => Math.abs(result.scale![i]! - 1) > 1e-4)\n this.error = i18next.t('figure.text.gizmo-size-follows', { part: partLabelOf(id), axis: axes.join(', ').toUpperCase() })\n return this.requestUpdate()\n }\n /*\n A part whose place is worked out has no numbers for the gizmo to write: the drag is added beside\n its rule (`nudge-part`). A part a joint or a fastening places, or a size that is worked out, is refused -- said in\n words, not by the part silently springing back (user, 2026-09-24: 「기즈모 컨트롤도 전혀 작동이 안되는군」).\n */\n const body = view.geometry.find(g => g.id === id) as unknown as FigureRenderPart | undefined\n if (!body) return this.requestUpdate()\n const { by, turn } = nudgeOf(body, result)\n /* A size worked out from the figure's: the drag's factor beside its rule, so it still follows. */\n const grow: Partial<Record<'x' | 'y' | 'z', number>> = {}\n if (result.scale) (['x', 'y', 'z'] as const).forEach((axis, i) => Math.abs(result.scale![i]! - 1) > 1e-6 && (grow[axis] = Math.round(result.scale![i]! * 1e6) / 1e6))\n if (!Object.keys(by).length && !Object.keys(turn).length && !Object.keys(grow).length) return this.requestUpdate()\n try {\n this.session!.command({\n kind: 'nudge-part',\n part: id,\n ...(Object.keys(by).length ? { by } : {}),\n ...(Object.keys(turn).length ? { turn } : {}),\n ...(Object.keys(grow).length ? { grow } : {})\n })\n this.error = ''\n this.changed()\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n this.error = /carried by a joint/.test(message)\n ? i18next.t('figure.text.gizmo-joint-places', { part: partLabelOf(id) })\n : /is fastened to/.test(message)\n ? i18next.t('figure.text.gizmo-fastening-places', { part: partLabelOf(id) })\n : this.said(error)\n this.requestUpdate()\n }\n }\n /** 맞추기 — one tool, one step of the history, through the same inputs as the gizmo. */\n private align(tool: AlignTool) {\n this.run(() => {\n const asset = JSON.parse(this.session!.source())\n const changes = alignChanges(asset, this.selected, this.reachOf(this.selected), tool)\n if (changes.length) this.session!.apply(changes)\n })\n }\n /** A mirrored copy: duplicate, then place the copy on the other side — two steps. */\n private mirror(axis: 'x' | 'z') {\n this.run(() => {\n const id = this.selected\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n const copy = this.session!.read().geometry.find(g => !before.has(g.id))?.id\n if (!copy) return\n this.session!.apply(mirrorChanges(JSON.parse(this.session!.source()), id, copy, axis))\n this.selected = copy\n })\n }\n /**\n * The one-off \"put it on the plane\", by the figure's placement (designer 2026-09-27): figure-model's rule\n * (`figurePlaneAlignChanges`) -- a floor figure's part to the floor by its bottom, a ceiling one's to the ceiling by\n * its top, a wall one's to the wall by its back, a centred one's centre to the origin's height. Once: nothing is\n * fastened. Refused, it says why.\n */\n /* What a tilted part's typed size keeps, by the figure's placement: not the floor's lowest point everywhere (designer 2026-09-27). */\n private keptExtremeWord(): string {\n const placement = (this.asset() as FigureAsset | undefined)?.placement ?? 'floor'\n return i18next.t(`figure.label.kept-extreme-${placement}`)\n }\n /* How the selected part would meet the plane, kept per source and part: working it out compiles the figure. */\n private planeContact?: { source: string; part: string; contact?: FigurePlaneContact }\n private planeContactOf(source: string, part: string): FigurePlaneContact | undefined {\n if (this.planeContact?.source !== source || this.planeContact.part !== part) {\n let contact: FigurePlaneContact | undefined\n try {\n contact = figurePlaneAlignChanges(parseFigureAsset(source), part).contact\n } catch {\n contact = undefined\n }\n this.planeContact = { source, part, contact }\n }\n return this.planeContact.contact\n }\n private renderPlaneAlign(asset: FigureAsset, unavailable: boolean) {\n const placement = asset.placement ?? 'floor'\n /* A tilted part touches the plane at a point or an edge, a ball at its lowest; the tooltip says so rather than promise a face (designer 2026-09-27). */\n const contact = this.planeContactOf(this.session!.source(), this.selected)\n const told = contact === 'tilted' || contact === 'extreme' ? `-${contact}` : ''\n return html`<button plane-align=${placement} ?disabled=${unavailable} title=${i18next.t(`figure.text.align-to-${placement}${told}`)}\n @click=${() => this.alignToPlane()}>${i18next.t(`figure.button.align-to-${placement}`)}</button>`\n }\n private alignToPlane() {\n const asset = parseFigureAsset(this.session!.source())\n const { changes, contact, refusal } = figurePlaneAlignChanges(asset, this.selected)\n if (refusal) {\n this.error = i18next.t(`figure.text.align-refused-${refusal.toLowerCase().replace(/_/g, '-')}`, { part: partLabelOf(this.selected) })\n return\n }\n if (changes.length) this.run(() => this.session!.apply(changes))\n if ((contact === 'tilted' || contact === 'extreme') && !this.error) this.notice = i18next.t(`figure.text.aligned-${contact}-${asset.placement ?? 'floor'}`)\n }\n private renderTools(unavailable: boolean) {\n const reach = this.reachOf(this.selected)\n if (!this.selected || !reach.translate) return null\n let asset: unknown\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n /*\n * In words, two rows by what they do (user 2026-10-01: 「무엇을 하는 것인지 모르겠다」): moving the part to the figure's\n * centre lines, onto its plane or onto the grid; and making a mirrored copy, which makes a part and moves nothing.\n */\n const tool = (name: AlignTool, label: string, title: string) =>\n html`<button ?disabled=${unavailable} title=${i18next.t(title)} @click=${() => this.align(name)}>${i18next.t(label)}</button>`\n const mirrors = (['x', 'z'] as const).map(axis => ({ axis, able: canMirror(asset as never, this.selected, axis, reach) }))\n return html`<div vector-row>\n <label>${i18next.t('figure.label.tools')}</label>\n <div tools>\n ${tool('centre-x', 'figure.button.center-x', 'figure.text.center-on-x')}\n ${tool('centre-z', 'figure.button.center-z', 'figure.text.center-on-z')}\n ${this.renderPlaneAlign(asset as FigureAsset, unavailable)}\n ${tool('snap', 'figure.button.snap', 'figure.text.snap-explained')}\n </div>\n </div>\n <div vector-row>\n <label>${i18next.t('figure.label.mirror-copy')}</label>\n <div tools>\n ${mirrors.map(\n ({ axis, able }) => html`<button ?disabled=${unavailable || !able} title=${i18next.t(able ? 'figure.text.mirror-explained' : 'figure.text.mirror-would-overlap')} @click=${() => this.mirror(axis)}>\n ${i18next.t('figure.button.mirror-' + axis)}\n </button>`\n )}\n </div>\n </div>\n`\n }\n /**\n * A part's name. It renames every value the part owns, and what refers to them follows\n * (figure-model's rename-part), as one step of the history.\n */\n /**\n * A repeated body is one of its repeat's copies and is named after it -- the list and this field read `roller 15`, not\n * its path through the repeat (user, 2026-09-24: 「부품 이름 ???」). A copy has no name of its own to change.\n */\n private renderRepeatNote(geometry: readonly unknown[] | undefined) {\n const repeat = repeatOf(this.selected, geometry)\n return repeat?.index ? html`<p hint>${i18next.t('figure.text.repeat-member', { name: repeat.name, count: repeat.count, index: repeat.index })}</p>` : nothing\n }\n private renamePart(input: HTMLInputElement) {\n const name = input.value.trim()\n const from = this.selected\n if (!name || name === from) {\n input.value = from\n return\n }\n try {\n this.session!.edit({ kind: 'rename-part', target: from, name })\n this.selected = name\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = from\n const code = (error as { code?: string })?.code\n this.error =\n code === 'PART_ID'\n ? i18next.t(/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(name) ? 'figure.text.part-name-taken' : 'figure.text.part-name-invalid', { name })\n : error instanceof Error\n ? error.message\n : String(error)\n }\n }\n /** Size response, fastening and motion for the selected part, as authoring commands. */\n private renderLinks(unavailable: boolean, section: 'shape' | 'places' | 'motion') {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n let dims: [number, number, number] | undefined\n try {\n dims = boxOf(asset, this.selected)?.dims\n } catch {\n dims = undefined\n }\n return html`<figure-links\n .asset=${asset}\n .section=${section}\n .partId=${this.selected}\n .dims=${dims}\n ?locked=${unavailable}\n @command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n .previewWords=${previewWordsOf(this.currentPreview(), this.selected, (key, params) => i18next.t(key, params))}\n .detachWords=${this.detachWords(asset as FigureAsset | undefined)}\n .overhangWords=${section === 'shape' ? this.overhangWords(asset as FigureAsset | undefined) : []}\n .overhangNote=${section === 'shape' ? this.overhangNote(asset as FigureAsset | undefined) : []}\n .motionEnds=${section === 'motion' ? this.motionEnds() : null}\n @go-fasten=${() => this.goFasten()}\n @preview-command=${(e: CustomEvent) => this.previewCommand(e.detail)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-links>`\n }\n /**\n * The face a size drag keeps for the selected part, figure-model's rule (`figureScaleAnchorOf`): the gizmo shows it\n * while dragging and the commit keeps it, so nothing jumps on release. A part whose fastening is turned has none the\n * rule can say, and the gizmo keeps its own (the face across from the handle).\n */\n private anchorsOf(asset: FigureAsset | undefined): Record<string, ScaleAnchor> {\n let next: Record<string, ScaleAnchor> = {}\n try {\n const anchor = asset && this.selected ? figureScaleAnchorOf(asset, this.selected) : undefined\n if (anchor) next = { [this.selected]: anchor }\n } catch {\n next = {}\n }\n /* The same object while it says the same thing: the canvas stands its parts up again when this changes. */\n if (JSON.stringify(next) !== JSON.stringify(this.lastAnchors)) this.lastAnchors = next\n return this.lastAnchors\n }\n private lastAnchors: Record<string, ScaleAnchor> = {}\n /** The figure's controls: try a value, name it, set its range and travel time, keep the pose. */\n private renderControls(view: { fields: Array<{ id: string; role?: string; value: number }> }, unavailable: boolean) {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n const values = Object.fromEntries(view.fields.filter(f => f.role === 'state').map(f => [f.id, f.value]))\n return html`<figure-controls\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @state=${(e: CustomEvent) => this.run(() => this.session!.apply([{ kind: 'set-state', input: e.detail.input, unit: e.detail.unit, value: e.detail.value }]))}\n @state-live=${(e: CustomEvent) => this.hold({ [e.detail.input]: e.detail.value })}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-controls>\n <figure-clips\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @states=${(e: CustomEvent) => this.run(() => this.session!.apply(e.detail.changes))}\n @states-live=${(e: CustomEvent) => this.hold(e.detail.values)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-clips>`\n }\n /** One command, one step of the history. A refusal a person can meet here is said in their words. */\n /** Where a held edit goes once the author has chosen where what stands on its lost faces goes. */\n private mapFaces(remap: FigureFaceRemap[]) {\n const held = this.faceMapping\n if (!held) return\n const done = this.linkCommand({ ...held.action, remap } as FigureAuthoringAction, held.from)\n if (done && held.from === 'section-editor') this.closeSectionEditor()\n }\n /** Runs a command; true when it was taken. */\n private linkCommand(action: FigureAuthoringAction, from: 'section-editor' | 'panel' = 'panel'): boolean {\n /* Committed or refused, a command in hand is let go of: the figure as it stands is drawn again. */\n this.holdAction(null)\n this.retry = undefined\n this.notice = ''\n const hadSize = this.hasSize()\n try {\n this.session!.command(action)\n this.error = ''\n this.faceMapping = undefined\n /* What the command did besides what was asked, in one line: the figure's size declared to follow (ADR ruling Q1). */\n if (action.kind === 'follow-size' && !hadSize) {\n const size = this.designValues()\n this.notice = i18next.t('figure.text.size-declared-to-follow', {\n x: Math.round(size['size.x'] ?? 0).toLocaleString(),\n y: Math.round(size['size.y'] ?? 0).toLocaleString(),\n z: Math.round(size['size.z'] ?? 0).toLocaleString()\n })\n }\n this.changed()\n return true\n } catch (error) {\n if (this.askClipLoss(error, () => this.linkCommand(action, from))) return false\n const code = (error as { code?: string })?.code\n /* Something stands on a face this takes away: ask where it goes, there, rather than only saying no. */\n const need = (error as { details?: FigureFaceMappingNeed }).details\n if (code === 'FEATURE_MAPPING_REQUIRED' && need?.lost?.length) {\n this.faceMapping = { action, need, from }\n this.error = ''\n return false\n }\n const narrowing = narrowingRetryOf(action, error, (key, params) => i18next.t(key, params))\n if (narrowing) {\n this.error = narrowing.message\n this.retry = { label: narrowing.label, action: narrowing.retry as FigureAuthoringAction }\n return false\n }\n this.error =\n code === 'DIMENSION_CYCLE'\n ? i18next.t('figure.text.follow-would-loop')\n : code === 'FASTEN_CYCLE' || code === 'ATTACH_CYCLE'\n ? i18next.t('figure.text.fasten-would-loop')\n : sizeRangeRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n placementRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n this.said(error)\n return false\n }\n }\n private changeField(field: { id: string; unit: FigureInputChange['unit']; role?: string }, event: Event) {\n const input = event.target as HTMLInputElement,\n value = input.valueAsNumber\n /* A size typed in keeps the face the figure's placement keeps -- figure-model's one rule, as the gizmo and \"follow the size\" do. */\n const part = this.selected\n const change: FigureInputChange = { kind: field.role === 'state' ? 'set-state' : 'set-design', input: field.id, unit: field.unit, value }\n this.run(() => this.session!.apply(field.role !== 'state' && part ? figureSizeEditChanges(parseFigureAsset(this.session!.source()), part, [change]) : [change]))\n // Rejected edits must also restore the displayed numeric value.\n input.value = String(this.session!.read().fields.find(i => i.id === field.id)!.value)\n }\n /** Typing or a held spinner: each number on the way is drawn; the field's change records it. */\n private typing(field: { id: string }, event: Event) {\n const value = (event.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(value)) this.hold({ [field.id]: value })\n }\n /**\n * Drag a field's label (or an axis letter) sideways to scrub its value, as vector tools do: the figure follows the\n * pointer, and the release records one step. The field's number follows too, so the value in hand is always read.\n */\n private scrub(field: { id: string; unit: FigureInputChange['unit']; role?: string; value: number }, down: PointerEvent, unavailable: boolean) {\n if (unavailable || down.button !== 0) return\n const label = down.currentTarget as HTMLElement\n const input = (label.closest('div[cell]')?.querySelector('input') ?? label.nextElementSibling) as HTMLInputElement | null\n if (!input) return\n down.preventDefault()\n label.setPointerCapture(down.pointerId)\n const start = field.value\n let value = start\n const move = (e: PointerEvent) => {\n value = scrubbed(start, e.clientX - down.clientX, scrubStep(field.unit, start, e.shiftKey))\n input.value = String(value)\n this.hold({ [field.id]: value })\n }\n const up = (e: PointerEvent) => {\n label.removeEventListener('pointermove', move)\n label.removeEventListener('pointerup', up)\n label.removeEventListener('pointercancel', up)\n /* A drag the system took away is not the author's value: the field goes back to where it was. */\n if (e.type === 'pointercancel') value = start\n if (value === start) {\n input.value = String(start)\n this.live = NOTHING_LIVE\n return\n }\n input.value = String(value)\n this.changeField(field, { target: input } as unknown as Event)\n }\n label.addEventListener('pointermove', move)\n label.addEventListener('pointerup', up)\n label.addEventListener('pointercancel', up)\n }\n /** The measured range, kept for the revision it was measured at: measuring evaluates the figure at its edges. */\n private range?: { at: string; of: ReturnType<typeof instanceRangeOf>; toDeclare?: ReturnType<typeof instanceRangeToDeclare> }\n /** The sizes a board may give the figure, and the way to measure them again after its parts changed. */\n private renderInstanceRange(asset: FigureAsset | undefined, unavailable: boolean) {\n if (!asset) return nothing\n /* Another figure, or another step of this one, is measured again. */\n const at = `${this.session?.read().context ?? ''}:${this.revision}`\n if (this.range?.at !== at) {\n let of: ReturnType<typeof instanceRangeOf>\n let toDeclare: ReturnType<typeof instanceRangeToDeclare>\n try {\n of = instanceRangeOf(asset)\n } catch {\n of = undefined\n }\n try {\n toDeclare = of ? undefined : instanceRangeToDeclare(asset)\n } catch {\n toDeclare = undefined\n }\n this.range = { at, of, toDeclare }\n }\n const range = this.range.of\n /* No size yet: the figure is declared its size from its parts, so a board can resize it and parts can follow it. */\n const toDeclare = this.range.toDeclare\n if (!range && toDeclare)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n <p hint>${i18next.t('figure.text.instance-size-undeclared')}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: toDeclare.range, at: toDeclare.at })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.declare-instance-size')}\n </button>\n </section>`\n if (!range) return nothing\n const mm = (v: number) => Math.round(v).toLocaleString()\n const differs = rangeDiffers(range.declared, range.measured)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n ${(['x', 'y', 'z'] as const).map(\n axis => html`<div inline-field>\n <label>${axis.toUpperCase()} <span unit>mm</span></label>\n <div pair>\n ${(['min', 'max'] as const).map(\n bound => html`<input\n aria-label=${`size.${axis}.${bound}`}\n type=\"number\"\n step=\"any\"\n .value=${live(String(Math.round(range.declared[axis][bound])))}\n ?disabled=${unavailable}\n @change=${(e: Event) => {\n const next = rangeWith(range.declared, axis, bound, (e.target as HTMLInputElement).valueAsNumber)\n if (next) this.linkCommand({ kind: 'declare-instance-size', range: next, replace: true })\n }}\n />`\n )}\n </div>\n </div>`\n )}\n ${differs\n ? html`<p hint>\n ${i18next.t('figure.text.instance-range-can-widen', {\n ranges: (['x', 'y', 'z'] as const)\n .filter(axis => rangeDiffers(range.declared, { ...range.declared, [axis]: range.measured[axis] }))\n .map(axis => `${axis.toUpperCase()} ${mm(range.measured[axis].min)} – ${mm(range.measured[axis].max)}`)\n .join(' · ')\n })}\n </p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: range.measured, replace: true })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.remeasure-range')}\n </button>`\n : nothing}\n ${this.renderSizingRule(asset, unavailable)}\n </section>`\n }\n /**\n * How the figure grows. One ratio (`sizing: 'uniform'`) is said as it is; a figure with joints that has not declared\n * it is offered it -- a mechanism does not shear -- and the author decides (chief architect's ruling 2026-09-24).\n */\n private renderSizingRule(asset: FigureAsset, unavailable: boolean) {\n if (asset.sizing === 'uniform') {\n /* One ratio reaches only what reads the size: every other length is offered to follow it, in one step. */\n const follow = proportionToFollow(asset)\n return html`<div inline-field><label>${i18next.t('figure.label.sizing-rule')}</label><span>${i18next.t('figure.label.sizing-uniform')}</span></div>\n ${follow?.count\n ? html`<p hint>${i18next.t('figure.text.proportion-to-follow', { count: follow.count })}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'follow-size-in-proportion' })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size-in-proportion')}\n </button>`\n : nothing}\n ${follow?.kept.length ? html`<p hint>${i18next.t('figure.text.proportion-kept', { what: follow.kept.join(', ') })}</p>` : nothing}`\n }\n return html`${turnsAboutAJoint(asset) ? html`<p hint>${i18next.t('figure.text.sizing-uniform-proposed')}</p>` : nothing}\n <button act ?disabled=${unavailable} title=${i18next.t('figure.text.sizing-uniform-explained')} @click=${() => this.linkCommand({ kind: 'scale-uniformly' })}>\n <md-icon>aspect_ratio</md-icon>${i18next.t('figure.button.scale-uniformly')}\n </button>`\n }\n /**\n * The parts list, one row per part the author made: a repeat is one row with how many copies it makes now\n * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\n private partRows(geometry: readonly { id: string }[], asset?: FigureAsset): FigurePartRow[] {\n /* Where each part is fastened, straight above it: `part · face`, or the mounting plane (ADR-0097 §5.5). */\n const fastened = new Map(\n (asset?.joints ?? []).map(j => [\n j.body1.part,\n 'plane' in j.body0 ? i18next.t('figure.label.mounting-plane') : `${partLabelOf(j.body0.part)} · ${i18next.t(`figure.label.face-${j.body0.face}`)}`\n ])\n )\n const rows = new Map<string, FigurePartRow>()\n for (const g of geometry) {\n const id = ownerOf(g.id)\n const row = rows.get(id)\n if (row) {\n row.copies = (row.copies ?? 1) + 1\n continue\n }\n rows.set(id, {\n id,\n kind: startingShapeKindOfBody((g as { shape?: never }).shape) ?? '',\n hidden: this.hiddenParts.has(id),\n invisible: (g as { visible?: boolean }).visible === false,\n ...(id !== g.id ? { copies: 1 } : {}),\n ...(fastened.has(id) ? { fastenedTo: fastened.get(id)! } : {})\n })\n }\n return [...rows.values()]\n }\n /** The detail level's part budget for the list's head, from figure-model's count (a repeat once). */\n private partBudgetOf(asset: FigureAsset | undefined) {\n if (!asset) return undefined\n try {\n return { level: asset.detailLevel ?? null, used: figurePartCountOf(asset), limit: asset.detailLevel ? PART_LIMIT[asset.detailLevel] : null }\n } catch {\n return undefined\n }\n }\n /**\n * A repeat: which way its copies run, how many there are now, and how far apart.\n * The pitch of a row that fills its length is edited as a number (`set-repeat` makes it the part's own the first\n * time); a row of a fixed count says its pitch cannot be set yet (figure-model refuses it the same way).\n */\n private renderRepeat(asset: FigureAsset | undefined, geometry: readonly { id: string }[], unavailable: boolean) {\n const repeat = repeatOf(this.selected, geometry)\n if (!asset || !repeat || repeat.index) return nothing\n /* The row is set on its part; what hangs from that part is copied with it and has no row of its own. */\n if (!asset.document.model.nodes.some(n => n.id === `${this.selected}.repeat`)) return nothing\n const model = asset.document.model as unknown as {\n nodes: { id: string; op: string; args: string[]; params?: Record<string, string> }[]\n constants: { id: string; value: number }[]\n inputs: { id: string; max?: number }[]\n }\n const layout = model.nodes.find(n => n.id === `${this.selected}.layout`)\n const axis = model.nodes.find(n => n.id === `${this.selected}.repeat`)?.params?.axis ?? '?'\n const own = `${this.selected}.repeat.pitch`\n /* The pitch as it stands: the part's own number, a constant, or what a pitch that follows a length comes to. */\n const pitch = asset.designInputs[own] ?? model.constants.find(c => c.id === layout?.args[4])?.value ?? valueNow(asset, layout?.args[4])\n const fits = layout?.op === 'fit-pitch@1'\n /* What the pitch gives, in numbers: this many copies at the length it is authored, and how long it may be placed. */\n const lengthRef = layout?.args[0] ?? ''\n const length = asset.designInputs[lengthRef]\n const longest = model.inputs.find(i => i.id === lengthRef)?.max\n const limit = model.constants.find(c => c.id === layout?.args[6])?.value\n const field = { id: own, unit: 'mm' as const, role: 'design', value: pitch ?? 0 }\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div inline-field><label>${i18next.t('figure.label.repeat-axis')}</label><span value>${axis.toUpperCase()}</span></div>\n <div inline-field><label>${i18next.t('figure.label.repeat-count')}</label><span value>${repeat.count}</span></div>\n <div inline-field>\n <label>${i18next.t('figure.label.repeat-gap')} <span unit>mm</span></label>\n <input\n type=\"number\"\n step=\"any\"\n aria-label=${own}\n .value=${String(pitch ?? '')}\n ?disabled=${unavailable || !fits}\n @change=${(e: Event) => this.setPitch(field, e)}\n />\n </div>\n <ul row-reading>${rowWordsOf(this.rowNow(asset), (key, params) => i18next.t(key, params)).map(line => html`<li>${line}</li>`)}</ul>\n <p hint>\n ${fits && length !== undefined && longest !== undefined && limit !== undefined\n ? i18next.t('figure.text.repeat-what-pitch-gives', {\n length: length.toLocaleString(),\n count: repeat.count,\n longest: longest.toLocaleString(),\n limit\n })\n : i18next.t(fits ? 'figure.text.repeat-fits-length' : 'figure.text.repeat-fixed-count')}\n </p>\n ${this.renderPublicPitch(asset, pitch ?? 0, unavailable)}\n ${asset.joints?.some(j => j.body1.part === this.selected && j.repeat)\n ? html`<button act ?disabled=${unavailable} @click=${() => this.run(() => this.session!.command({ kind: 'remove-repeat', part: this.selected }))}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-repeat')}\n </button>`\n : nothing}\n </section>`\n }\n /** The selected row as it is drawn now, read by figure-model: nothing when it cannot be read. */\n private rowNow(asset: FigureAsset): FigureRowReading | undefined {\n try {\n return figureRowOf(asset, this.selected, this.currentInputs())\n } catch {\n return undefined\n }\n }\n /** The design input a row's pitch is read from, when it is read from one (ADR-0096). */\n private pitchInputOf(asset: FigureAsset, part: string): string | undefined {\n const pitch = asset.joints?.find(j => j.body1.part === part && j.repeat)?.repeat?.pitch as { from?: { of?: string; input?: string } } | number | undefined\n return typeof pitch === 'object' && pitch?.from?.of === 'input' ? pitch.from.input : undefined\n }\n /**\n * 「보드에서 바꿀 수 있음」 (ADR-0096): the row's pitch made a design input the figure publishes -- a name on the board and\n * a range the board's value is held to -- in one step; changed or withdrawn the same way. Only a row with a record.\n */\n private renderPublicPitch(asset: FigureAsset, pitch: number, unavailable: boolean) {\n const part = this.selected\n if (!asset.joints?.some(j => j.body1.part === part && j.repeat)) return nothing\n const from = this.pitchInputOf(asset, part)\n const listed = from ? asset.publicInputs?.find(p => p.input === from) : undefined\n const input = from ? asset.document.model.inputs.find(i => i.id === from) : undefined\n const form =\n this.publishing?.part === part\n ? this.publishing\n : listed && input\n ? { part, label: listed.label, min: input.min, max: input.max }\n : undefined\n const open = !!form\n const edit = (key: 'label' | 'min' | 'max') => (e: Event) => {\n const target = e.target as HTMLInputElement\n const base = form ?? { part, label: '', min: 0, max: 0 }\n this.publishing = { ...base, [key]: key === 'label' ? target.value : target.valueAsNumber }\n }\n const steps = (): FigureProposalStep[] => {\n const f = form!\n const id = from ?? `${part}.pitch`\n if (listed) return [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }, { kind: 'publish-input', input: id, label: f.label }] as FigureProposalStep[]\n const exists = asset.document.model.inputs.some(i => i.id === id)\n return [\n ...(exists ? [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }] : [{ kind: 'add-design-input', id, unit: 'mm', min: f.min, max: f.max, value: pitch }]),\n ...(from ? [] : [{ kind: 'set-repeat', part, pitch: { from: { of: 'input', input: id } } }]),\n { kind: 'publish-input', input: id, label: f.label }\n ] as FigureProposalStep[]\n }\n const run = (list: FigureProposalStep[]) => {\n try {\n this.session!.applyRecipe(list)\n this.publishing = undefined\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = this.said(error)\n }\n }\n return html`<div public-pitch>\n <label toggle>\n <input\n type=\"checkbox\"\n aria-label=\"figure.label.board-sets\"\n .checked=${open}\n ?disabled=${unavailable}\n @change=${(e: Event) =>\n (e.target as HTMLInputElement).checked\n ? (this.publishing = { part, label: i18next.t('figure.label.repeat-gap'), min: Math.max(1, Math.round(pitch / 2)), max: Math.round(pitch * 2) })\n : listed\n ? run([{ kind: 'unpublish-input', input: from }, { kind: 'set-repeat', part, pitch }] as FigureProposalStep[])\n : (this.publishing = undefined)}\n />\n ${i18next.t('figure.label.board-sets')}\n </label>\n ${open\n ? html`<div inline-field><label>${i18next.t('figure.label.board-name')}</label><input aria-label=\"figure.label.board-name\" .value=${form!.label} @change=${edit('label')} /></div>\n <div inline-field><label>${i18next.t('figure.label.least')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.least\" .value=${String(form!.min)} @change=${edit('min')} /></div>\n <div inline-field><label>${i18next.t('figure.label.most')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.most\" .value=${String(form!.max)} @change=${edit('max')} /></div>\n <button act publish-pitch ?disabled=${unavailable || !form!.label.trim()} @click=${() => run(steps())}>\n <md-icon>${listed ? 'check' : 'ios_share'}</md-icon>${i18next.t(listed ? 'figure.button.apply' : 'figure.button.publish-input')}\n </button>`\n : nothing}\n </div>`\n }\n /**\n * A pitch always goes through `set-repeat`: the command moves the longest length with it (at most `limit` copies),\n * which a plain input edit would not. Refused only when the authored length would already hold more copies than\n * that -- said with the numbers.\n */\n private setPitch(field: { id: string; value: number }, event: Event) {\n const input = event.target as HTMLInputElement\n const pitch = input.valueAsNumber\n if (!Number.isFinite(pitch) || pitch === field.value) return\n /* Read from a design input the board may set: the input's value changes, the row keeps reading it (ADR-0096). */\n const from = this.pitchInputOf(JSON.parse(this.session!.source()) as FigureAsset, this.selected)\n if (from) {\n this.run(() => this.session!.apply([{ kind: 'set-design', input: from, unit: 'mm', value: pitch }]))\n input.value = String(this.session!.read().fields.find(i => i.id === from)?.value ?? field.value)\n return\n }\n try {\n this.session!.command({ kind: 'set-repeat', part: this.selected, pitch })\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = String(field.value)\n const code = (error as { code?: string })?.code\n const message = error instanceof Error ? error.message : String(error)\n const found = /\\((\\d[\\d.]*) mm\\) a pitch under ([\\d.]+) mm makes more than (\\d+)/.exec(message)\n this.error =\n code === 'INPUT_RANGE' && found\n ? i18next.t('figure.text.repeat-pitch-too-small', { length: Number(found[1]).toLocaleString(), min: found[2], limit: found[3] })\n : this.said(error)\n }\n }\n /** Choose a part, from the list, the canvas or a place row. A figure-level tab gives way to the part's properties. */\n /*\n Saving and releasing told apart, beside the save (ADR-0097 §5.6, Q-D2): what the saved figure is -- a draft never\n released, a draft while boards use an earlier release, a release -- as the server said it. Edits not saved are the\n status before it. Boards read a draft's latest release (figureBlueprint), so that is what is said.\n */\n private releaseWords(view: { id?: string | null }): string {\n if (!view.id || !this.releaseState?.state) return ''\n const { state, version } = this.releaseState\n if (state === 'released') return i18next.t('figure.text.release-state-released', { version: String(version) })\n return version > 0 ? i18next.t('figure.text.release-state-draft-over', { version: String(version) }) : i18next.t('figure.text.release-state-draft-new')\n }\n /** To the release that exists: the history tab's release section, not a second one here. */\n private goRelease = async () => {\n this.tab = 'history'\n await this.updateComplete\n await this.querySelector<HTMLElement & { showRelease?: () => Promise<void> }>('figure-history-panel')?.showRelease?.()\n }\n /** The fastening form's command, seen before it is done; null clears what was shown. */\n private previewCommand(candidate: { action: FigureAuthoringAction; face?: { part: string; face: string } } | null) {\n if (!candidate || !this.session || !this.selected) {\n this.preview = undefined\n return\n }\n const view = this.session.read()\n const held = { context: view.context!, revision: view.revision!, key: JSON.stringify(candidate), part: this.selected }\n try {\n const seen = this.session.previewCommand(candidate.action)\n let face: FigureFaceArea | undefined\n if (candidate.face) {\n try {\n face = figurePartFaceOf(parseFigureAsset(this.session.source()), candidate.face.part, candidate.face.face, this.currentInputs())\n } catch {\n face = undefined\n }\n }\n /* A row is read on the figure the command would make, by figure-model, as drawn. */\n const row = candidate.action.kind === 'make-repeat' ? figureRowOf(seen.asset, this.selected, this.currentInputs()) : undefined\n this.preview = {\n ...held,\n context: seen.context,\n revision: seen.revision,\n geometry: seen.geometry,\n moves: seen.moves,\n added: seen.added,\n ...(row ? { row } : {}),\n clipsWouldGo: seen.clipsWouldGo,\n face,\n faceUnknown: !!candidate.face && !face\n }\n } catch (error) {\n /* Refused: nothing of an earlier result stays on screen, and the reason is said. */\n this.preview = { ...held, refused: this.said(error) }\n }\n }\n /** The preview, while it still speaks of what is on screen: this figure, this version, this part. */\n private currentPreview(): (HeldPreview & { part: string }) | undefined {\n const p = this.preview\n const view = this.session?.read()\n /* Only where its form is: the properties panel stays in the page on another tab, and did not clear it (2026-09-27, :3391). */\n if (!p || !view || p.context !== view.context || p.revision !== view.revision || p.part !== this.selected || this.middle !== 'edit' || this.tab !== 'properties') return undefined\n return p\n }\n /*\n What taking the selected part off would do, worked out on a copy before the button is pressed (ADR-0097 §5.5): whether\n it stays where it stands now, what stays fastened to it, which clips would go. \"It stays where it is\" is said only\n when the copy shows it does.\n */\n private detachSaid?: { key: string; words: string[] }\n private detachWords(asset: FigureAsset | undefined): string[] {\n const view = this.session?.read()\n const joint = asset?.joints?.find(j => j.body1.part === this.selected)\n if (!asset || !view || !joint || !this.session) return []\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.detachSaid?.key === key) return this.detachSaid.words\n const say = (k: string, params?: Record<string, string>) => i18next.t(k, params)\n let words: string[]\n try {\n const seen = this.session.previewCommand({ kind: 'detach', part: this.selected })\n const own = seen.moves.some(m => m.body === this.selected)\n words = own\n ? [say('figure.text.detach-moves'), ...previewWordsOf({ context: seen.context, revision: seen.revision, key, moves: seen.moves }, this.selected, say)]\n : /* It stays where it is: as expected, so nothing is said (user 2026-10-01). */ []\n const children = (asset.joints ?? []).filter(j => 'part' in j.body0 && j.body0.part === this.selected).map(j => partLabelOf(j.body1.part))\n if (children.length) words.push(say('figure.text.detach-keeps-children', { parts: children.join(', ') }))\n if (seen.clipsWouldGo.length) words.push(say('figure.text.detach-clips', { clips: seen.clipsWouldGo.map(c => c.clip).join(', ') }))\n } catch (error) {\n words = [say('figure.text.detach-refused', { reason: this.said(error) })]\n }\n this.detachSaid = { key, words }\n return words\n }\n /*\n Past the edge of the face a part is fastened to (ADR-0097 §5.5, Q3): the selected part's own, and the parts fastened\n to it -- said apart from the room, nothing moved. Read once per figure, version and part.\n */\n private overhangSaid?: { key: string; words: string[]; note: string[] }\n /** Wider than its face: a fact of the relation, said in its details, not as a warning (designer 2026-09-27). */\n private overhangNote(asset: FigureAsset | undefined): string[] {\n this.overhangWords(asset)\n return this.overhangSaid?.note ?? []\n }\n private overhangWords(asset: FigureAsset | undefined): string[] {\n const view = this.session?.read()\n if (!asset || !view || !this.selected) return []\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.overhangSaid?.key === key) return this.overhangSaid.words\n const say = (k: string, params?: Record<string, string>) => i18next.t(k, params)\n const where = (o: FigureFaceOverhang) => ({ on: partLabelOf(o.on.part), face: say(`figure.label.face-${o.on.face}`) })\n const sides = (o: FigureFaceOverhang) => o.sides.map(s => say(`figure.text.overhang-side-${s.side}`, { axis: s.axis.toUpperCase(), mm: String(s.mm) })).join(', ')\n const words: string[] = []\n const note: string[] = []\n try {\n const inputs = this.currentInputs()\n const own = figureFaceOverhangOf(asset, this.selected, inputs)\n if (own?.state === 'larger') {\n note.push(say('figure.text.overhang-larger', { ...where(own), sides: sides(own) }))\n if (own.lopsided.length) note.push(say('figure.text.overhang-lopsided', { axes: own.lopsided.map(a => a.toUpperCase()).join(', ') }))\n }\n if (own?.state === 'out') words.push(say('figure.text.overhang-out', { ...where(own), sides: sides(own) }))\n else if (own?.state === 'possible') words.push(say('figure.text.overhang-possible', where(own)))\n else if (own?.state === 'unknown') words.push(say('figure.text.overhang-unknown', where(own)))\n const held = (asset.joints ?? []).filter(j => 'part' in j.body0 && j.body0.part === this.selected).map(j => figureFaceOverhangOf(asset, j.body1.part, inputs))\n const past = held.filter((o): o is FigureFaceOverhang => o?.state === 'out' || o?.state === 'possible')\n if (past.length) words.push(say('figure.text.overhang-held', { parts: past.map(o => partLabelOf(o.part)).join(', ') }))\n } catch {\n /* Not read: nothing said rather than a guess. */\n }\n this.overhangSaid = { key, words, note }\n return words\n }\n /** The selected part's motion at both ends of its range, made once per figure, version and part. */\n private motionEndsSaid?: { key: string; ends: MotionEnds | null }\n private motionEnds(): MotionEnds | null {\n const view = this.session?.read()\n if (!view || !this.selected) return null\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.motionEndsSaid?.key !== key) {\n let ends: MotionEnds | null = null\n try {\n ends = motionEndsOf(parseFigureAsset(this.session!.source()), this.selected, this.currentInputs())\n } catch {\n ends = null\n }\n this.motionEndsSaid = { key, ends }\n }\n return this.motionEndsSaid.ends\n }\n /** \"Fasten it first\", from the motion tab: to the properties tab, the fastening form open on this part. */\n private async goFasten() {\n this.tab = 'properties'\n await this.updateComplete\n const links = [...this.renderRoot.querySelectorAll<HTMLElement & { section?: string; showFastening?: () => Promise<void> }>('figure-links')].find(l => l.section === 'shape')\n await links?.showFastening?.()\n }\n /** What the canvas draws of it, made once per preview: a new list every render would stand the board up each time. */\n private previewShown(): { ghost: FigureRenderPart[]; highlight: FigureRenderPart | null } {\n const p = this.currentPreview()\n /* On the motion tab, with nothing being tried: where the selected part's motion takes it, at both ends. */\n if (!p && this.tab === 'motion' && this.middle === 'edit') return { ghost: this.motionEnds()?.ghost ?? [], highlight: null }\n if (!p || p.refused) return { ghost: [], highlight: null }\n if (this.previewDrawn?.of !== p) this.previewDrawn = { of: p, ghost: ghostPartsOf(p), highlight: faceHighlightOf(p.face) }\n return this.previewDrawn\n }\n /**\n * What the author has in view, for the AI dock to hear with a request (ADR-0097 §5.6 item 5): the part selected and\n * what the preview is trying. Read at the moment of sending, never cached, and never a reason to start a new\n * conversation -- selecting is not a new subject.\n */\n assistantFocus(): { part?: string; trying?: { clips?: Record<string, number>; controls?: Record<string, number> } } {\n const trying = this.middle === 'preview' ? this.renderRoot.querySelector<HTMLElement & { tried?: () => { clips?: Record<string, number>; controls?: Record<string, number> } | undefined }>('figure-preview')?.tried?.() : undefined\n return { ...(this.selected ? { part: this.selected } : {}), ...(trying ? { trying } : {}) }\n }\n private choose(id: string) {\n /* A copy on the canvas selects its repeat: the part the author made. */\n this.selected = id ? ownerOf(id) : id\n this.faceMapping = undefined\n if (id && (this.tab === 'verdict' || this.tab === 'view' || this.tab === 'history')) this.tab = 'properties'\n }\n private asset(): unknown {\n try {\n return JSON.parse(this.session!.source())\n } catch {\n return undefined\n }\n }\n /** A side tab says what it is in words under its icon: the icons alone had to be learnt (designer 2026-09-27, U05). */\n private renderTab(tab: SideTab, icon: string, label: string, badge?: number) {\n /* Its accessible name is the name it shows (designer 2026-09-27); the longer title stays as its tooltip. */\n const name = i18next.t('figure.label.tab-short-' + tab)\n return html`<button tab ?on=${this.tab === tab} title=${label} aria-label=${name} @click=${() => (this.tab = tab)}>\n <md-icon>${icon}</md-icon><span tab-label aria-hidden=\"true\">${name}</span>${badge == null ? '' : html`<span badge>${badge.toLocaleString()}</span>`}\n </button>`\n }\n updated(changed: PropertyValues<this>) {\n super.updated?.(changed)\n this.tell(changed)\n if (this.restorePanelFor !== undefined) {\n const key = this.restorePanelFor\n this.restorePanelFor = undefined\n requestAnimationFrame(async () => {\n const panel = this.propertiesPanel()\n if (!panel || (this.selected || '@model') !== key) return\n await Promise.all([...panel.querySelectorAll<HTMLElement & { updateComplete?: Promise<unknown> }>('figure-links')].map(el => el.updateComplete))\n const kept = this.panelMemory.get(key)\n if (kept) this.foldsOf(panel).forEach((fold, i) => i < kept.open.length && (fold.open = kept.open[i]!))\n panel.scrollTop = kept?.top ?? 0\n })\n }\n const panes = this.renderRoot.querySelector<OxThreePane>('ox-three-pane') ?? undefined\n if (panes !== this.panes) {\n this.panes = panes\n this.fitPanesTo(this.getBoundingClientRect().width)\n }\n }\n /**\n * A new figure's first question, on the canvas where the work will be (designer 2026-09-27, U04): a basic shape\n * or an AI draft when the page offers one. Recipes require a host part and are reached from the parts panel after\n * that part exists. Nothing is added until one is chosen; the type, the space, the\n * mounting face and the tags are not asked for first.\n */\n /** The section editor over the canvas, the figure behind it drawing what the working points make. */\n private renderSectionEditor(geometry: readonly { id: string }[]) {\n const part = geometry.find(g => ownerOf(g.id) === this.selected) as { id: string; shape: FigureEvaluatedShape } | undefined\n /* A door frame's section is its own width, height, jamb and head: its fields edit it, not an outline. */\n const drawn = part?.shape && drawnOf(part.shape)\n if (!part || !drawn || part.shape.dimensions.jamb !== undefined) return nothing\n const asset = this.asset() as FigureAsset\n const measures = figureSectionMeasuresOf(asset, this.selected)\n const kept = figureScaleAnchorOf(asset, this.selected)?.[drawn.axis]\n return html`<figure-section-editor\n .body=${{ ...part, id: this.selected }}\n .measures=${measures}\n .kept=${kept}\n .pointBlocked=${this.pointBlockedOf(drawn)}\n .revision=${this.session?.read().revision ?? 0}\n .faceMapping=${this.faceMapping?.from === 'section-editor' ? this.faceMapping.need : undefined}\n @command=${(e: CustomEvent) => {\n /* Held for a choice of where things go: the editor stays open, the choice shown in it. */\n if (!this.linkCommand(e.detail.action, 'section-editor')) e.detail.held = true\n }}\n @command-live=${(e: CustomEvent) => this.holdAction(e.detail.action)}\n @face-mapped=${(e: CustomEvent) => this.mapFaces(e.detail.remap)}\n @face-mapping-cancel=${() => (this.faceMapping = undefined)}\n @section-editor-close=${() => this.closeSectionEditor()}\n ></figure-section-editor>`\n }\n /**\n * Why a drawn push's end cannot be drawn to one point now: the kernel's own refusal of that command on a copy (what is\n * fastened to the end face), said as the face. Asked once per figure revision and part.\n */\n private pointBlocked?: { key: string; words: string }\n private pointBlockedOf(drawn: NonNullable<ReturnType<typeof drawnOf>>): string {\n if (drawn.apex || drawn.section.kind !== 'polygon' || !this.session) return ''\n const key = `${this.session.read().revision}|${this.selected}`\n if (this.pointBlocked?.key === key) return this.pointBlocked.words\n let words = ''\n try {\n this.session.previewCommand({ kind: 'set-section', part: this.selected!, apex: apexOver(drawn.section.points, drawn.axis) })\n } catch (error) {\n if ((error as { code?: string }).code === 'FEATURE_MAPPING_REQUIRED')\n words = i18next.t('figure.text.section-editor-apex-blocked', { face: i18next.t('figure.label.face-' + END_FACE(drawn.axis, 'end')) })\n }\n this.pointBlocked = { key, words }\n return words\n }\n private renderStart() {\n const shapes: FigurePaletteKind[] = ['box', 'cylinder', 'plate']\n /* Where it is authored from, chosen before any part (ADR-0097): the figure's own setting, no room made up for it. */\n const placement = ((this.asset() as FigureAsset | undefined)?.placement ?? 'floor') as FigurePlacement\n return html`<div start role=\"region\" aria-label=${i18next.t('figure.text.start-question')}>\n <h2>${i18next.t('figure.text.start-question')}</h2>\n <div start-paths>\n <section>\n <h3>${i18next.t('figure.label.start-placement')}</h3>\n <div start-shapes role=\"radiogroup\" aria-label=${i18next.t('figure.label.start-placement')}>\n ${(['floor', 'ceiling', 'wall', 'center'] as const).map(\n one => html`<button start-button role=\"radio\" aria-checked=${String(one === placement)} ?pressed=${one === placement}\n @click=${() => one !== placement && this.linkCommand({ kind: 'set-placement', placement: one })}>\n ${i18next.t(`figure.label.resize-place-${one}`)}\n </button>`\n )}\n </div>\n <small>${i18next.t('figure.text.placement-is-intent')}</small>\n </section>\n <section>\n <h3>${i18next.t('figure.label.start-shape')}</h3>\n <div start-shapes>\n ${shapes.map(\n kind => html`<button start-button start-shape=${kind} @click=${() => this.add(kind)}>\n ${i18next.t(kind === 'box' ? 'figure.label.primitive-cube' : `figure.label.primitive-${kind}`)}\n </button>`\n )}\n </div>\n <small>${i18next.t('figure.text.start-shape-more')}</small>\n </section>\n ${this.aiDraft\n ? html`<section>\n <h3>${i18next.t('figure.label.start-ai')}</h3>\n <button start-button start-ai @click=${() => this.dispatchEvent(new CustomEvent('ask-ai-draft', { bubbles: true, composed: true }))}>\n ${i18next.t('figure.button.start-ai')}\n </button>\n <small>${i18next.t('figure.text.start-ai-optional')}</small>\n </section>`\n : nothing}\n </div>\n </div>`\n }\n /**\n * The part the panel speaks of, held at its top: its kind, and what its size follows when it follows something. No path above it (user 2026-10-01): the parts list and the canvas already show which part is chosen, and the\n * list's root is the way back to the model's settings.\n */\n private renderSubject() {\n let summary: { kind: string; size: string } | undefined\n try {\n summary = this.selected\n ? partSummaryOf(parseFigureAsset(this.session!.source()), ownerOf(this.selected), (key, params) => i18next.t(key, params), i18next.language || 'ko')\n : undefined\n } catch {\n summary = undefined\n }\n if (!summary) return nothing\n return html`<div subject>\n <div subject-summary>\n ${summary.kind ? html`<b>${summary.kind}</b>` : nothing}\n ${summary.size ? html`<small>${summary.size}</small>` : nothing}\n </div>\n </div>`\n }\n /**\n * The model's settings, from the parts list's root (B.1). It shows them on\n * the properties tab whatever tab was open; it changes no data, no camera, no history and no AI conversation.\n */\n private showModelSettings() {\n this.selected = ''\n this.tab = 'properties'\n }\n render() {\n const view = this.session?.read()\n if (!view) return html`<p>${i18next.t('figure.text.opening-model')}</p>`\n const unavailable = view.loading || !!view.error || view.saving || !view.context\n const part = view.geometry.find(g => ownerOf(g.id) === this.selected)\n /* The controls (state inputs) have their own place in the motion tab; these are the design values. */\n const design = view.fields.filter(i => i.role !== 'state')\n /* A repeat's own row values (its pitch) have their own section, not the shape's. */\n const own = design.filter(i => this.selected && i.id.startsWith(this.selected + '.') && !i.id.startsWith(this.selected + '.repeat.'))\n const common = design.filter(i => !view.geometry.some(g => i.id.startsWith(ownerOf(g.id) + '.')))\n /*\n A part's field only the declared room still reads -- its old height position once the floor holds it -- moves\n nothing; it is shown apart as what it is, not as a position (ADR-0097, designer 2026-09-27).\n */\n let roomOnly: string[] = []\n try {\n roomOnly = this.selected ? figureRoomOnlyInputsOf(parseFigureAsset(this.session!.source()), this.selected) : []\n } catch {\n roomOnly = []\n }\n const partFields = own.filter(i => !roomOnly.includes(i.id))\n /* The numbers a rule gives the axes that have no field of their own -- shown read-only, never as a blank. */\n let held: HeldValues | undefined\n try {\n const body = view.geometry.find(g => g.id === this.selected) as unknown as FigureRenderPart | undefined\n const placed = body ? placementOf(body) : undefined\n const parsed = this.selected ? parseFigureAsset(this.session!.source()) : undefined\n if (placed && parsed)\n held = {\n position: placed.position,\n rotation: placed.rotation,\n size: (['x', 'y', 'z'] as const).map(axis => measureNow(parsed, ownerOf(this.selected), axis)),\n /* Only a size a rule sets: a palette part's own numbers are its shape's fields, not a rule's (found in the browser). */\n sizeRuled: (['x', 'y', 'z'] as const).every(axis => followOf(parsed, ownerOf(this.selected), axis).of !== 'own')\n }\n } catch {\n held = undefined\n }\n const roomFields = own.filter(i => roomOnly.includes(i.id))\n const status = view.loading\n ? 'figure.text.loading-figure'\n : view.saving\n ? 'figure.text.saving-figure'\n : view.dirty || !view.id\n ? 'figure.text.unsaved-changes'\n : 'figure.text.saved'\n const asset = this.asset()\n const tab = this.tab\n return html`<ox-canvas-bar\n history\n fit\n undo-shortcut=\"Ctrl+Z\"\n redo-shortcut=\"Ctrl+Y\"\n ?can-undo=${!unavailable && view.canUndo}\n ?can-redo=${!unavailable && view.canRedo}\n .pane=${this.panes}\n @canvas-undo=${() => this.run(() => this.session!.undo())}\n @canvas-redo=${() => this.run(() => this.session!.redo())}\n @canvas-fit=${() => this.renderRoot.querySelector<FigureCanvas>('figure-canvas')?.fit()}\n >\n ${this.renderGizmoTools(!unavailable && this.middle === 'edit')}\n ${(['edit', 'preview'] as const).map(\n mode => html`<button slot=\"mode\" mode aria-pressed=${String(this.middle === mode)} title=${i18next.t('figure.text.mode-' + mode + '-explained')} @click=${() => (this.middle = mode)}>\n ${i18next.t('figure.label.mode-' + mode)}\n </button>`\n )}\n <span slot=\"status\" class=\"status\" role=\"status\" ?dirty=${status === 'figure.text.unsaved-changes'}>${i18next.t(status)}</span>\n <span slot=\"status\" release-state>${this.releaseWords(view)}</span>\n <button slot=\"commit\" publish ?disabled=${!view.id} title=${view.id ? '' : i18next.t('figure.text.save-the-figure-before-releasing')} @click=${this.goRelease}>${i18next.t('figure.button.release')}</button>\n <button slot=\"commit\" save ?disabled=${unavailable || (!view.dirty && !!view.id)} @click=${this.save}>${i18next.t('figure.button.save')}</button>\n </ox-canvas-bar>\n ${this.catalogOpen\n ? html`<figure-recipe-catalog\n .templates=${this.templates}\n .selected=${this.selected}\n .error=${this.recipeError}\n .guideOf=${this.guideOf}\n .thumbnailOf=${this.thumbnailOf}\n ?locked=${unavailable}\n @insert-recipe=${(e: CustomEvent) => this.insertRecipe(e.detail.recipe, e.detail.values)}\n @close-catalog=${() => (this.catalogOpen = false)}\n ></figure-recipe-catalog>`\n : null}\n <ox-three-pane>\n <figure-parts\n slot=\"start\"\n .budget=${this.budget}\n @show-maturity=${() => (this.tab = 'verdict')}\n .parts=${this.partRows(view.geometry, asset as FigureAsset | undefined)}\n .partBudget=${this.partBudgetOf(asset as FigureAsset | undefined)}\n @set-detail-level=${(e: CustomEvent) => this.linkCommand({ kind: 'set-detail-level', level: e.detail.level })}\n .selected=${this.selected}\n .modelName=${view.name ?? ''}\n @show-model-settings=${() => this.showModelSettings()}\n ?locked=${unavailable}\n @add-part=${(e: CustomEvent) => this.add(e.detail.kind)}\n .recipeCount=${this.templates.length}\n @open-recipe-catalog=${() => ((this.catalogOpen = true), (this.recipeError = ''))}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @toggle-part-hidden=${(e: CustomEvent) => this.toggleHiddenPart(e.detail.id)}\n @set-all-parts-hidden=${(e: CustomEvent) =>\n (this.hiddenParts = e.detail.hidden ? new Set(view.geometry.map(g => ownerOf(g.id))) : new Set())}\n @move-part-up=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @move-part-down=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @duplicate-part=${(e: CustomEvent) => this.duplicatePart(e.detail.id)}\n @remove-part=${(e: CustomEvent) => this.removePart(e.detail.id)}\n ></figure-parts>\n ${this.middle === 'preview'\n ? html`<figure-preview\n .asset=${asset}\n .context=${view.context ?? ''}\n .view=${this.view}\n .selected=${this.selected}\n @configure-size=${async (e: CustomEvent<{ part: string }>) => {\n this.middle = 'edit'\n this.selected = e.detail.part\n this.tab = 'properties'\n await this.updateComplete\n this.renderRoot.querySelector('figure-links')?.scrollIntoView({ block: 'nearest' })\n }}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-preview>`\n : html`<div middle>\n ${view.geometry.length === 0 && !unavailable ? this.renderStart() : nothing}\n ${this.sectionEditing && this.sectionEditing === this.selected && !unavailable ? this.renderSectionEditor(view.geometry) : nothing}\n <figure-canvas\n .view=${this.view}\n .parts=${this.drawnParts(view.geometry, asset)}\n .anchors=${this.anchorsOf(asset as FigureAsset | undefined)}\n .fan=${this.fanOf(asset as FigureAsset | undefined)}\n .ghost=${this.previewShown().ghost}\n .highlight=${this.previewShown().highlight}\n .palette=${view.palette ?? {}}\n .context=${view.context ?? ''}\n .selected=${this.selected}\n .reach=${unavailable ? { translate: false, rotate: false, scale: false } : this.reachOf(this.selected)}\n @part-transformed=${(e: CustomEvent) => this.transformed(e.detail.id, e.detail.result)}\n @part-selected=${(e: CustomEvent<string>) => this.choose(e.detail)}\n @render-error=${(e: CustomEvent<Error>) => {\n this.error = e.detail.message\n }}\n ></figure-canvas></div>`}\n <aside slot=\"end\">\n <div tabs>\n ${this.renderTab('properties', 'tune', i18next.t('figure.label.properties'))}\n ${this.renderTab('capability', 'conveyor_belt', i18next.t('figure.label.tab-capability'))}\n ${this.renderTab('motion', 'animation', i18next.t('figure.label.motion'))}\n ${this.renderTab('verdict', 'insights', i18next.t('figure.label.maturity'), this.instances)}\n ${this.renderTab('view', 'wb_sunny', i18next.t('figure.label.tab-environment'))}\n ${this.renderTab('history', 'history', i18next.t('figure.label.history'))}\n </div>\n <slot name=\"notice\"></slot>\n <div panel ?off=${tab !== 'properties'}>\n ${this.selected && part\n ? html`${this.renderSubject()}\n <section>\n <h3>${i18next.t('figure.label.group-part')}</h3>\n <div inline-field>\n <label>${i18next.t('figure.label.name')}</label>\n <input\n name-field\n aria-label=${i18next.t('figure.label.name')}\n .value=${partLabelOf(this.selected)}\n ?disabled=${unavailable || !!repeatOf(this.selected, view.geometry)?.index}\n @change=${(e: Event) => this.renamePart(e.target as HTMLInputElement)}\n />\n </div>\n ${this.renderRepeatNote(view.geometry)}\n </section>\n ${this.renderRepeat(asset as FigureAsset | undefined, view.geometry, unavailable)}\n ${this.renderGroups(this.withSizeRow(groupFields(partFields, this.selected), held), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable), held)}\n ${roomFields.length ? this.renderRoomOnly(roomFields, unavailable) : nothing}\n ${this.renderLinks(unavailable, 'shape')}\n <figure-section-panel\n .body=${{ ...part, id: this.selected }}\n ?locked=${unavailable}\n .faceMapping=${this.faceMapping?.from === 'panel' ? this.faceMapping.need : undefined}\n @face-mapped=${(e: CustomEvent) => this.mapFaces(e.detail.remap)}\n @face-mapping-cancel=${() => (this.faceMapping = undefined)}\n @command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n @command-live=${(e: CustomEvent) => this.holdAction(e.detail.action)}\n @section-editor-open=${() => (this.sectionEditing = this.selected)}\n ></figure-section-panel>\n <figure-material-panel\n .body=${{ ...part, id: this.selected }}\n .palette=${view.palette ?? {}}\n ?locked=${unavailable}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n @part-live=${(e: CustomEvent) => this.hold({}, e.detail.edit)}\n ></figure-material-panel>`\n : view.geometry.length === 0\n ? html`${this.renderSubject()}<section empty-figure>\n <p>${i18next.t('figure.text.empty-figure-next')}</p>\n <details>\n <summary>${i18next.t('figure.label.figure-info-later')}</summary>\n <slot name=\"figure\"></slot>\n </details>\n </section>`\n : html`${this.renderSubject()}<slot name=\"figure\"></slot>\n ${this.renderGroups(groupFields(common), 'figure.label.group-figure-size', 'figure.label.design-inputs', unavailable)}\n ${this.renderInstanceRange(asset as FigureAsset | undefined, unavailable)}`}\n </div>\n <div panel ?off=${tab !== 'capability'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'places') : null}\n <figure-capability-panel\n .asset=${asset}\n .selected=${this.selected}\n ?locked=${unavailable}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-capability-panel>\n </div>\n <div panel ?off=${tab !== 'motion'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'motion') : html`<section><p hint>${i18next.t('figure.text.choose-a-part-to-move')}</p></section>`}\n ${this.renderControls(view, unavailable)}\n </div>\n <div panel flush ?off=${tab !== 'verdict'}><slot name=\"verdict\"></slot></div>\n <div panel flush ?off=${tab !== 'view'}>\n <figure-settings .view=${this.view} @update-view=${(e: CustomEvent) => this.setView(e.detail.view)}></figure-settings>\n </div>\n <div panel flush ?off=${tab !== 'history'}><slot name=\"history\"></slot></div>\n </aside>\n </ox-three-pane>`\n }\n /** Position, rotation and size as rows of three cells; the shape's own measures one to a line, under their title. */\n private renderGroups(\n groups: { vectors: FieldGroup[]; singles: FieldGroup[] },\n vectorTitle: string,\n singleTitle: string,\n unavailable: boolean,\n tools: unknown = null,\n held?: HeldValues\n ) {\n return html`${groups.vectors.length || tools\n ? html`<section>\n <h3>${i18next.t(vectorTitle)}</h3>\n ${groups.vectors.map(g => this.renderVector(g, unavailable, held))}\n ${this.renderHeldAxes(groups.vectors)}\n ${tools ?? nothing}\n </section>`\n : nothing}\n ${groups.singles.length\n ? html`<section>\n <h3>${i18next.t(singleTitle)}</h3>\n <div form>${groups.singles.map(g => (g.kind === 'single' ? this.renderSingle(g.name, g.field, unavailable) : nothing))}</div>\n </section>`\n : nothing}`\n }\n /**\n * A box-like part's size row stands when a rule sets every side -- each following the figure's size -- with the\n * numbers the rule gives, as its position and turn rows do (designer 2026-09-27: not a blank, not gone).\n */\n private withSizeRow(groups: ReturnType<typeof groupFields>, held?: HeldValues) {\n if (groups.vectors.some(v => v.kind === 'vector' && v.name === 'size')) return groups\n if (!held?.sizeRuled || !held.size || held.size.length !== 3 || held.size.some(v => v === undefined)) return groups\n const at = groups.vectors.findIndex(v => v.kind === 'vector' && v.name === 'rotation')\n const vectors = [...groups.vectors]\n vectors.splice(at < 0 ? vectors.length : at + 1, 0, { kind: 'vector', name: 'size', cells: {} })\n return { ...groups, vectors }\n }\n private renderVector(group: FieldGroup, unavailable: boolean, held?: HeldValues) {\n if (group.kind !== 'vector') return nothing\n const unit = group.name === 'rotation' ? '°' : 'mm'\n const ruled = (['x', 'y', 'z'] as const).filter(axis => !group.cells[axis])\n const given = (axis: 'x' | 'y' | 'z') => {\n const v = held?.[group.name]?.[['x', 'y', 'z'].indexOf(axis)]\n return v === undefined || !Number.isFinite(v) ? '—' : String(Math.round(v * 10) / 10)\n }\n return html`<div vector-row>\n <label>${i18next.t('figure.label.group-' + group.name)}${group.name === 'rotation' ? '' : html` <span unit>${unit}</span>`}</label>\n <div triple>\n ${(['x', 'y', 'z'] as const).map(\n axis => !group.cells[axis]\n ? html`<div cell held title=${i18next.t('figure.text.axis-held-by-rule')}>\n <span axis>${axis.toUpperCase()}</span>\n <input type=\"text\" readonly .value=${given(axis)} aria-label=${`${group.name}.${axis} · ${i18next.t('figure.text.axis-held-by-rule')}`} />\n </div>`\n : html`<div cell>\n <span axis ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(group.cells[axis] as never, e, unavailable)}>${axis.toUpperCase()}</span>\n <input\n aria-label=${group.cells[axis]!.id}\n type=\"number\"\n step=\"any\"\n .value=${String(group.cells[axis]!.value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(group.cells[axis] as never, e)}\n @change=${(e: Event) => this.changeField(group.cells[axis] as never, e)}\n />\n </div>`\n )}\n </div>\n </div>\n`\n }\n /**\n * Why a row's numbers cannot be typed, said once under the rows by what decides them (user 2026-10-01: \"set by a\n * rule\" named nothing): a fastened part's place and turn are its fastening's; other numbers are worked out from\n * something else. A size that follows something is said at the panel's head, so not again here.\n */\n private renderHeldAxes(vectors: FieldGroup[]) {\n const fastened = !!(this.asset() as FigureAsset | undefined)?.joints?.some(j => j.body1.part === ownerOf(this.selected))\n const held = vectors.filter(g => g.kind === 'vector' && g.name !== 'size' && (['x', 'y', 'z'] as const).some(axis => !g.cells[axis]))\n if (!held.length) return nothing\n const placed = held.every(g => g.name === 'position' || g.name === 'rotation')\n if (fastened && placed) return html`<p hint held-axes>${i18next.t('figure.text.held-by-fastening')}</p>`\n return html`<p hint held-axes>${i18next.t('figure.text.held-worked-out', { group: held.map(g => i18next.t('figure.label.group-' + g.name)).join(' · ') })}</p>`\n }\n /**\n * A part's fields only the declared room still reads (ADR-0097, designer 2026-09-27): shown as what they are and not\n * typed into -- they move nothing. Declaring the room again is offered; nothing is deleted or widened on the way.\n */\n private renderRoomOnly(fields: FieldLike[], unavailable: boolean) {\n return html`<section room-only>\n <h3>${i18next.t('figure.label.room-only-inputs')}</h3>\n <p hint>${i18next.t('figure.text.room-only-inputs')}</p>\n <div form>\n ${fields.map(\n f => html`<span>${fieldWordsOf(f.id, key => i18next.t(key))} (${f.unit})</span><input aria-label=${f.id} type=\"number\" .value=${String(f.value)} disabled />`\n )}\n </div>\n <button act room-refit ?disabled=${unavailable} @click=${() => this.askRoomRefit()}><md-icon>fit_screen</md-icon>${i18next.t('figure.button.room-refit')}</button>\n </section>`\n }\n /** The room as declared and as proposed, and what lies outside each as measured, before the author confirms. */\n private async askRoomRefit() {\n let refit\n try {\n refit = figureRoomRefitOf(parseFigureAsset(this.session!.source()))\n } catch (error) {\n this.error = this.said(error)\n return\n }\n if (!refit) return\n const rows = roomRefitRowsOf(refit)\n const outside = (list: typeof refit.outside.declared) =>\n list.length\n ? list.map(o => i18next.t('figure.text.room-part-outside', { part: partLabelOf(o.part), axis: o.axis.toUpperCase(), mm: String(o.mm) })).join(' · ')\n : i18next.t('figure.text.room-nothing-outside')\n const agreed = await OxPrompt.open({\n type: 'question',\n title: i18next.t('figure.label.room-refit'),\n template: html`<table room-refit>\n <tr><th></th><th>${i18next.t('figure.label.room-declared')}</th><th>${i18next.t('figure.label.room-proposed')}</th></tr>\n ${rows.map(\n r => html`<tr>\n <td>${i18next.t(`figure.label.room-at-${r.at}`)} ${r.axis.toUpperCase()}</td>\n <td>${r.declared}</td>\n <td>${r.same ? i18next.t('figure.text.room-same') : r.proposed}</td>\n </tr>`\n )}\n </table>\n <p>${i18next.t('figure.label.room-declared')}: ${outside(refit.outside.declared)}</p>\n <p>${i18next.t('figure.label.room-proposed')}: ${outside(refit.outside.proposed)}</p>\n ${refit.drops.length\n ? html`<p>${i18next.t('figure.text.room-drops', { fields: [...new Set(refit.drops.map(id => `${partLabelOf(id.split('.')[0]!)} ${fieldWordsOf(id, key => i18next.t(key))}`))].join(' · ') })}</p>`\n : nothing}`,\n confirmButton: { text: i18next.t('figure.button.room-refit-confirm') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (agreed) this.linkCommand(refit.step)\n }\n private renderSingle(name: string, field: FieldLike, unavailable: boolean) {\n const words = name.split('.').map(part => i18next.t('figure.label.field-' + part, { defaultValue: part }))\n return html`<span ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(field as never, e, unavailable)}>${words.join(' · ')} (${field.unit})</span\n ><input\n aria-label=${field.id}\n type=\"number\"\n step=\"any\"\n .value=${String(field.value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(field as never, e)}\n @change=${(e: Event) => this.changeField(field as never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AAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAmB;AAEd;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;4CAA0B;AAKzB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CAA6D;AAC3E;IAAhB,KAAK,EAAE;;8CAAsB;AACb;IAAhB,KAAK,EAAE;;2CAAmB;AAMV;IAAhB,KAAK,EAAE;;iDAAuH;AAE9G;IAAhB,KAAK,EAAE;;2CAAoF;AAC3E;IAAhB,KAAK,EAAE;;yCAAoC;AAE3B;IAAhB,KAAK,EAAE;;2CAA4B;AAEnB;IAAhB,KAAK,EAAE;;4CAA4C;AAEnC;IAAhB,KAAK,EAAE;;+CAAqD;AAE5C;IAAhB,KAAK,EAAE;;4CAAoB;AAKX;IAAhB,KAAK,EAAE;;0CAAuD;AAsBlC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;6CAAgB;AAC3B;IAAhB,KAAK,EAAE;;iDAAwC;AAE/B;IAAhB,KAAK,EAAE;;0CAAwC;AAE/B;IAAhB,KAAK,EAAE;;oDAA6C;AAKpC;IAAhB,KAAK,EAAE;;6CAAiD;AAxX9C,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAurExB","sourcesContent":["import { LitElement, html, css, nothing, type PropertyValues } from 'lit'\nimport { i18next } from '@operato/i18n'\nimport type { OxThreePane } from '@operato/layout'\nimport '@operato/layout'\nimport { notify } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { live } from 'lit/directives/live.js'\nimport { PART_LIMIT, parseFigureRecipe, resolveFigureRecipe, figurePartCountOf, figureRecipeIdFor, parseFigureAsset, figureSizeEditChanges, figureScaleAnchorOf, figureSectionMeasuresOf, figurePlaneAlignChanges, type FigurePlaneContact, type FigureClipLoss, figurePartFaceOf, type FigureFaceArea, figureRowOf, type FigureRowReading, figureFaceOverhangOf, type FigureFaceOverhang, figureRoomOnlyInputsOf, figureRoomRefitOf } from '@hatiolab/figure-model'\nimport type { RecipeTemplate } from './recipes.js'\nimport './figure-recipe-catalog.js'\nimport type { FigureAsset, FigureAuthoringAction, FigureEvaluatedShape, FigureInputChange, FigurePartEdit, FigurePrimitiveCreation, FigureProposalStep, FigureRecipe, FigureRecipeValue, FigurePlacement, FigureFaceMappingNeed, FigureFaceRemap } from '@hatiolab/figure-model'\nimport type { FigureProductSession } from './product-session.js'\nimport { captureFigureThumbnail } from './thumbnail.js'\nimport { drawableFigureParts } from './renderer.js'\nimport './canvas.js'\nimport './figure-parts.js'\nimport './figure-material-panel.js'\nimport './figure-section-panel.js'\nimport './figure-section-editor.js'\nimport { faceHighlightOf, ghostPartsOf, previewWordsOf, rowWordsOf, type HeldPreview } from './command-preview.js'\nimport { motionEndsOf, type MotionEnds } from './motion-ends.js'\nimport './figure-links.js'\nimport './figure-controls.js'\nimport './figure-clips.js'\nimport './figure-preview.js'\nimport './figure-settings.js'\nimport { DEFAULT_VIEW, type ViewSettings } from './figure-view.js'\nimport './figure-capability-panel.js'\nimport { gizmoChanges, gizmoReachOf, type GizmoReach, type GizmoResult } from './gizmo.js'\nimport { keyActionOf } from './keys.js'\nimport { groupFields, ownerOf, partLabelOf, repeatOf, type FieldLike, type FieldGroup } from './fields.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { alignChanges, boxOf, canMirror, mirrorChanges, type AlignTool } from './align.js'\nimport type { FigurePaletteKind, FigurePartRow } from './figure-parts.js'\nimport { paletteRecipe } from './palette.js'\nimport { apexOver, drawnOf } from './section-drawing.js'\nimport { END_FACE } from './section-controls.js'\nimport type { FigureCanvas } from './canvas.js'\nimport { nudgeOf, placementOf, type ScaleAnchor } from './stage-model.js'\n\n/** The numbers a rule gives a part's position, turn and size, per axis, for the cells that have no field. */\ntype HeldValues = { position?: number[]; rotation?: number[]; size?: (number | undefined)[]; sizeRuled?: boolean }\nimport { roomRefitRowsOf } from './occupancy.js'\nimport { editRefusalOf, inDeclaredRoom, inputRangeRefusalOf, narrowingRetryOf, partRefusalOf, placementRefusalOf, recipeRefusalOf, removalNoticeOf, sizeRangeRefusalOf } from './refusals.js'\nimport type { FigureRenderPart } from './renderer.js'\nimport type { FigureBudgetLine } from './maturity.js'\nimport { endPlaceKeyOf, fieldWordsOf, followOf, measureNow, partSummaryOf, instanceRangeOf, instanceRangeToDeclare, proportionToFollow, rangeDiffers, rangeWith, turnsAboutAJoint, valueNow } from './links.js'\nimport { jointFanOf } from './joint-fan.js'\nimport { jointDragOf } from './joint-drag.js'\nimport type { FirstSave } from './first-save.js'\nimport { isLive, livePartsOf, liveOverSession, NOTHING_LIVE, scrubbed, scrubStep, type LiveValues } from './live.js'\nimport { startingShapeKindOfBody } from './starting-shape.js'\n\n\n/**\n * The side's tabs: properties, what it does (places), motion, the verdict, the view, the release history. A figure-level tab (verdict, history) gives way to properties when a part is chosen; a tab about\n * parts keeps showing the newly chosen part.\n */\ntype SideTab = 'properties' | 'capability' | 'motion' | 'verdict' | 'view' | 'history'\n\n/** Whether the narrow fold was said in this browser before; true from now on. Storage refused: said, as before. */\nfunction foldSaid(): boolean {\n try {\n if (localStorage.getItem('figure-fold-said')) return true\n localStorage.setItem('figure-fold-said', '1')\n } catch {\n /* No storage here: said every time, as it was. */\n }\n return false\n}\n\n/** Product editor surface. The injected session is shared by page persistence and AI commands. */\n@customElement('figure-editor')\nexport class FigureEditor extends LitElement {\n /* The operato scrollbar, as every scrolling panel of the app has it -- the side panel scrolled with the browser's own. */\n static styles = [ScrollbarStyles, SidePanelStyles, css`\n :host {\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n /* The editor folds by the width it is given, not the window's (UX ruling, 2026-09-24). */\n container-type: inline-size;\n font: 13px sans-serif;\n color: var(--md-sys-color-on-surface);\n }\n /* The bar over the work is ox-canvas-bar (ADR-0060 decision 8): the folds at its edges, undo, redo and\n fit in the suite's places. What the editor puts in it - the mode switch, the status, save - is styled here. */\n ox-canvas-bar button[mode] {\n height: 28px;\n padding: 0 10px;\n border-radius: 999em;\n border-color: transparent;\n background: none;\n }\n ox-canvas-bar button[mode][aria-pressed='true'] {\n border-color: var(--md-sys-color-primary);\n }\n /* The gizmo's tools, drawn as the bar's own icon buttons (undo, redo, fit). */\n ox-canvas-bar .gizmo-tools {\n display: inline-flex;\n gap: 2px;\n padding-left: 4px;\n border-left: 1px solid var(--md-sys-color-outline-variant);\n }\n ox-canvas-bar button[tool] {\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: var(--md-sys-shape-corner-small, 8px);\n background: transparent;\n color: var(--md-sys-color-on-surface-variant);\n cursor: pointer;\n }\n ox-canvas-bar button[tool]:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container-high);\n color: var(--md-sys-color-on-surface);\n }\n ox-canvas-bar button[tool][aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n ox-canvas-bar button[tool]:disabled {\n opacity: 0.38;\n cursor: default;\n }\n /*\n Slotted into the bar from here, the tools do not get the bar's own icon size (20px, set inside its shadow): they\n showed at md-icon's 24px, heavier than undo, redo and fit beside them. The same size, and the bar's focus ring.\n */\n ox-canvas-bar button[tool] md-icon {\n --md-icon-size: 20px;\n }\n ox-canvas-bar button[tool]:focus-visible {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 1px;\n }\n figure-preview {\n min-width: 0;\n min-height: 0;\n }\n ox-canvas-bar .status {\n padding: 0 8px;\n color: var(--md-sys-color-on-surface-variant);\n }\n ox-canvas-bar .status[dirty] {\n color: var(--md-sys-color-primary);\n font-weight: 600;\n }\n ox-canvas-bar button[save] {\n height: 32px;\n padding: 0 14px;\n border: none;\n border-radius: 999em;\n color: var(--md-sys-color-on-primary);\n background: var(--md-sys-color-primary);\n }\n /* The three panes are ox-three-pane's (ADR-0060 decision 8): widths 200 | 1fr | 340, 160 | 300 under\n 860px and one column with the middle first under 560px are the frame's, as are the dividers. */\n ox-three-pane {\n flex: 1;\n min-height: 0;\n }\n figure-parts {\n min-height: 0;\n }\n figure-canvas {\n flex: 1;\n min-width: 0;\n min-height: 0;\n }\n div[middle] {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 0;\n }\n /* A new figure's first question, over the empty canvas. */\n div[start] {\n position: absolute;\n inset: 50% auto auto 50%;\n z-index: 10;\n color: var(--md-sys-color-on-surface);\n transform: translate(-50%, -50%);\n width: min(440px, calc(100% - 32px));\n box-sizing: border-box;\n padding: 20px;\n border-radius: 12px;\n background: var(--md-sys-color-surface, #fff);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);\n }\n div[start] button[start-button] {\n width: auto;\n margin: 0;\n font-size: var(--ui-t-body);\n height: 36px;\n padding: 0 16px;\n border: 1px solid var(--md-sys-color-outline);\n border-radius: 999em;\n color: var(--md-sys-color-primary);\n background: var(--md-sys-color-surface, #fff);\n cursor: pointer;\n }\n div[start] button[start-button]:hover:not(:disabled) {\n background: var(--md-sys-color-primary-container);\n }\n div[start] button[start-button][pressed] {\n color: var(--md-sys-color-on-primary);\n background: var(--md-sys-color-primary);\n border-color: var(--md-sys-color-primary);\n }\n div[start] button[start-button]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n div[start] h2 {\n margin: 0 0 12px;\n font-size: var(--ui-t-title);\n }\n div[start-paths] {\n display: grid;\n gap: 14px;\n }\n div[start-paths] h3 {\n margin: 0 0 6px;\n font-size: var(--ui-t-body);\n }\n div[start-shapes] {\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n }\n div[start] small {\n display: block;\n margin-top: 4px;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The side: tabs over one panel at a time, each using the whole height. */\n aside {\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: var(--md-sys-color-surface-container-lowest);\n }\n div[tabs] {\n display: flex;\n flex: none;\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n button[tab] {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 1px;\n min-width: 0;\n height: 48px;\n padding: 0;\n border: none;\n border-radius: 0;\n border-bottom: 2px solid transparent;\n background: none;\n color: var(--md-sys-color-on-surface-variant);\n }\n button[tab]:hover:not([on]) {\n background: var(--md-sys-color-surface-container);\n }\n button[tab][on] {\n color: var(--md-sys-color-primary);\n border-bottom-color: var(--md-sys-color-primary);\n }\n button[tab] md-icon {\n font-size: 20px;\n width: 20px;\n height: 20px;\n }\n button[tab] span[tab-label] {\n max-width: 100%;\n overflow: hidden;\n font-size: 0.66rem;\n line-height: 1.2;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n span[badge] {\n position: absolute;\n top: 3px;\n right: 2px;\n padding: 0 5px;\n font-size: 0.62rem;\n font-weight: 700;\n line-height: 1.5;\n color: var(--md-sys-color-on-primary-container);\n background: var(--md-sys-color-primary-container);\n border-radius: 999em;\n pointer-events: none;\n }\n /* The sections inside carry the margins (side-panel-styles); the panel only scrolls. */\n div[panel] {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 0;\n }\n div[panel][flush] {\n padding: 0;\n }\n /* Hidden, not removed: a panel keeps what it holds (the verdict its last answer) while another tab is open. */\n [off] {\n display: none !important;\n }\n /* Which part the panel speaks of. */\n div[subject] {\n position: sticky;\n top: 0;\n z-index: 1;\n display: grid;\n gap: 4px;\n padding: 10px 12px;\n background: var(--md-sys-color-surface-container-lowest);\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n /* The panel's three sizes (side-panel-styles): the part's kind at the title's, its two lines at the hint's. */\n div[subject-summary] {\n display: grid;\n gap: 2px;\n }\n div[subject-summary] b {\n font-size: var(--ui-t-body, 13px);\n font-weight: 600;\n }\n div[subject-summary] b span {\n font-weight: 400;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[subject-summary] small {\n color: var(--md-sys-color-on-surface-variant);\n }\n button {\n font: inherit;\n box-sizing: border-box;\n height: 32px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n background: var(--md-sys-color-surface);\n color: inherit;\n padding: 0 8px;\n min-width: 0;\n }\n button {\n cursor: pointer;\n }\n button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n button[aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n border-color: var(--md-sys-color-primary);\n }\n .hint {\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.5;\n }\n `]\n @property({ attribute: false }) session?: FigureProductSession\n /** The saved figure's state and version, as the server gave them (the page reads the row). */\n @property({ attribute: false }) releaseState?: { state?: 'draft' | 'released'; version: number }\n /** The recipe templates (ADR-0095), read by the page from the server. */\n @property({ attribute: false }) templates: RecipeTemplate[] = []\n /** Reads a template's guide; given by the page. */\n @property({ attribute: false }) guideOf?: (name: string) => Promise<string>\n @property({ attribute: false }) thumbnailOf?: (name: string) => string\n /** The 「보드에서 바꿀 수 있음」 form being filled for a row, before it is published (ADR-0096). */\n @state() private publishing?: { part: string; label: string; min: number; max: number }\n @state() private catalogOpen = false\n /** Why the last recipe was refused, in the kernel's words. */\n @state() private recipeError = ''\n @property({ type: Number }) revision = 0\n /** The verdict's count, drawn on its tab so it stays in sight while another tab is open. */\n @property({ type: Number }) instances?: number\n /** The cost line the parts list shows, from the maturity report. */\n @property({ attribute: false }) budget?: FigureBudgetLine\n /**\n * Asks the type and name of a figure saved for the first time (the host has the catalogue's names); undefined\n * when the author cancels, and then nothing is saved. Without it a new figure is saved under a temporary type.\n */\n @property({ attribute: false }) firstSave?: (name: string) => Promise<FirstSave | undefined>\n @state() private selected = ''\n @state() private error = ''\n /*\n * An edit that takes a face away which something stands on (ADR-0100 A8): held, with what the kernel says stands\n * there, until the author chooses where each goes -- then the same edit goes again with the remap. Shown where the\n * edit was made (`from`).\n */\n @state() private faceMapping?: { action: FigureAuthoringAction; need: FigureFaceMappingNeed; from: 'section-editor' | 'panel' }\n /** The same link offered again with the size range narrowed, after a link the declared range could not hold. */\n @state() private retry?: { label: string; action?: FigureAuthoringAction; run?: () => void }\n @state() private tab: SideTab = 'properties'\n /** The frame the bar folds - found after the first render, since the bar is drawn before it. */\n @state() private panes?: OxThreePane\n /** What the middle shows: the parts being edited, or the figure placed on a board at eight sizes. */\n @state() private middle: 'edit' | 'preview' = 'edit'\n /** The gizmo shown on the selected part, as the tools in the bar and W · E · R choose it; none once the part changes. */\n @state() private gizmoMode?: 'translate' | 'rotate' | 'scale'\n /** A line saying what a command did besides what was asked; gone at the next command. */\n @state() private notice = ''\n /**\n * How the workbench shows the figure, in the board's own state names. The viewer's, kept in\n * their browser, never in the figure.\n */\n @state() private view: ViewSettings = FigureEditor.storedView()\n private static storedView(): ViewSettings {\n try {\n const stored = JSON.parse(localStorage.getItem('figure-view') ?? 'null')\n return stored && typeof stored === 'object' ? { ...DEFAULT_VIEW, ...stored } : { ...DEFAULT_VIEW }\n } catch {\n return { ...DEFAULT_VIEW }\n }\n }\n private setView(view: ViewSettings) {\n this.view = { ...DEFAULT_VIEW, ...view }\n try {\n localStorage.setItem('figure-view', JSON.stringify(this.view))\n } catch {\n /* A browser that keeps nothing still shows the change for this visit. */\n }\n }\n /**\n * Parts hidden on the workbench — the author's view while working, not the asset's visibility. Not saved: a part\n * hidden here is still in the figure, still checked, still drawn on a board.\n */\n /** The page offers an AI draft for a new figure (the modeller page, through the app's assistant dock). */\n @property({ type: Boolean }) aiDraft = false\n @state() private hiddenParts = new Set<string>()\n /** A value in hand -- typed, held on a spinner, scrubbed, dragged -- drawn at once and recorded on release. */\n @state() private live: LiveValues = NOTHING_LIVE\n /** The part whose drawn section is open in the section editor (ADR-0100 §3.2), or null. */\n @state() private sectionEditing: string | null = null\n /**\n * A command seen before it is done (ADR-0097 §5.5): worked out on a copy for the figure, version, part and command it\n * names, and shown only while all four are still the ones on screen. Nothing of it is saved or undone.\n */\n @state() private preview?: HeldPreview & { part: string }\n private previewDrawn?: { of: HeldPreview; ghost: FigureRenderPart[]; highlight: FigureRenderPart | null }\n private lastContext: string | null = null\n /**\n * Move, turn and size on the canvas, in the bar's tools: the gizmo the W · E · R keys give, found without knowing the\n * keys (2026-09-26 -- a person dragging the part turned the camera). Each is offered only where the part's own\n * numbers can take it (`gizmoReachOf`).\n */\n private renderGizmoTools(editing: boolean) {\n const reach = editing && this.selected ? this.reachOf(this.selected) : undefined\n const tools = [\n { mode: 'translate', icon: 'open_with', key: 'W', can: !!reach?.translate },\n { mode: 'rotate', icon: '3d_rotation', key: 'E', can: !!reach?.rotate },\n { mode: 'scale', icon: 'open_in_full', key: 'R', can: !!reach?.scale }\n ] as const\n return html`<span class=\"gizmo-tools\" role=\"group\" aria-label=${i18next.t('figure.label.gizmo-tools')}>\n ${tools.map(\n tool => html`<button\n tool\n aria-pressed=${String(this.gizmoMode === tool.mode)}\n ?disabled=${!tool.can}\n aria-label=${i18next.t('figure.button.gizmo-' + tool.mode)}\n title=${`${i18next.t('figure.button.gizmo-' + tool.mode)} (${tool.key})${tool.can || !this.selected ? '' : ' · ' + i18next.t(tool.mode === 'scale' && this.sizeDragUnsure(this.asset() as FigureAsset, this.selected) ? 'figure.text.gizmo-size-turned-fastening' : 'figure.text.gizmo-not-own', { part: partLabelOf(this.selected), extreme: this.keptExtremeWord() })}`}\n @click=${() => this.useGizmo(tool.mode)}\n >\n <md-icon>${tool.icon}</md-icon>\n </button>`\n )}\n </span>`\n }\n /** The modeller's keys (`keys.ts`): undo, redo, duplicate, remove, back to the whole figure, the gizmo's modes. */\n private onKey = (e: KeyboardEvent) => {\n const view = this.session?.read()\n if (!view || view.loading || view.saving || !view.context || !this.isConnected) return\n /*\n * The section editor open takes the keys for its own: Esc cancels it, Delete deletes a point, Ctrl+Z undoes a point.\n * Heard here first, they deselected the part, deleted the part and undid the figure's last step (2026-09-30).\n */\n if (this.sectionEditing) return\n const canvas = this.renderRoot.querySelector<FigureCanvas>('figure-canvas')\n const path = e.composedPath()\n const action = keyActionOf(\n { key: e.key, ctrlKey: e.ctrlKey, metaKey: e.metaKey, shiftKey: e.shiftKey, altKey: e.altKey, target: path[0] as HTMLElement, inScene: !!canvas && path.includes(canvas) },\n this.selected\n )\n if (!action) return\n e.preventDefault()\n /*\n The session's history is the only one. With the canvas focused the scene took Ctrl+Z as well, undoing on its own\n board the last value the canvas had written -- which the canvas then told as a drag: an undo of a drag on a\n part placed by a rule wrote the drag again (2026-09-25). Heard first (capture) and kept from the scene.\n */\n e.stopPropagation()\n if (action === 'translate' || action === 'rotate' || action === 'scale') canvas && this.useGizmo(action)\n else if (action === 'undo') view.canUndo && this.run(() => this.session!.undo())\n else if (action === 'redo') view.canRedo && this.run(() => this.session!.redo())\n else if (action === 'duplicate') this.duplicatePart(this.selected)\n else if (action === 'remove') this.removePart(this.selected)\n else this.selected = ''\n }\n connectedCallback() {\n super.connectedCallback()\n window.addEventListener('keydown', this.onKey, true)\n this.widthWatch.observe(this)\n }\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKey, true)\n this.widthWatch.disconnect()\n super.disconnectedCallback()\n }\n /*\n Narrow, the parts list gives way to the canvas rather than all three shrinking (designer 2026-09-27, U11): under\n FOLD_START_UNDER px the canvas would be left under about 560 px beside both sides. The fold is said once, and the\n bar's own toggle opens it again; opened by the author, it is not folded again until the screen has been wide.\n Said once in this browser, not on every opening (2026-10-02): the list folds as before, the notice does not come back.\n */\n private static readonly FOLD_START_UNDER = 1100\n private foldedForWidth = false\n private keptOpenByAuthor = false\n private widthWatch = new ResizeObserver(([entry]) => this.fitPanesTo(entry!.contentRect.width))\n private fitPanesTo(width: number) {\n const panes = this.panes\n if (!panes || !width) return\n if (this.foldedForWidth && !panes.foldStart) this.keptOpenByAuthor = true\n if (width < FigureEditor.FOLD_START_UNDER) {\n if (!panes.foldStart && !this.keptOpenByAuthor) {\n panes.foldStart = true\n this.foldedForWidth = true\n if (!foldSaid()) notify({ level: 'info', message: i18next.t('figure.text.parts-panel-folded-narrow') })\n }\n } else {\n if (this.foldedForWidth && panes.foldStart) panes.foldStart = false\n this.foldedForWidth = false\n this.keptOpenByAuthor = false\n }\n }\n /**\n * Refusals and notices go to the app's shared surfaces, as every screen's do (user, 2026-09-27: 「왜 모두가 사용하는\n * notification 오류 표현 방법을 사용하지 않고」 · 「혹은 oxprompt 에서 확인하고 진행하던지」). A refusal with a way on --\n * delete and fit the space again, narrow the range -- asks in the app's prompt and goes on when confirmed; any\n * other refusal is the app's notification, which stays until it is closed.\n */\n private toldViewError = ''\n private tell(changed: PropertyValues) {\n if (changed.has('error') && this.error) {\n const retry = this.retry\n if (retry) this.ask(this.error, retry)\n else notify({ level: 'error', message: this.error })\n }\n if (changed.has('notice') && this.notice) notify({ level: 'info', message: this.notice })\n const viewError = this.session?.read()?.error ?? ''\n if (viewError && viewError !== this.toldViewError) notify({ level: 'error', message: viewError })\n this.toldViewError = viewError\n }\n /*\n An edit that would stop clips is refused by figure-model with the clips named (CLIPS_DROPPED). The person is told\n which, and why, before anything is written; agreed, the same edit is made again letting exactly those go, as one\n step undo brings back (designer 2026-09-27).\n */\n private askClipLoss(error: unknown, again: () => void): boolean {\n if ((error as { code?: string })?.code !== 'CLIPS_DROPPED') return false\n const clips = (error as { clips: FigureClipLoss[] }).clips\n /* The consent is for this edit, on this figure as it is now: held with it while the person reads. */\n const session = this.session!\n const { context, revision } = session.read()\n void this.confirmClipLoss(clips, again, { session, context: context!, revision: revision! })\n return true\n }\n private async confirmClipLoss(clips: FigureClipLoss[], again: () => void, asked: { session: FigureProductSession; context: string; revision: number }) {\n const agreed = await OxPrompt.open({\n type: 'warning',\n text: i18next.t('figure.text.clips-would-go', { clips: clips.map(c => i18next.t(`figure.text.clip-${c.why}`, { clip: c.clip })).join(', ') }),\n confirmButton: { text: i18next.t('figure.button.let-clips-go') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (!agreed) return\n /* Changed while the person read -- another figure, or an edit in between: the consent was not for this; nothing is applied. */\n const now = this.session === asked.session ? asked.session.read() : undefined\n if (!now || now.context !== asked.context || now.revision !== asked.revision) {\n this.error = i18next.t('figure.text.clips-consent-stale')\n return\n }\n asked.session.withConsent({ dropClips: clips.map(c => c.id), context: asked.context, revision: asked.revision }, again)\n }\n private async ask(message: string, retry: { label: string; action?: FigureAuthoringAction; run?: () => void }) {\n const agreed = await OxPrompt.open({\n type: 'question',\n text: message,\n confirmButton: { text: retry.label },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (!agreed) return\n if (retry.run) retry.run()\n else this.linkCommand(retry.action!)\n }\n /*\n Per model and per part, how far its properties panel was scrolled and which of its folds were open, so going back\n to one finds it as it was left (designer 2026-09-27, B.1). The path stays held at the top, so a scroll kept cannot\n hide which part the panel speaks of. Another model starts clean.\n */\n private panelMemory = new Map<string, { top: number; open: boolean[] }>()\n private restorePanelFor?: string\n private propertiesPanel() {\n return this.renderRoot.querySelector<HTMLElement>('div[panel]')\n }\n private foldsOf(panel: HTMLElement): HTMLDetailsElement[] {\n const folds = [...panel.querySelectorAll('details')]\n for (const inner of panel.querySelectorAll('figure-links')) folds.push(...(inner.shadowRoot?.querySelectorAll('details') ?? []))\n return folds\n }\n protected willUpdate(_changed: PropertyValues) {\n const view = this.session?.read()\n if (view?.context !== this.lastContext) {\n this.lastContext = view?.context ?? null\n this.selected = ''\n this.error = ''\n this.hiddenParts = new Set()\n this.panelMemory.clear()\n } else if (_changed.has('selected')) {\n const panel = this.propertiesPanel()\n const was = (_changed.get('selected') as string | undefined) ?? ''\n if (panel) this.panelMemory.set(was || '@model', { top: panel.scrollTop, open: this.foldsOf(panel).map(d => d.open) })\n this.restorePanelFor = this.selected || '@model'\n }\n if (view && !view.geometry.some(g => ownerOf(g.id) === this.selected)) this.selected = ''\n if (_changed.has('selected')) this.gizmoMode = undefined\n /*\n * The section editor is of one part: when the selection moves off it by any way -- another part picked, the scene's\n * own Esc, the part removed, another figure opened -- it closes and lets go of the preview it held.\n */\n if (this.sectionEditing && this.sectionEditing !== this.selected) this.leaveSectionEditor(this.selected)\n }\n /**\n * The selection moved off the part being edited. With nothing changed there the editor closes; with changes, the part\n * stays selected while the editor asks (apply, let go, keep editing), and the move goes on only once it closed. A part\n * gone or another figure opened has nothing to go back to: the editor closes.\n */\n private leaveSectionEditor(next: string) {\n const editing = this.sectionEditing!\n const editor = this.renderRoot.querySelector('figure-section-editor') as (HTMLElement & { dirty: boolean; requestClose(): Promise<boolean> }) | null\n const view = this.session?.read()\n const stillThere = !!view?.geometry.some(g => ownerOf(g.id) === editing)\n if (!editor?.dirty || !stillThere) {\n this.closeSectionEditor()\n return\n }\n this.selected = editing\n editor.requestClose().then(closed => {\n if (closed && this.selected === editing) this.selected = next\n })\n }\n /** The scene toggles: the mode already shown takes the gizmo away. */\n private useGizmo(mode: 'translate' | 'rotate' | 'scale') {\n if (mode === 'scale' && this.selected && this.gizmoMode !== 'scale') {\n const asset = this.asset() as FigureAsset | undefined\n if (asset && this.sizeDragUnsure(asset, this.selected)) {\n this.error = i18next.t('figure.text.gizmo-size-turned-fastening', { part: partLabelOf(this.selected), extreme: this.keptExtremeWord() })\n return\n }\n }\n this.renderRoot.querySelector<FigureCanvas>('figure-canvas')?.gizmo(mode)\n this.gizmoMode = this.gizmoMode === mode ? undefined : mode\n }\n /**\n * A refusal no particular sentence knows: figure-model's code said as a refusal, never its English; any other error\n * (the network, the server) as it came.\n */\n private said(error: unknown): string {\n return (error as { code?: string })?.code ? editRefusalOf(error, (key, params) => i18next.t(key, params)) : error instanceof Error ? error.message : String(error)\n }\n private run(action: () => unknown) {\n try {\n action()\n this.error = ''\n /* The next step stands on its own: what the last removal let go of is no longer the news. */\n this.notice = ''\n this.changed()\n } catch (error) {\n if (this.askClipLoss(error, () => this.run(action))) return\n const say = (key: string, params: Record<string, string>) => i18next.t(key, params)\n this.error = sizeRangeRefusalOf(error, say) ?? inputRangeRefusalOf(error, say) ?? this.said(error)\n } finally {\n /* Committed or refused, the value in hand is gone: the figure as it stands is drawn again. */\n this.live = NOTHING_LIVE\n }\n }\n /** What the canvas draws: the figure with the value in hand when there is one, and without the parts hidden on the workbench. */\n private drawnParts(geometry: Parameters<typeof drawableFigureParts>[0] | undefined, asset: unknown) {\n const parts = (asset ? liveOverSession(asset as FigureAsset, this.currentInputs(), this.live) : null) ?? drawableFigureParts(geometry ?? [])\n return parts.filter(body => !this.hiddenParts.has(ownerOf((body as { id: string }).id)))\n }\n /**\n * Where the selected part turns and how far, with the pose as it is drawn now -- a value in hand included, so the\n * fan follows the arm while a control is dragged. Its size comes from what the joint turns (`joint-fan`).\n */\n private fanOf(asset: FigureAsset | undefined) {\n if (!asset || !this.selected || this.hiddenParts.has(this.selected)) return null\n try {\n return jointFanOf(asset, this.selected, { ...this.currentInputs(), ...this.live.values })\n } catch {\n return null\n }\n }\n /**\n * Every input as the session holds it now -- the pose the author has set with the controls, and design values. The\n * asset's source carries only the saved defaults, so drawing a value in hand over it put every other joint back to its\n * saved angle while one slider moved, and the arm jumped when released (user, 2026-09-24).\n */\n private currentInputs(): Record<string, number> {\n const view = this.session?.read()\n return view ? Object.fromEntries(view.fields.map(field => [field.id, field.value as number])) : {}\n }\n /** A value in hand: an input's value (design or pose) or a part edit. Nothing is recorded. */\n private hold(values: Record<string, number>, edit?: FigurePartEdit) {\n this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) }\n }\n private closeSectionEditor() {\n this.sectionEditing = null\n this.holdAction(null)\n }\n /** A command in hand, drawn and not run; `null` lets go of it and the figure as it stands is drawn again. */\n private holdAction(action: FigureAuthoringAction | null) {\n const { action: _, ...rest } = this.live\n this.live = action ? { ...rest, action } : rest\n }\n\n private changed() {\n this.requestUpdate()\n this.dispatchEvent(new CustomEvent('changed', { bubbles: true, composed: true }))\n }\n private async save() {\n if (!this.session) return\n try {\n /*\n The card's picture is taken before the save starts, from a canvas of its own at the card's size —\n not from the one on screen, which stands wherever the author left it turned. A picture that cannot\n be taken is not an error: the save goes on without it (see `thumbnail.ts`).\n */\n let type: string | undefined\n if (!this.session.read().id && this.firstSave) {\n const answer = await this.firstSave(this.session.read().name ?? '')\n if (!answer) return\n /* The name is the figure's own, in the asset: one step of the history, like typing it in the properties. */\n if (answer.name !== this.session.read().name) {\n this.session.command({ kind: 'rename', name: answer.name })\n this.changed()\n }\n type = answer.type\n }\n const view = this.session.read()\n const thumbnail = await captureFigureThumbnail(drawableFigureParts(view.geometry ?? []), view.palette ?? {})\n const promise = this.session.save({ thumbnail, type })\n this.changed()\n await promise\n this.error = ''\n } catch (error) {\n /* Not reached: whether it was written is not known, and the edits are still here -- said so, not \"not saved\". */\n this.error = (error as { code?: string })?.code === 'SAVE_UNREACHABLE' ? i18next.t('figure.text.save-unreachable') : this.said(error)\n } finally {\n this.changed()\n }\n }\n private add(kind: FigurePaletteKind) {\n if (!this.session) return\n this.run(() => {\n const ids = new Set(this.session!.read().geometry.map(g => g.id))\n let n = 1\n while (ids.has(`${kind}-${n}`)) n++\n const part = paletteRecipe(kind, `${kind}-${n}`)\n this.session!.add(part)\n this.selected = part.id\n })\n }\n /**\n * The list's own operations, as part edits — each one step of the session's history. The copy and the moved\n * part stay selected.\n */\n private duplicatePart(id: string) {\n this.run(() => {\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n this.selected = this.session!.read().geometry.find(g => !before.has(g.id))?.id ?? id\n })\n }\n private movePart(id: string, to: number) {\n this.run(() => this.session!.edit({ kind: 'move-part', target: id, to }))\n }\n private removePart(id: string, refitRoom = false) {\n this.retry = undefined\n try {\n const view = this.session!.edit({ kind: 'remove-part', target: id, ...(refitRoom ? { refitRoom: true } : {}) }) as { removal?: Parameters<typeof removalNoticeOf>[0] }\n this.error = ''\n /* What else the removal let go of, named (chief architect, 2026-09-27); undo brings it back. */\n this.notice = removalNoticeOf(view.removal, (key, params) => i18next.t(key, params)) ?? ''\n if (this.selected === id) this.selected = ''\n this.changed()\n } catch (error) {\n if (this.askClipLoss(error, () => this.removePart(id, refitRoom))) return\n /*\n A part in the declared space goes, and the space is fitted to the parts left, in the same click: every space\n this product declares is fitted to the parts (「부품에 맞추기」, the AI's fit-room -- no padding), so fitting it\n again keeps what it says, and there is nothing to ask (user, 2026-09-27: 「이 확인이 꼭 필요한가 ?」).\n */\n if (!refitRoom && inDeclaredRoom(error)) {\n this.removePart(id, true)\n if (!this.error) this.notice = [this.notice, i18next.t('figure.text.removal-space-refitted')].filter(Boolean).join(' ')\n return\n }\n this.error = partRefusalOf(error, id, (key, params) => i18next.t(key, params)) ?? this.said(error)\n }\n }\n private toggleHiddenPart(id: string) {\n const next = new Set(this.hiddenParts)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n this.hiddenParts = next\n }\n /** Whether the figure declares its size (the three size inputs). */\n private hasSize(): boolean {\n const values = this.designValues()\n return ['x', 'y', 'z'].every(axis => typeof values[`size.${axis}`] === 'number')\n }\n /**\n * A recipe put in (ADR-0095): resolved on the figure as it stands -- its parts take the next free name, onto the part\n * chosen -- and applied as one step. Refused, the kernel's sentence goes to the form as it is (condition 3).\n */\n private insertRecipe(recipe: FigureRecipe, values: Record<string, FigureRecipeValue>) {\n try {\n const asset = JSON.parse(this.session!.source()) as FigureAsset\n const checked = parseFigureRecipe(recipe)\n const id = figureRecipeIdFor(asset, checked)\n const steps = resolveFigureRecipe(checked, { id, ...(checked.target === 'part' ? { target: this.selected } : {}), values })\n this.session!.applyRecipe(steps)\n this.recipeError = ''\n this.catalogOpen = false\n this.error = ''\n this.changed()\n } catch (error) {\n this.recipeError = recipeRefusalOf(error, (key, params) => i18next.t(key, params)) ?? this.said(error)\n }\n }\n /** The design values of the asset being edited. */\n private designValues(): Record<string, number> {\n try {\n return this.session ? (JSON.parse(this.session.source()).designInputs ?? {}) : {}\n } catch {\n return {}\n }\n }\n /** What the gizmo may write for the selected part — read off the asset being edited. */\n private reachOf(id: string): GizmoReach {\n const none = { translate: false, rotate: false, scale: false }\n /* A repeat is moved and sized through its row, not by a gizmo on one copy. */\n if (!id || !this.session || !this.session.read().geometry.some(g => g.id === id)) return none\n try {\n const asset = JSON.parse(this.session.source())\n const reach = gizmoReachOf(asset, id)\n /*\n A size drag shows the face it keeps and the commit keeps the same (figureScaleAnchorOf). Where figure-model cannot\n say which face that is -- a part fastened turned or twisted -- the drag would show one result and write another,\n so sizing by the gizmo is not offered there; the fields still size it (designer 2026-09-27).\n */\n if (reach.scale && this.sizeDragUnsure(asset, id)) return { ...reach, scale: false }\n return reach\n } catch {\n return none\n }\n }\n /** Whether a size drag on this part could not show what is written: figure-model gives no face it keeps. */\n private sizeDragUnsure(asset: FigureAsset, id: string): boolean {\n try {\n return !figureScaleAnchorOf(asset, ownerOf(id))\n } catch {\n return true\n }\n }\n /** A drag, written back as the part's own inputs — one step of the history, like typing the numbers. */\n private transformed(id: string, result: GizmoResult) {\n const view = this.session!.read()\n /* A part hanging from a joint: the drag edits the joint -- its value, or where it sits (ADR-0093). */\n const asset = JSON.parse(this.session!.source()) as FigureAsset\n const drawn = view.geometry.find(g => g.id === id) as unknown as FigureRenderPart | undefined\n const drag = drawn ? jointDragOf(asset, ownerOf(id), drawn, result, this.currentInputs()) : null\n if (drag) {\n if (drag.kind === 'value') this.run(() => this.session!.apply([{ kind: 'set-state', input: drag.input, unit: drag.unit, value: drag.value }]))\n else if (drag.kind === 'joint') this.run(() => this.session!.command({ kind: 'set-joint', joint: drag.joint }))\n else {\n this.error = i18next.t(`figure.text.gizmo-joint-${drag.reason}`, { joint: drag.joint, leader: drag.leader ?? '', axis: drag.axis ?? '' })\n this.requestUpdate()\n }\n return\n }\n const sizes = Object.fromEntries(view.fields.map(field => [field.id, field.value as number]))\n /*\n A part a joint places, scaled: only its measures change. The shift of its centre that an anchored scale makes is\n the joint's to give -- the face on the joint stays there by itself (user, 2026-09-25: 「'R'모드에서 크기가 변하지 않는다」;\n the shift had been taken for a move of the joint, and the size was dropped).\n */\n const jointed = !!asset.joints?.some(j => j.body1.part === ownerOf(id))\n /* A size drag this part cannot show truly is not written: it springs back, and the reason is said. */\n if (result.scale && result.scale.some(k => Math.abs(k - 1) > 1e-4) && this.sizeDragUnsure(asset, id)) {\n this.error = i18next.t('figure.text.gizmo-size-turned-fastening', { part: partLabelOf(id), extreme: this.keptExtremeWord() })\n return this.requestUpdate()\n }\n /*\n A size dragged keeps the face the figure's placement keeps, as a size typed does (figure-model's one rule): the\n gizmo's own anchoring on the opposite face is what the drag shows, not what is written (designer 2026-09-27).\n */\n const scaled = !!result.scale && !result.rotation && result.scale.some(k => Math.abs(k - 1) > 1e-4)\n const taken = jointed || scaled ? { scale: result.scale } : result\n const written = gizmoChanges(id, this.reachOf(id), taken, sizes)\n const changes = scaled && !jointed ? figureSizeEditChanges(asset, ownerOf(id), written) : written\n if (changes.length) {\n this.run(() => this.session!.apply(changes))\n return\n }\n if (jointed && result.scale) {\n /* Only measures that follow another were pulled: the relation says their size, and it is not broken here. */\n const axes = (['x', 'y', 'z'] as const).filter((_, i) => Math.abs(result.scale![i]! - 1) > 1e-4)\n this.error = i18next.t('figure.text.gizmo-size-follows', { part: partLabelOf(id), axis: axes.join(', ').toUpperCase() })\n return this.requestUpdate()\n }\n /*\n A part whose place is worked out has no numbers for the gizmo to write: the drag is added beside\n its rule (`nudge-part`). A part a joint or a fastening places, or a size that is worked out, is refused -- said in\n words, not by the part silently springing back (user, 2026-09-24: 「기즈모 컨트롤도 전혀 작동이 안되는군」).\n */\n const body = view.geometry.find(g => g.id === id) as unknown as FigureRenderPart | undefined\n if (!body) return this.requestUpdate()\n const { by, turn } = nudgeOf(body, result)\n /* A size worked out from the figure's: the drag's factor beside its rule, so it still follows. */\n const grow: Partial<Record<'x' | 'y' | 'z', number>> = {}\n if (result.scale) (['x', 'y', 'z'] as const).forEach((axis, i) => Math.abs(result.scale![i]! - 1) > 1e-6 && (grow[axis] = Math.round(result.scale![i]! * 1e6) / 1e6))\n if (!Object.keys(by).length && !Object.keys(turn).length && !Object.keys(grow).length) return this.requestUpdate()\n try {\n this.session!.command({\n kind: 'nudge-part',\n part: id,\n ...(Object.keys(by).length ? { by } : {}),\n ...(Object.keys(turn).length ? { turn } : {}),\n ...(Object.keys(grow).length ? { grow } : {})\n })\n this.error = ''\n this.changed()\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n this.error = /carried by a joint/.test(message)\n ? i18next.t('figure.text.gizmo-joint-places', { part: partLabelOf(id) })\n : /is fastened to/.test(message)\n ? i18next.t('figure.text.gizmo-fastening-places', { part: partLabelOf(id) })\n : this.said(error)\n this.requestUpdate()\n }\n }\n /** 맞추기 — one tool, one step of the history, through the same inputs as the gizmo. */\n private align(tool: AlignTool) {\n this.run(() => {\n const asset = JSON.parse(this.session!.source())\n const changes = alignChanges(asset, this.selected, this.reachOf(this.selected), tool)\n if (changes.length) this.session!.apply(changes)\n })\n }\n /** A mirrored copy: duplicate, then place the copy on the other side — two steps. */\n private mirror(axis: 'x' | 'z') {\n this.run(() => {\n const id = this.selected\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n const copy = this.session!.read().geometry.find(g => !before.has(g.id))?.id\n if (!copy) return\n this.session!.apply(mirrorChanges(JSON.parse(this.session!.source()), id, copy, axis))\n this.selected = copy\n })\n }\n /**\n * The one-off \"put it on the plane\", by the figure's placement (designer 2026-09-27): figure-model's rule\n * (`figurePlaneAlignChanges`) -- a floor figure's part to the floor by its bottom, a ceiling one's to the ceiling by\n * its top, a wall one's to the wall by its back, a centred one's centre to the origin's height. Once: nothing is\n * fastened. Refused, it says why.\n */\n /* What a tilted part's typed size keeps, by the figure's placement: not the floor's lowest point everywhere (designer 2026-09-27). */\n private keptExtremeWord(): string {\n const placement = (this.asset() as FigureAsset | undefined)?.placement ?? 'floor'\n return i18next.t(`figure.label.kept-extreme-${placement}`)\n }\n /* How the selected part would meet the plane, kept per source and part: working it out compiles the figure. */\n private planeContact?: { source: string; part: string; contact?: FigurePlaneContact }\n private planeContactOf(source: string, part: string): FigurePlaneContact | undefined {\n if (this.planeContact?.source !== source || this.planeContact.part !== part) {\n let contact: FigurePlaneContact | undefined\n try {\n contact = figurePlaneAlignChanges(parseFigureAsset(source), part).contact\n } catch {\n contact = undefined\n }\n this.planeContact = { source, part, contact }\n }\n return this.planeContact.contact\n }\n private renderPlaneAlign(asset: FigureAsset, unavailable: boolean) {\n const placement = asset.placement ?? 'floor'\n /* A tilted part touches the plane at a point or an edge, a ball at its lowest; the tooltip says so rather than promise a face (designer 2026-09-27). */\n const contact = this.planeContactOf(this.session!.source(), this.selected)\n const told = contact === 'tilted' || contact === 'extreme' ? `-${contact}` : ''\n return html`<button plane-align=${placement} ?disabled=${unavailable} title=${i18next.t(`figure.text.align-to-${placement}${told}`)}\n @click=${() => this.alignToPlane()}>${i18next.t(`figure.button.align-to-${placement}`)}</button>`\n }\n private alignToPlane() {\n const asset = parseFigureAsset(this.session!.source())\n const { changes, contact, refusal } = figurePlaneAlignChanges(asset, this.selected)\n if (refusal) {\n this.error = i18next.t(`figure.text.align-refused-${refusal.toLowerCase().replace(/_/g, '-')}`, { part: partLabelOf(this.selected) })\n return\n }\n if (changes.length) this.run(() => this.session!.apply(changes))\n if ((contact === 'tilted' || contact === 'extreme') && !this.error) this.notice = i18next.t(`figure.text.aligned-${contact}-${asset.placement ?? 'floor'}`)\n }\n private renderTools(unavailable: boolean) {\n const reach = this.reachOf(this.selected)\n if (!this.selected || !reach.translate) return null\n let asset: unknown\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n /*\n * In words, two rows by what they do (user 2026-10-01: 「무엇을 하는 것인지 모르겠다」): moving the part to the figure's\n * centre lines, onto its plane or onto the grid; and making a mirrored copy, which makes a part and moves nothing.\n */\n const tool = (name: AlignTool, label: string, title: string) =>\n html`<button ?disabled=${unavailable} title=${i18next.t(title)} @click=${() => this.align(name)}>${i18next.t(label)}</button>`\n const mirrors = (['x', 'z'] as const).map(axis => ({ axis, able: canMirror(asset as never, this.selected, axis, reach) }))\n return html`<div vector-row>\n <label>${i18next.t('figure.label.tools')}</label>\n <div tools>\n ${tool('centre-x', 'figure.button.center-x', 'figure.text.center-on-x')}\n ${tool('centre-z', 'figure.button.center-z', 'figure.text.center-on-z')}\n ${this.renderPlaneAlign(asset as FigureAsset, unavailable)}\n ${tool('snap', 'figure.button.snap', 'figure.text.snap-explained')}\n </div>\n </div>\n <div vector-row>\n <label>${i18next.t('figure.label.mirror-copy')}</label>\n <div tools>\n ${mirrors.map(\n ({ axis, able }) => html`<button ?disabled=${unavailable || !able} title=${i18next.t(able ? 'figure.text.mirror-explained' : 'figure.text.mirror-would-overlap')} @click=${() => this.mirror(axis)}>\n ${i18next.t('figure.button.mirror-' + axis)}\n </button>`\n )}\n </div>\n </div>\n`\n }\n /**\n * A part's name. It renames every value the part owns, and what refers to them follows\n * (figure-model's rename-part), as one step of the history.\n */\n /**\n * A repeated body is one of its repeat's copies and is named after it -- the list and this field read `roller 15`, not\n * its path through the repeat (user, 2026-09-24: 「부품 이름 ???」). A copy has no name of its own to change.\n */\n private renderRepeatNote(geometry: readonly unknown[] | undefined) {\n const repeat = repeatOf(this.selected, geometry)\n return repeat?.index ? html`<p hint>${i18next.t('figure.text.repeat-member', { name: repeat.name, count: repeat.count, index: repeat.index })}</p>` : nothing\n }\n private renamePart(input: HTMLInputElement) {\n const name = input.value.trim()\n const from = this.selected\n if (!name || name === from) {\n input.value = from\n return\n }\n try {\n this.session!.edit({ kind: 'rename-part', target: from, name })\n this.selected = name\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = from\n const code = (error as { code?: string })?.code\n this.error =\n code === 'PART_ID'\n ? i18next.t(/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(name) ? 'figure.text.part-name-taken' : 'figure.text.part-name-invalid', { name })\n : error instanceof Error\n ? error.message\n : String(error)\n }\n }\n /** Size response, fastening and motion for the selected part, as authoring commands. */\n private renderLinks(unavailable: boolean, section: 'shape' | 'places' | 'motion') {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n let dims: [number, number, number] | undefined\n try {\n dims = boxOf(asset, this.selected)?.dims\n } catch {\n dims = undefined\n }\n return html`<figure-links\n .asset=${asset}\n .section=${section}\n .partId=${this.selected}\n .dims=${dims}\n ?locked=${unavailable}\n @command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n .previewWords=${previewWordsOf(this.currentPreview(), this.selected, (key, params) => i18next.t(key, params))}\n .detachWords=${this.detachWords(asset as FigureAsset | undefined)}\n .overhangWords=${section === 'shape' ? this.overhangWords(asset as FigureAsset | undefined) : []}\n .overhangNote=${section === 'shape' ? this.overhangNote(asset as FigureAsset | undefined) : []}\n .motionEnds=${section === 'motion' ? this.motionEnds() : null}\n @go-fasten=${() => this.goFasten()}\n @preview-command=${(e: CustomEvent) => this.previewCommand(e.detail)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-links>`\n }\n /**\n * The face a size drag keeps for the selected part, figure-model's rule (`figureScaleAnchorOf`): the gizmo shows it\n * while dragging and the commit keeps it, so nothing jumps on release. A part whose fastening is turned has none the\n * rule can say, and the gizmo keeps its own (the face across from the handle).\n */\n private anchorsOf(asset: FigureAsset | undefined): Record<string, ScaleAnchor> {\n let next: Record<string, ScaleAnchor> = {}\n try {\n const anchor = asset && this.selected ? figureScaleAnchorOf(asset, this.selected) : undefined\n if (anchor) next = { [this.selected]: anchor }\n } catch {\n next = {}\n }\n /* The same object while it says the same thing: the canvas stands its parts up again when this changes. */\n if (JSON.stringify(next) !== JSON.stringify(this.lastAnchors)) this.lastAnchors = next\n return this.lastAnchors\n }\n private lastAnchors: Record<string, ScaleAnchor> = {}\n /** The figure's controls: try a value, name it, set its range and travel time, keep the pose. */\n private renderControls(view: { fields: Array<{ id: string; role?: string; value: number }> }, unavailable: boolean) {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n const values = Object.fromEntries(view.fields.filter(f => f.role === 'state').map(f => [f.id, f.value]))\n return html`<figure-controls\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @state=${(e: CustomEvent) => this.run(() => this.session!.apply([{ kind: 'set-state', input: e.detail.input, unit: e.detail.unit, value: e.detail.value }]))}\n @state-live=${(e: CustomEvent) => this.hold({ [e.detail.input]: e.detail.value })}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-controls>\n <figure-clips\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @states=${(e: CustomEvent) => this.run(() => this.session!.apply(e.detail.changes))}\n @states-live=${(e: CustomEvent) => this.hold(e.detail.values)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-clips>`\n }\n /** One command, one step of the history. A refusal a person can meet here is said in their words. */\n /** Where a held edit goes once the author has chosen where what stands on its lost faces goes. */\n private mapFaces(remap: FigureFaceRemap[]) {\n const held = this.faceMapping\n if (!held) return\n const done = this.linkCommand({ ...held.action, remap } as FigureAuthoringAction, held.from)\n if (done && held.from === 'section-editor') this.closeSectionEditor()\n }\n /** Runs a command; true when it was taken. */\n private linkCommand(action: FigureAuthoringAction, from: 'section-editor' | 'panel' = 'panel'): boolean {\n /* Committed or refused, a command in hand is let go of: the figure as it stands is drawn again. */\n this.holdAction(null)\n this.retry = undefined\n this.notice = ''\n const hadSize = this.hasSize()\n try {\n this.session!.command(action)\n this.error = ''\n this.faceMapping = undefined\n /* What the command did besides what was asked, in one line: the figure's size declared to follow (ADR ruling Q1). */\n if (action.kind === 'follow-size' && !hadSize) {\n const size = this.designValues()\n this.notice = i18next.t('figure.text.size-declared-to-follow', {\n x: Math.round(size['size.x'] ?? 0).toLocaleString(),\n y: Math.round(size['size.y'] ?? 0).toLocaleString(),\n z: Math.round(size['size.z'] ?? 0).toLocaleString()\n })\n }\n this.changed()\n return true\n } catch (error) {\n if (this.askClipLoss(error, () => this.linkCommand(action, from))) return false\n const code = (error as { code?: string })?.code\n /* Something stands on a face this takes away: ask where it goes, there, rather than only saying no. */\n const need = (error as { details?: FigureFaceMappingNeed }).details\n if (code === 'FEATURE_MAPPING_REQUIRED' && need?.lost?.length) {\n this.faceMapping = { action, need, from }\n this.error = ''\n return false\n }\n const narrowing = narrowingRetryOf(action, error, (key, params) => i18next.t(key, params))\n if (narrowing) {\n this.error = narrowing.message\n this.retry = { label: narrowing.label, action: narrowing.retry as FigureAuthoringAction }\n return false\n }\n this.error =\n code === 'DIMENSION_CYCLE'\n ? i18next.t('figure.text.follow-would-loop')\n : code === 'FASTEN_CYCLE' || code === 'ATTACH_CYCLE'\n ? i18next.t('figure.text.fasten-would-loop')\n : sizeRangeRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n placementRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n this.said(error)\n return false\n }\n }\n private changeField(field: { id: string; unit: FigureInputChange['unit']; role?: string }, event: Event) {\n const input = event.target as HTMLInputElement,\n value = input.valueAsNumber\n /* A size typed in keeps the face the figure's placement keeps -- figure-model's one rule, as the gizmo and \"follow the size\" do. */\n const part = this.selected\n const change: FigureInputChange = { kind: field.role === 'state' ? 'set-state' : 'set-design', input: field.id, unit: field.unit, value }\n this.run(() => this.session!.apply(field.role !== 'state' && part ? figureSizeEditChanges(parseFigureAsset(this.session!.source()), part, [change]) : [change]))\n // Rejected edits must also restore the displayed numeric value.\n input.value = String(this.session!.read().fields.find(i => i.id === field.id)!.value)\n }\n /** Typing or a held spinner: each number on the way is drawn; the field's change records it. */\n private typing(field: { id: string }, event: Event) {\n const value = (event.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(value)) this.hold({ [field.id]: value })\n }\n /**\n * Drag a field's label (or an axis letter) sideways to scrub its value, as vector tools do: the figure follows the\n * pointer, and the release records one step. The field's number follows too, so the value in hand is always read.\n */\n private scrub(field: { id: string; unit: FigureInputChange['unit']; role?: string; value: number }, down: PointerEvent, unavailable: boolean) {\n if (unavailable || down.button !== 0) return\n const label = down.currentTarget as HTMLElement\n const input = (label.closest('div[cell]')?.querySelector('input') ?? label.nextElementSibling) as HTMLInputElement | null\n if (!input) return\n down.preventDefault()\n label.setPointerCapture(down.pointerId)\n const start = field.value\n let value = start\n const move = (e: PointerEvent) => {\n value = scrubbed(start, e.clientX - down.clientX, scrubStep(field.unit, start, e.shiftKey))\n input.value = String(value)\n this.hold({ [field.id]: value })\n }\n const up = (e: PointerEvent) => {\n label.removeEventListener('pointermove', move)\n label.removeEventListener('pointerup', up)\n label.removeEventListener('pointercancel', up)\n /* A drag the system took away is not the author's value: the field goes back to where it was. */\n if (e.type === 'pointercancel') value = start\n if (value === start) {\n input.value = String(start)\n this.live = NOTHING_LIVE\n return\n }\n input.value = String(value)\n this.changeField(field, { target: input } as unknown as Event)\n }\n label.addEventListener('pointermove', move)\n label.addEventListener('pointerup', up)\n label.addEventListener('pointercancel', up)\n }\n /** The measured range, kept for the revision it was measured at: measuring evaluates the figure at its edges. */\n private range?: { at: string; of: ReturnType<typeof instanceRangeOf>; toDeclare?: ReturnType<typeof instanceRangeToDeclare> }\n /** The sizes a board may give the figure, and the way to measure them again after its parts changed. */\n private renderInstanceRange(asset: FigureAsset | undefined, unavailable: boolean) {\n if (!asset) return nothing\n /* Another figure, or another step of this one, is measured again. */\n const at = `${this.session?.read().context ?? ''}:${this.revision}`\n if (this.range?.at !== at) {\n let of: ReturnType<typeof instanceRangeOf>\n let toDeclare: ReturnType<typeof instanceRangeToDeclare>\n try {\n of = instanceRangeOf(asset)\n } catch {\n of = undefined\n }\n try {\n toDeclare = of ? undefined : instanceRangeToDeclare(asset)\n } catch {\n toDeclare = undefined\n }\n this.range = { at, of, toDeclare }\n }\n const range = this.range.of\n /* No size yet: the figure is declared its size from its parts, so a board can resize it and parts can follow it. */\n const toDeclare = this.range.toDeclare\n if (!range && toDeclare)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n <p hint>${i18next.t('figure.text.instance-size-undeclared')}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: toDeclare.range, at: toDeclare.at })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.declare-instance-size')}\n </button>\n </section>`\n if (!range) return nothing\n const mm = (v: number) => Math.round(v).toLocaleString()\n const differs = rangeDiffers(range.declared, range.measured)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n ${(['x', 'y', 'z'] as const).map(\n axis => html`<div inline-field>\n <label>${axis.toUpperCase()} <span unit>mm</span></label>\n <div pair>\n ${(['min', 'max'] as const).map(\n bound => html`<input\n aria-label=${`size.${axis}.${bound}`}\n type=\"number\"\n step=\"any\"\n .value=${live(String(Math.round(range.declared[axis][bound])))}\n ?disabled=${unavailable}\n @change=${(e: Event) => {\n const next = rangeWith(range.declared, axis, bound, (e.target as HTMLInputElement).valueAsNumber)\n if (next) this.linkCommand({ kind: 'declare-instance-size', range: next, replace: true })\n }}\n />`\n )}\n </div>\n </div>`\n )}\n ${differs\n ? html`<p hint>\n ${i18next.t('figure.text.instance-range-can-widen', {\n ranges: (['x', 'y', 'z'] as const)\n .filter(axis => rangeDiffers(range.declared, { ...range.declared, [axis]: range.measured[axis] }))\n .map(axis => `${axis.toUpperCase()} ${mm(range.measured[axis].min)} – ${mm(range.measured[axis].max)}`)\n .join(' · ')\n })}\n </p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: range.measured, replace: true })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.remeasure-range')}\n </button>`\n : nothing}\n ${this.renderSizingRule(asset, unavailable)}\n </section>`\n }\n /**\n * How the figure grows. One ratio (`sizing: 'uniform'`) is said as it is; a figure with joints that has not declared\n * it is offered it -- a mechanism does not shear -- and the author decides (chief architect's ruling 2026-09-24).\n */\n private renderSizingRule(asset: FigureAsset, unavailable: boolean) {\n if (asset.sizing === 'uniform') {\n /* One ratio reaches only what reads the size: every other length is offered to follow it, in one step. */\n const follow = proportionToFollow(asset)\n return html`<div inline-field><label>${i18next.t('figure.label.sizing-rule')}</label><span>${i18next.t('figure.label.sizing-uniform')}</span></div>\n ${follow?.count\n ? html`<p hint>${i18next.t('figure.text.proportion-to-follow', { count: follow.count })}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'follow-size-in-proportion' })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size-in-proportion')}\n </button>`\n : nothing}\n ${follow?.kept.length ? html`<p hint>${i18next.t('figure.text.proportion-kept', { what: follow.kept.join(', ') })}</p>` : nothing}`\n }\n return html`${turnsAboutAJoint(asset) ? html`<p hint>${i18next.t('figure.text.sizing-uniform-proposed')}</p>` : nothing}\n <button act ?disabled=${unavailable} title=${i18next.t('figure.text.sizing-uniform-explained')} @click=${() => this.linkCommand({ kind: 'scale-uniformly' })}>\n <md-icon>aspect_ratio</md-icon>${i18next.t('figure.button.scale-uniformly')}\n </button>`\n }\n /**\n * The parts list, one row per part the author made: a repeat is one row with how many copies it makes now\n * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\n private partRows(geometry: readonly { id: string }[], asset?: FigureAsset): FigurePartRow[] {\n /* Where each part is fastened, straight above it: `part · face`, or the mounting plane (ADR-0097 §5.5). */\n const fastened = new Map(\n (asset?.joints ?? []).map(j => [\n j.body1.part,\n 'plane' in j.body0 ? i18next.t('figure.label.mounting-plane') : `${partLabelOf(j.body0.part)} · ${i18next.t(endPlaceKeyOf(j.body0))}`\n ])\n )\n const rows = new Map<string, FigurePartRow>()\n for (const g of geometry) {\n const id = ownerOf(g.id)\n const row = rows.get(id)\n if (row) {\n row.copies = (row.copies ?? 1) + 1\n continue\n }\n rows.set(id, {\n id,\n kind: startingShapeKindOfBody((g as { shape?: never }).shape) ?? '',\n hidden: this.hiddenParts.has(id),\n invisible: (g as { visible?: boolean }).visible === false,\n ...(id !== g.id ? { copies: 1 } : {}),\n ...(fastened.has(id) ? { fastenedTo: fastened.get(id)! } : {})\n })\n }\n return [...rows.values()]\n }\n /** The detail level's part budget for the list's head, from figure-model's count (a repeat once). */\n private partBudgetOf(asset: FigureAsset | undefined) {\n if (!asset) return undefined\n try {\n return { level: asset.detailLevel ?? null, used: figurePartCountOf(asset), limit: asset.detailLevel ? PART_LIMIT[asset.detailLevel] : null }\n } catch {\n return undefined\n }\n }\n /**\n * A repeat: which way its copies run, how many there are now, and how far apart.\n * The pitch of a row that fills its length is edited as a number (`set-repeat` makes it the part's own the first\n * time); a row of a fixed count says its pitch cannot be set yet (figure-model refuses it the same way).\n */\n private renderRepeat(asset: FigureAsset | undefined, geometry: readonly { id: string }[], unavailable: boolean) {\n const repeat = repeatOf(this.selected, geometry)\n if (!asset || !repeat || repeat.index) return nothing\n /* The row is set on its part; what hangs from that part is copied with it and has no row of its own. */\n if (!asset.document.model.nodes.some(n => n.id === `${this.selected}.repeat`)) return nothing\n const model = asset.document.model as unknown as {\n nodes: { id: string; op: string; args: string[]; params?: Record<string, string> }[]\n constants: { id: string; value: number }[]\n inputs: { id: string; max?: number }[]\n }\n const layout = model.nodes.find(n => n.id === `${this.selected}.layout`)\n const axis = model.nodes.find(n => n.id === `${this.selected}.repeat`)?.params?.axis ?? '?'\n const own = `${this.selected}.repeat.pitch`\n /* The pitch as it stands: the part's own number, a constant, or what a pitch that follows a length comes to. */\n const pitch = asset.designInputs[own] ?? model.constants.find(c => c.id === layout?.args[4])?.value ?? valueNow(asset, layout?.args[4])\n const fits = layout?.op === 'fit-pitch@1'\n /* What the pitch gives, in numbers: this many copies at the length it is authored, and how long it may be placed. */\n const lengthRef = layout?.args[0] ?? ''\n const length = asset.designInputs[lengthRef]\n const longest = model.inputs.find(i => i.id === lengthRef)?.max\n const limit = model.constants.find(c => c.id === layout?.args[6])?.value\n const field = { id: own, unit: 'mm' as const, role: 'design', value: pitch ?? 0 }\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div inline-field><label>${i18next.t('figure.label.repeat-axis')}</label><span value>${axis.toUpperCase()}</span></div>\n <div inline-field><label>${i18next.t('figure.label.repeat-count')}</label><span value>${repeat.count}</span></div>\n <div inline-field>\n <label>${i18next.t('figure.label.repeat-gap')} <span unit>mm</span></label>\n <input\n type=\"number\"\n step=\"any\"\n aria-label=${own}\n .value=${String(pitch ?? '')}\n ?disabled=${unavailable || !fits}\n @change=${(e: Event) => this.setPitch(field, e)}\n />\n </div>\n <ul row-reading>${rowWordsOf(this.rowNow(asset), (key, params) => i18next.t(key, params)).map(line => html`<li>${line}</li>`)}</ul>\n <p hint>\n ${fits && length !== undefined && longest !== undefined && limit !== undefined\n ? i18next.t('figure.text.repeat-what-pitch-gives', {\n length: length.toLocaleString(),\n count: repeat.count,\n longest: longest.toLocaleString(),\n limit\n })\n : i18next.t(fits ? 'figure.text.repeat-fits-length' : 'figure.text.repeat-fixed-count')}\n </p>\n ${this.renderPublicPitch(asset, pitch ?? 0, unavailable)}\n ${asset.joints?.some(j => j.body1.part === this.selected && j.repeat)\n ? html`<button act ?disabled=${unavailable} @click=${() => this.run(() => this.session!.command({ kind: 'remove-repeat', part: this.selected }))}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-repeat')}\n </button>`\n : nothing}\n </section>`\n }\n /** The selected row as it is drawn now, read by figure-model: nothing when it cannot be read. */\n private rowNow(asset: FigureAsset): FigureRowReading | undefined {\n try {\n return figureRowOf(asset, this.selected, this.currentInputs())\n } catch {\n return undefined\n }\n }\n /** The design input a row's pitch is read from, when it is read from one (ADR-0096). */\n private pitchInputOf(asset: FigureAsset, part: string): string | undefined {\n const pitch = asset.joints?.find(j => j.body1.part === part && j.repeat)?.repeat?.pitch as { from?: { of?: string; input?: string } } | number | undefined\n return typeof pitch === 'object' && pitch?.from?.of === 'input' ? pitch.from.input : undefined\n }\n /**\n * 「보드에서 바꿀 수 있음」 (ADR-0096): the row's pitch made a design input the figure publishes -- a name on the board and\n * a range the board's value is held to -- in one step; changed or withdrawn the same way. Only a row with a record.\n */\n private renderPublicPitch(asset: FigureAsset, pitch: number, unavailable: boolean) {\n const part = this.selected\n if (!asset.joints?.some(j => j.body1.part === part && j.repeat)) return nothing\n const from = this.pitchInputOf(asset, part)\n const listed = from ? asset.publicInputs?.find(p => p.input === from) : undefined\n const input = from ? asset.document.model.inputs.find(i => i.id === from) : undefined\n const form =\n this.publishing?.part === part\n ? this.publishing\n : listed && input\n ? { part, label: listed.label, min: input.min, max: input.max }\n : undefined\n const open = !!form\n const edit = (key: 'label' | 'min' | 'max') => (e: Event) => {\n const target = e.target as HTMLInputElement\n const base = form ?? { part, label: '', min: 0, max: 0 }\n this.publishing = { ...base, [key]: key === 'label' ? target.value : target.valueAsNumber }\n }\n const steps = (): FigureProposalStep[] => {\n const f = form!\n const id = from ?? `${part}.pitch`\n if (listed) return [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }, { kind: 'publish-input', input: id, label: f.label }] as FigureProposalStep[]\n const exists = asset.document.model.inputs.some(i => i.id === id)\n return [\n ...(exists ? [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }] : [{ kind: 'add-design-input', id, unit: 'mm', min: f.min, max: f.max, value: pitch }]),\n ...(from ? [] : [{ kind: 'set-repeat', part, pitch: { from: { of: 'input', input: id } } }]),\n { kind: 'publish-input', input: id, label: f.label }\n ] as FigureProposalStep[]\n }\n const run = (list: FigureProposalStep[]) => {\n try {\n this.session!.applyRecipe(list)\n this.publishing = undefined\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = this.said(error)\n }\n }\n return html`<div public-pitch>\n <label toggle>\n <input\n type=\"checkbox\"\n aria-label=\"figure.label.board-sets\"\n .checked=${open}\n ?disabled=${unavailable}\n @change=${(e: Event) =>\n (e.target as HTMLInputElement).checked\n ? (this.publishing = { part, label: i18next.t('figure.label.repeat-gap'), min: Math.max(1, Math.round(pitch / 2)), max: Math.round(pitch * 2) })\n : listed\n ? run([{ kind: 'unpublish-input', input: from }, { kind: 'set-repeat', part, pitch }] as FigureProposalStep[])\n : (this.publishing = undefined)}\n />\n ${i18next.t('figure.label.board-sets')}\n </label>\n ${open\n ? html`<div inline-field><label>${i18next.t('figure.label.board-name')}</label><input aria-label=\"figure.label.board-name\" .value=${form!.label} @change=${edit('label')} /></div>\n <div inline-field><label>${i18next.t('figure.label.least')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.least\" .value=${String(form!.min)} @change=${edit('min')} /></div>\n <div inline-field><label>${i18next.t('figure.label.most')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.most\" .value=${String(form!.max)} @change=${edit('max')} /></div>\n <button act publish-pitch ?disabled=${unavailable || !form!.label.trim()} @click=${() => run(steps())}>\n <md-icon>${listed ? 'check' : 'ios_share'}</md-icon>${i18next.t(listed ? 'figure.button.apply' : 'figure.button.publish-input')}\n </button>`\n : nothing}\n </div>`\n }\n /**\n * A pitch always goes through `set-repeat`: the command moves the longest length with it (at most `limit` copies),\n * which a plain input edit would not. Refused only when the authored length would already hold more copies than\n * that -- said with the numbers.\n */\n private setPitch(field: { id: string; value: number }, event: Event) {\n const input = event.target as HTMLInputElement\n const pitch = input.valueAsNumber\n if (!Number.isFinite(pitch) || pitch === field.value) return\n /* Read from a design input the board may set: the input's value changes, the row keeps reading it (ADR-0096). */\n const from = this.pitchInputOf(JSON.parse(this.session!.source()) as FigureAsset, this.selected)\n if (from) {\n this.run(() => this.session!.apply([{ kind: 'set-design', input: from, unit: 'mm', value: pitch }]))\n input.value = String(this.session!.read().fields.find(i => i.id === from)?.value ?? field.value)\n return\n }\n try {\n this.session!.command({ kind: 'set-repeat', part: this.selected, pitch })\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = String(field.value)\n const code = (error as { code?: string })?.code\n const message = error instanceof Error ? error.message : String(error)\n const found = /\\((\\d[\\d.]*) mm\\) a pitch under ([\\d.]+) mm makes more than (\\d+)/.exec(message)\n this.error =\n code === 'INPUT_RANGE' && found\n ? i18next.t('figure.text.repeat-pitch-too-small', { length: Number(found[1]).toLocaleString(), min: found[2], limit: found[3] })\n : this.said(error)\n }\n }\n /** Choose a part, from the list, the canvas or a place row. A figure-level tab gives way to the part's properties. */\n /*\n Saving and releasing told apart, beside the save (ADR-0097 §5.6, Q-D2): what the saved figure is -- a draft never\n released, a draft while boards use an earlier release, a release -- as the server said it. Edits not saved are the\n status before it. Boards read a draft's latest release (figureBlueprint), so that is what is said.\n */\n private releaseWords(view: { id?: string | null }): string {\n if (!view.id || !this.releaseState?.state) return ''\n const { state, version } = this.releaseState\n if (state === 'released') return i18next.t('figure.text.release-state-released', { version: String(version) })\n return version > 0 ? i18next.t('figure.text.release-state-draft-over', { version: String(version) }) : i18next.t('figure.text.release-state-draft-new')\n }\n /** To the release that exists: the history tab's release section, not a second one here. */\n private goRelease = async () => {\n this.tab = 'history'\n await this.updateComplete\n await this.querySelector<HTMLElement & { showRelease?: () => Promise<void> }>('figure-history-panel')?.showRelease?.()\n }\n /** The fastening form's command, seen before it is done; null clears what was shown. */\n private previewCommand(candidate: { action: FigureAuthoringAction; face?: { part: string; face: string } } | null) {\n if (!candidate || !this.session || !this.selected) {\n this.preview = undefined\n return\n }\n const view = this.session.read()\n const held = { context: view.context!, revision: view.revision!, key: JSON.stringify(candidate), part: this.selected }\n try {\n const seen = this.session.previewCommand(candidate.action)\n let face: FigureFaceArea | undefined\n if (candidate.face) {\n try {\n face = figurePartFaceOf(parseFigureAsset(this.session.source()), candidate.face.part, candidate.face.face, this.currentInputs())\n } catch {\n face = undefined\n }\n }\n /* A row is read on the figure the command would make, by figure-model, as drawn. */\n const row = candidate.action.kind === 'make-repeat' ? figureRowOf(seen.asset, this.selected, this.currentInputs()) : undefined\n this.preview = {\n ...held,\n context: seen.context,\n revision: seen.revision,\n geometry: seen.geometry,\n moves: seen.moves,\n added: seen.added,\n ...(row ? { row } : {}),\n clipsWouldGo: seen.clipsWouldGo,\n face,\n faceUnknown: !!candidate.face && !face\n }\n } catch (error) {\n /* Refused: nothing of an earlier result stays on screen, and the reason is said. */\n this.preview = { ...held, refused: this.said(error) }\n }\n }\n /** The preview, while it still speaks of what is on screen: this figure, this version, this part. */\n private currentPreview(): (HeldPreview & { part: string }) | undefined {\n const p = this.preview\n const view = this.session?.read()\n /* Only where its form is: the properties panel stays in the page on another tab, and did not clear it (2026-09-27, :3391). */\n if (!p || !view || p.context !== view.context || p.revision !== view.revision || p.part !== this.selected || this.middle !== 'edit' || this.tab !== 'properties') return undefined\n return p\n }\n /*\n What taking the selected part off would do, worked out on a copy before the button is pressed (ADR-0097 §5.5): whether\n it stays where it stands now, what stays fastened to it, which clips would go. \"It stays where it is\" is said only\n when the copy shows it does.\n */\n private detachSaid?: { key: string; words: string[] }\n private detachWords(asset: FigureAsset | undefined): string[] {\n const view = this.session?.read()\n const joint = asset?.joints?.find(j => j.body1.part === this.selected)\n if (!asset || !view || !joint || !this.session) return []\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.detachSaid?.key === key) return this.detachSaid.words\n const say = (k: string, params?: Record<string, string>) => i18next.t(k, params)\n let words: string[]\n try {\n const seen = this.session.previewCommand({ kind: 'detach', part: this.selected })\n const own = seen.moves.some(m => m.body === this.selected)\n words = own\n ? [say('figure.text.detach-moves'), ...previewWordsOf({ context: seen.context, revision: seen.revision, key, moves: seen.moves }, this.selected, say)]\n : /* It stays where it is: as expected, so nothing is said (user 2026-10-01). */ []\n const children = (asset.joints ?? []).filter(j => 'part' in j.body0 && j.body0.part === this.selected).map(j => partLabelOf(j.body1.part))\n if (children.length) words.push(say('figure.text.detach-keeps-children', { parts: children.join(', ') }))\n if (seen.clipsWouldGo.length) words.push(say('figure.text.detach-clips', { clips: seen.clipsWouldGo.map(c => c.clip).join(', ') }))\n } catch (error) {\n words = [say('figure.text.detach-refused', { reason: this.said(error) })]\n }\n this.detachSaid = { key, words }\n return words\n }\n /*\n Past the edge of the face a part is fastened to (ADR-0097 §5.5, Q3): the selected part's own, and the parts fastened\n to it -- said apart from the room, nothing moved. Read once per figure, version and part.\n */\n private overhangSaid?: { key: string; words: string[]; note: string[] }\n /** Wider than its face: a fact of the relation, said in its details, not as a warning (designer 2026-09-27). */\n private overhangNote(asset: FigureAsset | undefined): string[] {\n this.overhangWords(asset)\n return this.overhangSaid?.note ?? []\n }\n private overhangWords(asset: FigureAsset | undefined): string[] {\n const view = this.session?.read()\n if (!asset || !view || !this.selected) return []\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.overhangSaid?.key === key) return this.overhangSaid.words\n const say = (k: string, params?: Record<string, string>) => i18next.t(k, params)\n const where = (o: FigureFaceOverhang) => ({ on: partLabelOf(o.on.part), face: say(`figure.label.face-${o.on.face}`) })\n const sides = (o: FigureFaceOverhang) => o.sides.map(s => say(`figure.text.overhang-side-${s.side}`, { axis: s.axis.toUpperCase(), mm: String(s.mm) })).join(', ')\n const words: string[] = []\n const note: string[] = []\n try {\n const inputs = this.currentInputs()\n const own = figureFaceOverhangOf(asset, this.selected, inputs)\n if (own?.state === 'larger') {\n note.push(say('figure.text.overhang-larger', { ...where(own), sides: sides(own) }))\n if (own.lopsided.length) note.push(say('figure.text.overhang-lopsided', { axes: own.lopsided.map(a => a.toUpperCase()).join(', ') }))\n }\n if (own?.state === 'out') words.push(say('figure.text.overhang-out', { ...where(own), sides: sides(own) }))\n else if (own?.state === 'possible') words.push(say('figure.text.overhang-possible', where(own)))\n else if (own?.state === 'unknown') words.push(say('figure.text.overhang-unknown', where(own)))\n const held = (asset.joints ?? []).filter(j => 'part' in j.body0 && j.body0.part === this.selected).map(j => figureFaceOverhangOf(asset, j.body1.part, inputs))\n const past = held.filter((o): o is FigureFaceOverhang => o?.state === 'out' || o?.state === 'possible')\n if (past.length) words.push(say('figure.text.overhang-held', { parts: past.map(o => partLabelOf(o.part)).join(', ') }))\n } catch {\n /* Not read: nothing said rather than a guess. */\n }\n this.overhangSaid = { key, words, note }\n return words\n }\n /** The selected part's motion at both ends of its range, made once per figure, version and part. */\n private motionEndsSaid?: { key: string; ends: MotionEnds | null }\n private motionEnds(): MotionEnds | null {\n const view = this.session?.read()\n if (!view || !this.selected) return null\n const key = `${view.context}|${view.revision}|${this.selected}`\n if (this.motionEndsSaid?.key !== key) {\n let ends: MotionEnds | null = null\n try {\n ends = motionEndsOf(parseFigureAsset(this.session!.source()), this.selected, this.currentInputs())\n } catch {\n ends = null\n }\n this.motionEndsSaid = { key, ends }\n }\n return this.motionEndsSaid.ends\n }\n /** \"Fasten it first\", from the motion tab: to the properties tab, the fastening form open on this part. */\n private async goFasten() {\n this.tab = 'properties'\n await this.updateComplete\n const links = [...this.renderRoot.querySelectorAll<HTMLElement & { section?: string; showFastening?: () => Promise<void> }>('figure-links')].find(l => l.section === 'shape')\n await links?.showFastening?.()\n }\n /** What the canvas draws of it, made once per preview: a new list every render would stand the board up each time. */\n private previewShown(): { ghost: FigureRenderPart[]; highlight: FigureRenderPart | null } {\n const p = this.currentPreview()\n /* On the motion tab, with nothing being tried: where the selected part's motion takes it, at both ends. */\n if (!p && this.tab === 'motion' && this.middle === 'edit') return { ghost: this.motionEnds()?.ghost ?? [], highlight: null }\n if (!p || p.refused) return { ghost: [], highlight: null }\n if (this.previewDrawn?.of !== p) this.previewDrawn = { of: p, ghost: ghostPartsOf(p), highlight: faceHighlightOf(p.face) }\n return this.previewDrawn\n }\n /**\n * What the author has in view, for the AI dock to hear with a request (ADR-0097 §5.6 item 5): the part selected and\n * what the preview is trying. Read at the moment of sending, never cached, and never a reason to start a new\n * conversation -- selecting is not a new subject.\n */\n assistantFocus(): { part?: string; trying?: { clips?: Record<string, number>; controls?: Record<string, number> } } {\n const trying = this.middle === 'preview' ? this.renderRoot.querySelector<HTMLElement & { tried?: () => { clips?: Record<string, number>; controls?: Record<string, number> } | undefined }>('figure-preview')?.tried?.() : undefined\n return { ...(this.selected ? { part: this.selected } : {}), ...(trying ? { trying } : {}) }\n }\n private choose(id: string) {\n /* A copy on the canvas selects its repeat: the part the author made. */\n this.selected = id ? ownerOf(id) : id\n this.faceMapping = undefined\n if (id && (this.tab === 'verdict' || this.tab === 'view' || this.tab === 'history')) this.tab = 'properties'\n }\n private asset(): unknown {\n try {\n return JSON.parse(this.session!.source())\n } catch {\n return undefined\n }\n }\n /** A side tab says what it is in words under its icon: the icons alone had to be learnt (designer 2026-09-27, U05). */\n private renderTab(tab: SideTab, icon: string, label: string, badge?: number) {\n /* Its accessible name is the name it shows (designer 2026-09-27); the longer title stays as its tooltip. */\n const name = i18next.t('figure.label.tab-short-' + tab)\n return html`<button tab ?on=${this.tab === tab} title=${label} aria-label=${name} @click=${() => (this.tab = tab)}>\n <md-icon>${icon}</md-icon><span tab-label aria-hidden=\"true\">${name}</span>${badge == null ? '' : html`<span badge>${badge.toLocaleString()}</span>`}\n </button>`\n }\n updated(changed: PropertyValues<this>) {\n super.updated?.(changed)\n this.tell(changed)\n if (this.restorePanelFor !== undefined) {\n const key = this.restorePanelFor\n this.restorePanelFor = undefined\n requestAnimationFrame(async () => {\n const panel = this.propertiesPanel()\n if (!panel || (this.selected || '@model') !== key) return\n await Promise.all([...panel.querySelectorAll<HTMLElement & { updateComplete?: Promise<unknown> }>('figure-links')].map(el => el.updateComplete))\n const kept = this.panelMemory.get(key)\n if (kept) this.foldsOf(panel).forEach((fold, i) => i < kept.open.length && (fold.open = kept.open[i]!))\n panel.scrollTop = kept?.top ?? 0\n })\n }\n const panes = this.renderRoot.querySelector<OxThreePane>('ox-three-pane') ?? undefined\n if (panes !== this.panes) {\n this.panes = panes\n this.fitPanesTo(this.getBoundingClientRect().width)\n }\n }\n /**\n * A new figure's first question, on the canvas where the work will be (designer 2026-09-27, U04): a basic shape\n * or an AI draft when the page offers one. Recipes require a host part and are reached from the parts panel after\n * that part exists. Nothing is added until one is chosen; the type, the space, the\n * mounting face and the tags are not asked for first.\n */\n /** The section editor over the canvas, the figure behind it drawing what the working points make. */\n private renderSectionEditor(geometry: readonly { id: string }[]) {\n const part = geometry.find(g => ownerOf(g.id) === this.selected) as { id: string; shape: FigureEvaluatedShape } | undefined\n /* A door frame's section is its own width, height, jamb and head: its fields edit it, not an outline. */\n const drawn = part?.shape && drawnOf(part.shape)\n if (!part || !drawn || part.shape.dimensions.jamb !== undefined) return nothing\n const asset = this.asset() as FigureAsset\n const measures = figureSectionMeasuresOf(asset, this.selected)\n const kept = figureScaleAnchorOf(asset, this.selected)?.[drawn.axis]\n return html`<figure-section-editor\n .body=${{ ...part, id: this.selected }}\n .measures=${measures}\n .kept=${kept}\n .pointBlocked=${this.pointBlockedOf(drawn)}\n .revision=${this.session?.read().revision ?? 0}\n .faceMapping=${this.faceMapping?.from === 'section-editor' ? this.faceMapping.need : undefined}\n @command=${(e: CustomEvent) => {\n /* Held for a choice of where things go: the editor stays open, the choice shown in it. */\n if (!this.linkCommand(e.detail.action, 'section-editor')) e.detail.held = true\n }}\n @command-live=${(e: CustomEvent) => this.holdAction(e.detail.action)}\n @face-mapped=${(e: CustomEvent) => this.mapFaces(e.detail.remap)}\n @face-mapping-cancel=${() => (this.faceMapping = undefined)}\n @section-editor-close=${() => this.closeSectionEditor()}\n ></figure-section-editor>`\n }\n /**\n * Why a drawn push's end cannot be drawn to one point now: the kernel's own refusal of that command on a copy (what is\n * fastened to the end face), said as the face. Asked once per figure revision and part.\n */\n private pointBlocked?: { key: string; words: string }\n private pointBlockedOf(drawn: NonNullable<ReturnType<typeof drawnOf>>): string {\n if (drawn.apex || drawn.section.kind !== 'polygon' || !this.session) return ''\n const key = `${this.session.read().revision}|${this.selected}`\n if (this.pointBlocked?.key === key) return this.pointBlocked.words\n let words = ''\n try {\n this.session.previewCommand({ kind: 'set-section', part: this.selected!, apex: apexOver(drawn.section.points, drawn.axis) })\n } catch (error) {\n if ((error as { code?: string }).code === 'FEATURE_MAPPING_REQUIRED')\n words = i18next.t('figure.text.section-editor-apex-blocked', { face: i18next.t('figure.label.face-' + END_FACE(drawn.axis, 'end')) })\n }\n this.pointBlocked = { key, words }\n return words\n }\n private renderStart() {\n const shapes: FigurePaletteKind[] = ['box', 'cylinder', 'plate']\n /* Where it is authored from, chosen before any part (ADR-0097): the figure's own setting, no room made up for it. */\n const placement = ((this.asset() as FigureAsset | undefined)?.placement ?? 'floor') as FigurePlacement\n return html`<div start role=\"region\" aria-label=${i18next.t('figure.text.start-question')}>\n <h2>${i18next.t('figure.text.start-question')}</h2>\n <div start-paths>\n <section>\n <h3>${i18next.t('figure.label.start-placement')}</h3>\n <div start-shapes role=\"radiogroup\" aria-label=${i18next.t('figure.label.start-placement')}>\n ${(['floor', 'ceiling', 'wall', 'center'] as const).map(\n one => html`<button start-button role=\"radio\" aria-checked=${String(one === placement)} ?pressed=${one === placement}\n @click=${() => one !== placement && this.linkCommand({ kind: 'set-placement', placement: one })}>\n ${i18next.t(`figure.label.resize-place-${one}`)}\n </button>`\n )}\n </div>\n <small>${i18next.t('figure.text.placement-is-intent')}</small>\n </section>\n <section>\n <h3>${i18next.t('figure.label.start-shape')}</h3>\n <div start-shapes>\n ${shapes.map(\n kind => html`<button start-button start-shape=${kind} @click=${() => this.add(kind)}>\n ${i18next.t(kind === 'box' ? 'figure.label.primitive-cube' : `figure.label.primitive-${kind}`)}\n </button>`\n )}\n </div>\n <small>${i18next.t('figure.text.start-shape-more')}</small>\n </section>\n ${this.aiDraft\n ? html`<section>\n <h3>${i18next.t('figure.label.start-ai')}</h3>\n <button start-button start-ai @click=${() => this.dispatchEvent(new CustomEvent('ask-ai-draft', { bubbles: true, composed: true }))}>\n ${i18next.t('figure.button.start-ai')}\n </button>\n <small>${i18next.t('figure.text.start-ai-optional')}</small>\n </section>`\n : nothing}\n </div>\n </div>`\n }\n /**\n * The part the panel speaks of, held at its top: its kind, and what its size follows when it follows something. No path above it (user 2026-10-01): the parts list and the canvas already show which part is chosen, and the\n * list's root is the way back to the model's settings.\n */\n private renderSubject() {\n let summary: { kind: string; size: string } | undefined\n try {\n summary = this.selected\n ? partSummaryOf(parseFigureAsset(this.session!.source()), ownerOf(this.selected), (key, params) => i18next.t(key, params), i18next.language || 'ko')\n : undefined\n } catch {\n summary = undefined\n }\n if (!summary) return nothing\n return html`<div subject>\n <div subject-summary>\n ${summary.kind ? html`<b>${summary.kind}</b>` : nothing}\n ${summary.size ? html`<small>${summary.size}</small>` : nothing}\n </div>\n </div>`\n }\n /**\n * The model's settings, from the parts list's root (B.1). It shows them on\n * the properties tab whatever tab was open; it changes no data, no camera, no history and no AI conversation.\n */\n private showModelSettings() {\n this.selected = ''\n this.tab = 'properties'\n }\n render() {\n const view = this.session?.read()\n if (!view) return html`<p>${i18next.t('figure.text.opening-model')}</p>`\n const unavailable = view.loading || !!view.error || view.saving || !view.context\n const part = view.geometry.find(g => ownerOf(g.id) === this.selected)\n /* The controls (state inputs) have their own place in the motion tab; these are the design values. */\n const design = view.fields.filter(i => i.role !== 'state')\n /* A repeat's own row values (its pitch) have their own section, not the shape's. */\n const own = design.filter(i => this.selected && i.id.startsWith(this.selected + '.') && !i.id.startsWith(this.selected + '.repeat.'))\n const common = design.filter(i => !view.geometry.some(g => i.id.startsWith(ownerOf(g.id) + '.')))\n /*\n A part's field only the declared room still reads -- its old height position once the floor holds it -- moves\n nothing; it is shown apart as what it is, not as a position (ADR-0097, designer 2026-09-27).\n */\n let roomOnly: string[] = []\n try {\n roomOnly = this.selected ? figureRoomOnlyInputsOf(parseFigureAsset(this.session!.source()), this.selected) : []\n } catch {\n roomOnly = []\n }\n const partFields = own.filter(i => !roomOnly.includes(i.id))\n /* The numbers a rule gives the axes that have no field of their own -- shown read-only, never as a blank. */\n let held: HeldValues | undefined\n try {\n const body = view.geometry.find(g => g.id === this.selected) as unknown as FigureRenderPart | undefined\n const placed = body ? placementOf(body) : undefined\n const parsed = this.selected ? parseFigureAsset(this.session!.source()) : undefined\n if (placed && parsed)\n held = {\n position: placed.position,\n rotation: placed.rotation,\n size: (['x', 'y', 'z'] as const).map(axis => measureNow(parsed, ownerOf(this.selected), axis)),\n /* Only a size a rule sets: a palette part's own numbers are its shape's fields, not a rule's (found in the browser). */\n sizeRuled: (['x', 'y', 'z'] as const).every(axis => followOf(parsed, ownerOf(this.selected), axis).of !== 'own')\n }\n } catch {\n held = undefined\n }\n const roomFields = own.filter(i => roomOnly.includes(i.id))\n const status = view.loading\n ? 'figure.text.loading-figure'\n : view.saving\n ? 'figure.text.saving-figure'\n : view.dirty || !view.id\n ? 'figure.text.unsaved-changes'\n : 'figure.text.saved'\n const asset = this.asset()\n const tab = this.tab\n return html`<ox-canvas-bar\n history\n fit\n undo-shortcut=\"Ctrl+Z\"\n redo-shortcut=\"Ctrl+Y\"\n ?can-undo=${!unavailable && view.canUndo}\n ?can-redo=${!unavailable && view.canRedo}\n .pane=${this.panes}\n @canvas-undo=${() => this.run(() => this.session!.undo())}\n @canvas-redo=${() => this.run(() => this.session!.redo())}\n @canvas-fit=${() => this.renderRoot.querySelector<FigureCanvas>('figure-canvas')?.fit()}\n >\n ${this.renderGizmoTools(!unavailable && this.middle === 'edit')}\n ${(['edit', 'preview'] as const).map(\n mode => html`<button slot=\"mode\" mode aria-pressed=${String(this.middle === mode)} title=${i18next.t('figure.text.mode-' + mode + '-explained')} @click=${() => (this.middle = mode)}>\n ${i18next.t('figure.label.mode-' + mode)}\n </button>`\n )}\n <span slot=\"status\" class=\"status\" role=\"status\" ?dirty=${status === 'figure.text.unsaved-changes'}>${i18next.t(status)}</span>\n <span slot=\"status\" release-state>${this.releaseWords(view)}</span>\n <button slot=\"commit\" publish ?disabled=${!view.id} title=${view.id ? '' : i18next.t('figure.text.save-the-figure-before-releasing')} @click=${this.goRelease}>${i18next.t('figure.button.release')}</button>\n <button slot=\"commit\" save ?disabled=${unavailable || (!view.dirty && !!view.id)} @click=${this.save}>${i18next.t('figure.button.save')}</button>\n </ox-canvas-bar>\n ${this.catalogOpen\n ? html`<figure-recipe-catalog\n .templates=${this.templates}\n .selected=${this.selected}\n .error=${this.recipeError}\n .guideOf=${this.guideOf}\n .thumbnailOf=${this.thumbnailOf}\n ?locked=${unavailable}\n @insert-recipe=${(e: CustomEvent) => this.insertRecipe(e.detail.recipe, e.detail.values)}\n @close-catalog=${() => (this.catalogOpen = false)}\n ></figure-recipe-catalog>`\n : null}\n <ox-three-pane>\n <figure-parts\n slot=\"start\"\n .budget=${this.budget}\n @show-maturity=${() => (this.tab = 'verdict')}\n .parts=${this.partRows(view.geometry, asset as FigureAsset | undefined)}\n .partBudget=${this.partBudgetOf(asset as FigureAsset | undefined)}\n @set-detail-level=${(e: CustomEvent) => this.linkCommand({ kind: 'set-detail-level', level: e.detail.level })}\n .selected=${this.selected}\n .modelName=${view.name ?? ''}\n @show-model-settings=${() => this.showModelSettings()}\n ?locked=${unavailable}\n @add-part=${(e: CustomEvent) => this.add(e.detail.kind)}\n .recipeCount=${this.templates.length}\n @open-recipe-catalog=${() => ((this.catalogOpen = true), (this.recipeError = ''))}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @toggle-part-hidden=${(e: CustomEvent) => this.toggleHiddenPart(e.detail.id)}\n @set-all-parts-hidden=${(e: CustomEvent) =>\n (this.hiddenParts = e.detail.hidden ? new Set(view.geometry.map(g => ownerOf(g.id))) : new Set())}\n @move-part-up=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @move-part-down=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @duplicate-part=${(e: CustomEvent) => this.duplicatePart(e.detail.id)}\n @remove-part=${(e: CustomEvent) => this.removePart(e.detail.id)}\n ></figure-parts>\n ${this.middle === 'preview'\n ? html`<figure-preview\n .asset=${asset}\n .context=${view.context ?? ''}\n .view=${this.view}\n .selected=${this.selected}\n @configure-size=${async (e: CustomEvent<{ part: string }>) => {\n this.middle = 'edit'\n this.selected = e.detail.part\n this.tab = 'properties'\n await this.updateComplete\n this.renderRoot.querySelector('figure-links')?.scrollIntoView({ block: 'nearest' })\n }}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-preview>`\n : html`<div middle>\n ${view.geometry.length === 0 && !unavailable ? this.renderStart() : nothing}\n ${this.sectionEditing && this.sectionEditing === this.selected && !unavailable ? this.renderSectionEditor(view.geometry) : nothing}\n <figure-canvas\n .view=${this.view}\n .parts=${this.drawnParts(view.geometry, asset)}\n .anchors=${this.anchorsOf(asset as FigureAsset | undefined)}\n .fan=${this.fanOf(asset as FigureAsset | undefined)}\n .ghost=${this.previewShown().ghost}\n .highlight=${this.previewShown().highlight}\n .palette=${view.palette ?? {}}\n .context=${view.context ?? ''}\n .selected=${this.selected}\n .reach=${unavailable ? { translate: false, rotate: false, scale: false } : this.reachOf(this.selected)}\n @part-transformed=${(e: CustomEvent) => this.transformed(e.detail.id, e.detail.result)}\n @part-selected=${(e: CustomEvent<string>) => this.choose(e.detail)}\n @render-error=${(e: CustomEvent<Error>) => {\n this.error = e.detail.message\n }}\n ></figure-canvas></div>`}\n <aside slot=\"end\">\n <div tabs>\n ${this.renderTab('properties', 'tune', i18next.t('figure.label.properties'))}\n ${this.renderTab('capability', 'conveyor_belt', i18next.t('figure.label.tab-capability'))}\n ${this.renderTab('motion', 'animation', i18next.t('figure.label.motion'))}\n ${this.renderTab('verdict', 'insights', i18next.t('figure.label.maturity'), this.instances)}\n ${this.renderTab('view', 'wb_sunny', i18next.t('figure.label.tab-environment'))}\n ${this.renderTab('history', 'history', i18next.t('figure.label.history'))}\n </div>\n <slot name=\"notice\"></slot>\n <div panel ?off=${tab !== 'properties'}>\n ${this.selected && part\n ? html`${this.renderSubject()}\n <section>\n <h3>${i18next.t('figure.label.group-part')}</h3>\n <div inline-field>\n <label>${i18next.t('figure.label.name')}</label>\n <input\n name-field\n aria-label=${i18next.t('figure.label.name')}\n .value=${partLabelOf(this.selected)}\n ?disabled=${unavailable || !!repeatOf(this.selected, view.geometry)?.index}\n @change=${(e: Event) => this.renamePart(e.target as HTMLInputElement)}\n />\n </div>\n ${this.renderRepeatNote(view.geometry)}\n </section>\n ${this.renderRepeat(asset as FigureAsset | undefined, view.geometry, unavailable)}\n ${this.renderGroups(this.withSizeRow(groupFields(partFields, this.selected), held), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable), held)}\n ${roomFields.length ? this.renderRoomOnly(roomFields, unavailable) : nothing}\n ${this.renderLinks(unavailable, 'shape')}\n <figure-section-panel\n .body=${{ ...part, id: this.selected }}\n ?locked=${unavailable}\n .faceMapping=${this.faceMapping?.from === 'panel' ? this.faceMapping.need : undefined}\n @face-mapped=${(e: CustomEvent) => this.mapFaces(e.detail.remap)}\n @face-mapping-cancel=${() => (this.faceMapping = undefined)}\n @command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n @command-live=${(e: CustomEvent) => this.holdAction(e.detail.action)}\n @section-editor-open=${() => (this.sectionEditing = this.selected)}\n ></figure-section-panel>\n <figure-material-panel\n .body=${{ ...part, id: this.selected }}\n .palette=${view.palette ?? {}}\n ?locked=${unavailable}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n @part-live=${(e: CustomEvent) => this.hold({}, e.detail.edit)}\n ></figure-material-panel>`\n : view.geometry.length === 0\n ? html`${this.renderSubject()}<section empty-figure>\n <p>${i18next.t('figure.text.empty-figure-next')}</p>\n <details>\n <summary>${i18next.t('figure.label.figure-info-later')}</summary>\n <slot name=\"figure\"></slot>\n </details>\n </section>`\n : html`${this.renderSubject()}<slot name=\"figure\"></slot>\n ${this.renderGroups(groupFields(common), 'figure.label.group-figure-size', 'figure.label.design-inputs', unavailable)}\n ${this.renderInstanceRange(asset as FigureAsset | undefined, unavailable)}`}\n </div>\n <div panel ?off=${tab !== 'capability'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'places') : null}\n <figure-capability-panel\n .asset=${asset}\n .selected=${this.selected}\n ?locked=${unavailable}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-capability-panel>\n </div>\n <div panel ?off=${tab !== 'motion'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'motion') : html`<section><p hint>${i18next.t('figure.text.choose-a-part-to-move')}</p></section>`}\n ${this.renderControls(view, unavailable)}\n </div>\n <div panel flush ?off=${tab !== 'verdict'}><slot name=\"verdict\"></slot></div>\n <div panel flush ?off=${tab !== 'view'}>\n <figure-settings .view=${this.view} @update-view=${(e: CustomEvent) => this.setView(e.detail.view)}></figure-settings>\n </div>\n <div panel flush ?off=${tab !== 'history'}><slot name=\"history\"></slot></div>\n </aside>\n </ox-three-pane>`\n }\n /** Position, rotation and size as rows of three cells; the shape's own measures one to a line, under their title. */\n private renderGroups(\n groups: { vectors: FieldGroup[]; singles: FieldGroup[] },\n vectorTitle: string,\n singleTitle: string,\n unavailable: boolean,\n tools: unknown = null,\n held?: HeldValues\n ) {\n return html`${groups.vectors.length || tools\n ? html`<section>\n <h3>${i18next.t(vectorTitle)}</h3>\n ${groups.vectors.map(g => this.renderVector(g, unavailable, held))}\n ${this.renderHeldAxes(groups.vectors)}\n ${tools ?? nothing}\n </section>`\n : nothing}\n ${groups.singles.length\n ? html`<section>\n <h3>${i18next.t(singleTitle)}</h3>\n <div form>${groups.singles.map(g => (g.kind === 'single' ? this.renderSingle(g.name, g.field, unavailable) : nothing))}</div>\n </section>`\n : nothing}`\n }\n /**\n * A box-like part's size row stands when a rule sets every side -- each following the figure's size -- with the\n * numbers the rule gives, as its position and turn rows do (designer 2026-09-27: not a blank, not gone).\n */\n private withSizeRow(groups: ReturnType<typeof groupFields>, held?: HeldValues) {\n if (groups.vectors.some(v => v.kind === 'vector' && v.name === 'size')) return groups\n if (!held?.sizeRuled || !held.size || held.size.length !== 3 || held.size.some(v => v === undefined)) return groups\n const at = groups.vectors.findIndex(v => v.kind === 'vector' && v.name === 'rotation')\n const vectors = [...groups.vectors]\n vectors.splice(at < 0 ? vectors.length : at + 1, 0, { kind: 'vector', name: 'size', cells: {} })\n return { ...groups, vectors }\n }\n private renderVector(group: FieldGroup, unavailable: boolean, held?: HeldValues) {\n if (group.kind !== 'vector') return nothing\n const unit = group.name === 'rotation' ? '°' : 'mm'\n const ruled = (['x', 'y', 'z'] as const).filter(axis => !group.cells[axis])\n const given = (axis: 'x' | 'y' | 'z') => {\n const v = held?.[group.name]?.[['x', 'y', 'z'].indexOf(axis)]\n return v === undefined || !Number.isFinite(v) ? '—' : String(Math.round(v * 10) / 10)\n }\n return html`<div vector-row>\n <label>${i18next.t('figure.label.group-' + group.name)}${group.name === 'rotation' ? '' : html` <span unit>${unit}</span>`}</label>\n <div triple>\n ${(['x', 'y', 'z'] as const).map(\n axis => !group.cells[axis]\n ? html`<div cell held title=${i18next.t('figure.text.axis-held-by-rule')}>\n <span axis>${axis.toUpperCase()}</span>\n <input type=\"text\" readonly .value=${given(axis)} aria-label=${`${group.name}.${axis} · ${i18next.t('figure.text.axis-held-by-rule')}`} />\n </div>`\n : html`<div cell>\n <span axis ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(group.cells[axis] as never, e, unavailable)}>${axis.toUpperCase()}</span>\n <input\n aria-label=${group.cells[axis]!.id}\n type=\"number\"\n step=\"any\"\n .value=${String(group.cells[axis]!.value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(group.cells[axis] as never, e)}\n @change=${(e: Event) => this.changeField(group.cells[axis] as never, e)}\n />\n </div>`\n )}\n </div>\n </div>\n`\n }\n /**\n * Why a row's numbers cannot be typed, said once under the rows by what decides them (user 2026-10-01: \"set by a\n * rule\" named nothing): a fastened part's place and turn are its fastening's; other numbers are worked out from\n * something else. A size that follows something is said at the panel's head, so not again here.\n */\n private renderHeldAxes(vectors: FieldGroup[]) {\n const fastened = !!(this.asset() as FigureAsset | undefined)?.joints?.some(j => j.body1.part === ownerOf(this.selected))\n const held = vectors.filter(g => g.kind === 'vector' && g.name !== 'size' && (['x', 'y', 'z'] as const).some(axis => !g.cells[axis]))\n if (!held.length) return nothing\n const placed = held.every(g => g.name === 'position' || g.name === 'rotation')\n if (fastened && placed) return html`<p hint held-axes>${i18next.t('figure.text.held-by-fastening')}</p>`\n return html`<p hint held-axes>${i18next.t('figure.text.held-worked-out', { group: held.map(g => i18next.t('figure.label.group-' + g.name)).join(' · ') })}</p>`\n }\n /**\n * A part's fields only the declared room still reads (ADR-0097, designer 2026-09-27): shown as what they are and not\n * typed into -- they move nothing. Declaring the room again is offered; nothing is deleted or widened on the way.\n */\n private renderRoomOnly(fields: FieldLike[], unavailable: boolean) {\n return html`<section room-only>\n <h3>${i18next.t('figure.label.room-only-inputs')}</h3>\n <p hint>${i18next.t('figure.text.room-only-inputs')}</p>\n <div form>\n ${fields.map(\n f => html`<span>${fieldWordsOf(f.id, key => i18next.t(key))} (${f.unit})</span><input aria-label=${f.id} type=\"number\" .value=${String(f.value)} disabled />`\n )}\n </div>\n <button act room-refit ?disabled=${unavailable} @click=${() => this.askRoomRefit()}><md-icon>fit_screen</md-icon>${i18next.t('figure.button.room-refit')}</button>\n </section>`\n }\n /** The room as declared and as proposed, and what lies outside each as measured, before the author confirms. */\n private async askRoomRefit() {\n let refit\n try {\n refit = figureRoomRefitOf(parseFigureAsset(this.session!.source()))\n } catch (error) {\n this.error = this.said(error)\n return\n }\n if (!refit) return\n const rows = roomRefitRowsOf(refit)\n const outside = (list: typeof refit.outside.declared) =>\n list.length\n ? list.map(o => i18next.t('figure.text.room-part-outside', { part: partLabelOf(o.part), axis: o.axis.toUpperCase(), mm: String(o.mm) })).join(' · ')\n : i18next.t('figure.text.room-nothing-outside')\n const agreed = await OxPrompt.open({\n type: 'question',\n title: i18next.t('figure.label.room-refit'),\n template: html`<table room-refit>\n <tr><th></th><th>${i18next.t('figure.label.room-declared')}</th><th>${i18next.t('figure.label.room-proposed')}</th></tr>\n ${rows.map(\n r => html`<tr>\n <td>${i18next.t(`figure.label.room-at-${r.at}`)} ${r.axis.toUpperCase()}</td>\n <td>${r.declared}</td>\n <td>${r.same ? i18next.t('figure.text.room-same') : r.proposed}</td>\n </tr>`\n )}\n </table>\n <p>${i18next.t('figure.label.room-declared')}: ${outside(refit.outside.declared)}</p>\n <p>${i18next.t('figure.label.room-proposed')}: ${outside(refit.outside.proposed)}</p>\n ${refit.drops.length\n ? html`<p>${i18next.t('figure.text.room-drops', { fields: [...new Set(refit.drops.map(id => `${partLabelOf(id.split('.')[0]!)} ${fieldWordsOf(id, key => i18next.t(key))}`))].join(' · ') })}</p>`\n : nothing}`,\n confirmButton: { text: i18next.t('figure.button.room-refit-confirm') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n })\n if (agreed) this.linkCommand(refit.step)\n }\n private renderSingle(name: string, field: FieldLike, unavailable: boolean) {\n const words = name.split('.').map(part => i18next.t('figure.label.field-' + part, { defaultValue: part }))\n return html`<span ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(field as never, e, unavailable)}>${words.join(' · ')} (${field.unit})</span\n ><input\n aria-label=${field.id}\n type=\"number\"\n step=\"any\"\n .value=${String(field.value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(field as never, e)}\n @change=${(e: Event) => this.changeField(field as never, e)}\n />`\n }\n}\n"]}
|