@things-factory/figure-ui 10.1.50 → 10.1.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"v3-editor.js","sourceRoot":"","sources":["../../client/modeller/v3-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,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,gBAAgB,CAAA;AACvB,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAChC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAChC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAA;AAClE,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAqC,MAAM,eAAe,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAmC,MAAM,gBAAgB,CAAA;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,YAAY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AAK,CAAC,KAAK,CAAC;oBAChB,WAAW;iBACd,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAc,EAAE,CAAC,CAAC;kBAC3C,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAc,EAAE,CAAC,CAAC;SAC1D,CAAA;IACP,CAAC;;AA33B+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CAA2B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAmB;AAEd;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAsB;AAKrB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAA6D;AAC3E;IAAhB,KAAK,EAAE;;gDAAsB;AACb;IAAhB,KAAK,EAAE;;6CAAmB;AACV;IAAhB,KAAK,EAAE;;2CAAoC;AAE3B;IAAhB,KAAK,EAAE;;6CAA4B;AAEnB;IAAhB,KAAK,EAAE;;8CAA4C;AAKnC;IAAhB,KAAK,EAAE;;4CAAyD;AAqBhD;IAAhB,KAAK,EAAE;;mDAAwC;AAE/B;IAAhB,KAAK,EAAE;;4CAAwC;AA/NrC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA8iC1B","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 { customElement, property, state } from 'lit/decorators.js'\nimport { PART_LIMIT, v3PartCountOf } from '@hatiolab/figure-model'\nimport type { V3Asset, V3AuthoringAction, V3InputChange, V3PartEdit, V3PrimitiveCreation } from '@hatiolab/figure-model'\nimport type { V3ProductSession } from './v3-product-session.js'\nimport { captureV3Thumbnail } from './v3-thumbnail.js'\nimport { drawableV3Parts } from './v3-renderer.js'\nimport './v3-canvas.js'\nimport './figure-v3-parts.js'\nimport './figure-v3-material.js'\nimport './figure-v3-links.js'\nimport './figure-v3-controls.js'\nimport './figure-v3-clips.js'\nimport './figure-v3-preview.js'\nimport './figure-settings.js'\nimport { DEFAULT_VIEW, type ViewSettings } from './figure-view.js'\nimport './figure-v3-capability.js'\nimport { gizmoChanges, gizmoReachOf, type GizmoReach, type GizmoResult } from './v3-gizmo.js'\nimport { keyActionOf } from './v3-keys.js'\nimport { groupFields, ownerOf, partLabelOf, repeatOf, type FieldLike, type FieldGroup } from './v3-fields.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { alignChanges, boxOf, canMirror, mirrorChanges, type AlignTool } from './v3-align.js'\nimport type { V3PaletteKind, V3PartRow } from './figure-v3-parts.js'\nimport { paletteRecipe } from './v3-palette.js'\nimport type { FigureV3Canvas } from './v3-canvas.js'\nimport { nudgeOf } from './v3-stage-model.js'\nimport { sizeRangeRefusalOf } from './v3-refusals.js'\nimport type { V3RenderPart } from './v3-renderer.js'\nimport type { V3BudgetLine } from './v3-maturity.js'\nimport { instanceRangeOf, rangeDiffers, turnsAboutAJoint } from './v3-links.js'\nimport { jointFanOf } from './v3-joint-fan.js'\nimport { jointDragOf } from './v3-joint-drag.js'\nimport type { FirstSave } from './v3-first-save.js'\nimport { isLive, livePartsOf, liveOverSession, NOTHING_LIVE, scrubbed, scrubStep, type LiveValues } from './v3-live.js'\n\n\n/**\n * The side's tabs, V2's six in V2's order where V3 has them: properties, what it does (places), motion, the verdict,\n * 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/** Product editor surface. The injected session is shared by page persistence and AI commands. */\n@customElement('figure-v3-editor')\nexport class FigureV3Editor 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 figure-v3-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-v3-parts {\n min-height: 0;\n }\n figure-v3-canvas {\n min-width: 0;\n min-height: 0;\n }\n /* The side: tabs over one panel at a time, each using the whole height (V2's side, and why it had tabs). */\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 align-items: center;\n justify-content: center;\n height: 38px;\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 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, and the way back to the whole figure. */\n div[subject] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px 0;\n }\n div[subject] button[chip] {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: 26px;\n padding: 0 10px 0 6px;\n border-radius: 999em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[subject] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\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 .error {\n padding: 10px;\n background: var(--md-sys-color-error-container);\n color: var(--md-sys-color-on-error-container);\n white-space: pre-wrap;\n }\n .hint {\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.5;\n }\n `]\n @property({ attribute: false }) session?: V3ProductSession\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 (V2's badge). */\n @property({ type: Number }) instances?: number\n /** The cost line the parts list shows, from the maturity report. */\n @property({ attribute: false }) budget?: V3BudgetLine\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 @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 (V2's two modes). */\n @state() private middle: 'edit' | 'preview' = 'edit'\n /**\n * How the workbench shows the figure -- V2's view settings, the board's own state names. The viewer's, kept in\n * their browser, never in the figure.\n */\n @state() private view: ViewSettings = FigureV3Editor.storedView()\n private static storedView(): ViewSettings {\n try {\n const stored = JSON.parse(localStorage.getItem('figure-v3-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-v3-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, as in\n * the V2 modeller: a part hidden here is still in the figure, still checked, still drawn on a board.\n */\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 private lastContext: string | null = null\n /** The modeller's keys (`v3-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 const canvas = this.renderRoot.querySelector<FigureV3Canvas>('figure-v3-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 converted part 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?.gizmo(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 }\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKey, true)\n super.disconnectedCallback()\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 }\n if (view && !view.geometry.some(g => ownerOf(g.id) === this.selected)) this.selected = ''\n }\n private run(action: () => unknown) {\n try {\n action()\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = sizeRangeRefusalOf(error, (key, params) => i18next.t(key, params)) ?? (error instanceof Error ? error.message : String(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 drawableV3Parts>[0] | undefined, asset: unknown) {\n const parts = (asset ? liveOverSession(asset as V3Asset, this.currentInputs(), this.live) : null) ?? drawableV3Parts(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 (`v3-joint-fan`).\n */\n private fanOf(asset: V3Asset | 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?: V3PartEdit) {\n this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) }\n }\n private changed() {\n this.requestUpdate()\n this.dispatchEvent(new CustomEvent('v3-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 `v3-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 captureV3Thumbnail(drawableV3Parts(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 this.error = error instanceof Error ? error.message : String(error)\n } finally {\n this.changed()\n }\n }\n private add(kind: V3PaletteKind) {\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 V3 part edits — each one step of the session's history. The copy and the moved\n * part stay selected, as they do in the V2 list.\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) {\n try {\n this.session!.edit({ kind: 'remove-part', target: id })\n this.error = ''\n if (this.selected === id) this.selected = ''\n this.changed()\n } catch (error) {\n /* The refusal a person meets most: another part stands on this one or follows its size. Said in their words. */\n this.error =\n (error as { code?: string })?.code === 'PART_REFERENCED'\n ? i18next.t('figure.text.part-is-referenced', { part: id })\n : error instanceof Error\n ? error.message\n : String(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 /** 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 return gizmoReachOf(JSON.parse(this.session.source()), id)\n } catch {\n return none\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 V3Asset\n const drawn = view.geometry.find(g => g.id === id) as unknown as V3RenderPart | 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 const changes = gizmoChanges(id, this.reachOf(id), jointed && result.scale ? { scale: result.scale } : result, sizes)\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 (a converted one) 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 V3RenderPart | 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 (V2 scaled any part). */\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 : message\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, as the V2 list makes it. */\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 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 const tool = (name: AlignTool, icon: string, label: string, title: string) =>\n html`<button ?disabled=${unavailable} aria-label=${i18next.t(label)} title=${i18next.t(title)} @click=${() => this.align(name)}>\n <md-icon>${icon}</md-icon>\n </button>`\n return html`<div tools title=${i18next.t('figure.text.tools-explained')}>\n ${tool('centre-x', 'horizontal_distribute', 'figure.button.center-x', 'figure.text.center-on-x')}\n ${tool('centre-z', 'vertical_align_center', 'figure.button.center-z', 'figure.text.center-on-z')}\n ${tool('floor', 'vertical_align_bottom', 'figure.button.to-floor', 'figure.text.put-on-floor')}\n ${(['x', 'z'] as const).map(axis => {\n const able = canMirror(asset as never, this.selected, axis, reach)\n return html`<button\n ?disabled=${unavailable || !able}\n aria-label=${i18next.t('figure.button.mirror-' + axis)}\n title=${i18next.t(able ? 'figure.text.mirror-explained' : 'figure.text.mirror-would-overlap')}\n @click=${() => this.mirror(axis)}\n >\n <md-icon>${axis === 'x' ? 'flip' : 'flip_camera_android'}</md-icon>\n </button>`\n })}\n ${tool('snap', 'grid_on', 'figure.button.snap', 'figure.text.snap-explained')}\n </div>`\n }\n /**\n * A part's name — the V2 part name field. 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 (parity ④ ⑤ ⑥), 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-v3-links\n .asset=${asset}\n .section=${section}\n .partId=${this.selected}\n .dims=${dims}\n ?locked=${unavailable}\n @v3-command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-links>`\n }\n /** The figure's controls: try a value, name it, set its range and travel time, keep the pose (parity row ⑥). */\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-v3-controls\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-state=${(e: CustomEvent) => this.run(() => this.session!.apply([{ kind: 'set-state', input: e.detail.input, unit: e.detail.unit, value: e.detail.value }]))}\n @v3-state-live=${(e: CustomEvent) => this.hold({ [e.detail.input]: e.detail.value })}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-controls>\n <figure-v3-clips\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-states=${(e: CustomEvent) => this.run(() => this.session!.apply(e.detail.changes))}\n @v3-states-live=${(e: CustomEvent) => this.hold(e.detail.values)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-clips>`\n }\n /** One command, one step of the history. A refusal a person can meet here is said in their words. */\n private linkCommand(action: V3AuthoringAction) {\n try {\n this.session!.command(action)\n this.error = ''\n this.changed()\n } catch (error) {\n const code = (error as { code?: string })?.code\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)) ?? (error instanceof Error ? error.message : String(error))\n }\n }\n private changeField(field: { id: string; unit: V3InputChange['unit']; role?: string }, event: Event) {\n const input = event.target as HTMLInputElement,\n value = input.valueAsNumber\n this.run(() =>\n this.session!.apply([\n { kind: field.role === 'state' ? 'set-state' : 'set-design', input: field.id, unit: field.unit, value }\n ])\n )\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: V3InputChange['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> }\n /** The sizes a board may give the figure, and the way to measure them again after its parts changed. */\n private renderInstanceRange(asset: V3Asset | 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 try {\n of = instanceRangeOf(asset)\n } catch {\n of = undefined\n }\n this.range = { at, of }\n }\n const range = this.range.of\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()}</label><span>${mm(range.declared[axis].min)} – ${mm(range.declared[axis].max)} mm</span>\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: V3Asset, unavailable: boolean) {\n if (asset.sizing === 'uniform') return html`<div inline-field><label>${i18next.t('figure.label.sizing-rule')}</label><span>${i18next.t('figure.label.sizing-uniform')}</span></div>`\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 (V2 listed\n * its parts the same way; user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\n private partRows(geometry: readonly { id: string }[]): V3PartRow[] {\n const rows = new Map<string, V3PartRow>()\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 provider: (g as { shape?: { provider?: string } }).shape?.provider ?? '',\n hidden: this.hiddenParts.has(id),\n invisible: (g as { visible?: boolean }).visible === false,\n ...(id !== g.id ? { copies: 1 } : {})\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: V3Asset | undefined) {\n if (!asset) return undefined\n try {\n return { level: asset.detailLevel ?? null, used: v3PartCountOf(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 -- V2's `repeat: { axis, pitch }`.\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: V3Asset | undefined, geometry: readonly { id: string }[], unavailable: boolean) {\n const repeat = repeatOf(this.selected, geometry)\n if (!asset || !repeat || repeat.index) 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 const pitch = asset.designInputs[own] ?? model.constants.find(c => c.id === layout?.args[4])?.value\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 <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 </section>`\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 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 : message\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 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 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 private renderTab(tab: SideTab, icon: string, label: string, badge?: number) {\n return html`<button tab ?on=${this.tab === tab} title=${label} aria-label=${label} @click=${() => (this.tab = tab)}>\n <md-icon>${icon}</md-icon>${badge == null ? '' : html`<span badge>${badge.toLocaleString()}</span>`}\n </button>`\n }\n updated(changed: PropertyValues<this>) {\n super.updated?.(changed)\n const panes = this.renderRoot.querySelector<OxThreePane>('ox-three-pane') ?? undefined\n if (panes !== this.panes) this.panes = panes\n }\n /** Which part the panel speaks of, with the way back to the whole figure. */\n private renderSubject() {\n if (!this.selected) return null\n return html`<div subject>\n <button chip title=${i18next.t('figure.button.whole-figure')} @click=${() => (this.selected = '')}>\n <md-icon>arrow_back</md-icon>${i18next.t('figure.button.whole-figure')}\n </button>\n </div>`\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 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<FigureV3Canvas>('figure-v3-canvas')?.fit()}\n >\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 <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.error || view.error ? html`<div role=\"alert\" class=\"error\">${this.error || view.error}</div>` : null}\n <ox-three-pane>\n <figure-v3-parts\n slot=\"start\"\n .budget=${this.budget}\n @show-maturity=${() => (this.tab = 'verdict')}\n .parts=${this.partRows(view.geometry)}\n .partBudget=${this.partBudgetOf(asset as V3Asset | undefined)}\n @set-detail-level=${(e: CustomEvent) => this.linkCommand({ kind: 'set-detail-level', level: e.detail.level })}\n .selected=${this.selected}\n ?locked=${unavailable}\n @add-part=${(e: CustomEvent) => this.add(e.detail.kind)}\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-v3-parts>\n ${this.middle === 'preview'\n ? html`<figure-v3-preview\n .asset=${asset}\n .context=${view.context ?? ''}\n .view=${this.view}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-preview>`\n : html`<figure-v3-canvas\n .view=${this.view}\n .parts=${this.drawnParts(view.geometry, asset)}\n .fan=${this.fanOf(asset as V3Asset | undefined)}\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-v3-canvas>`}\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)}\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 V3Asset | undefined, view.geometry, unavailable)}\n ${this.renderGroups(groupFields(own, this.selected), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable))}\n ${this.renderLinks(unavailable, 'shape')}\n <figure-v3-material\n .body=${{ ...part, id: this.selected }}\n .palette=${view.palette ?? {}}\n ?locked=${unavailable}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n @v3-part-live=${(e: CustomEvent) => this.hold({}, e.detail.edit)}\n ></figure-v3-material>`\n : html`<slot name=\"figure\"></slot>\n ${this.renderGroups(groupFields(common), 'figure.label.group-figure-size', 'figure.label.design-inputs', unavailable)}\n ${this.renderInstanceRange(asset as V3Asset | undefined, unavailable)}`}\n </div>\n <div panel ?off=${tab !== 'capability'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'places') : null}\n <figure-v3-capability\n .asset=${asset}\n .selected=${this.selected}\n ?locked=${unavailable}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-capability>\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 ) {\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))}\n ${tools ? html`<div vector-row><label>${i18next.t('figure.label.tools')}</label>${tools}</div>` : 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 private renderVector(group: FieldGroup, unavailable: boolean) {\n if (group.kind !== 'vector') return nothing\n const unit = group.cells.x.unit === 'deg' ? '°' : group.cells.x.unit\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 => 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 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"]}
1
+ {"version":3,"file":"v3-editor.js","sourceRoot":"","sources":["../../client/modeller/v3-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,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,gBAAgB,CAAA;AACvB,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAChC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,yBAAyB,CAAA;AAChC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAA;AAClE,OAAO,2BAA2B,CAAA;AAClC,OAAO,EA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A/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAsB;AAKrB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAA6D;AAC3E;IAAhB,KAAK,EAAE;;gDAAsB;AACb;IAAhB,KAAK,EAAE;;6CAAmB;AACV;IAAhB,KAAK,EAAE;;2CAAoC;AAE3B;IAAhB,KAAK,EAAE;;6CAA4B;AAEnB;IAAhB,KAAK,EAAE;;8CAA4C;AAKnC;IAAhB,KAAK,EAAE;;4CAAyD;AAqBhD;IAAhB,KAAK,EAAE;;mDAAwC;AAE/B;IAAhB,KAAK,EAAE;;4CAAwC;AA/NrC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAmjC1B","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 { customElement, property, state } from 'lit/decorators.js'\nimport { PART_LIMIT, v3PartCountOf } from '@hatiolab/figure-model'\nimport type { V3Asset, V3AuthoringAction, V3InputChange, V3PartEdit, V3PrimitiveCreation } from '@hatiolab/figure-model'\nimport type { V3ProductSession } from './v3-product-session.js'\nimport { captureV3Thumbnail } from './v3-thumbnail.js'\nimport { drawableV3Parts } from './v3-renderer.js'\nimport './v3-canvas.js'\nimport './figure-v3-parts.js'\nimport './figure-v3-material.js'\nimport './figure-v3-links.js'\nimport './figure-v3-controls.js'\nimport './figure-v3-clips.js'\nimport './figure-v3-preview.js'\nimport './figure-settings.js'\nimport { DEFAULT_VIEW, type ViewSettings } from './figure-view.js'\nimport './figure-v3-capability.js'\nimport { gizmoChanges, gizmoReachOf, type GizmoReach, type GizmoResult } from './v3-gizmo.js'\nimport { keyActionOf } from './v3-keys.js'\nimport { groupFields, ownerOf, partLabelOf, repeatOf, type FieldLike, type FieldGroup } from './v3-fields.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { alignChanges, boxOf, canMirror, mirrorChanges, type AlignTool } from './v3-align.js'\nimport type { V3PaletteKind, V3PartRow } from './figure-v3-parts.js'\nimport { paletteRecipe } from './v3-palette.js'\nimport type { FigureV3Canvas } from './v3-canvas.js'\nimport { nudgeOf } from './v3-stage-model.js'\nimport { sizeRangeRefusalOf } from './v3-refusals.js'\nimport type { V3RenderPart } from './v3-renderer.js'\nimport type { V3BudgetLine } from './v3-maturity.js'\nimport { instanceRangeOf, rangeDiffers, turnsAboutAJoint } from './v3-links.js'\nimport { jointFanOf } from './v3-joint-fan.js'\nimport { jointDragOf } from './v3-joint-drag.js'\nimport type { FirstSave } from './v3-first-save.js'\nimport { isLive, livePartsOf, liveOverSession, NOTHING_LIVE, scrubbed, scrubStep, type LiveValues } from './v3-live.js'\n\n\n/**\n * The side's tabs, V2's six in V2's order where V3 has them: properties, what it does (places), motion, the verdict,\n * 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/** Product editor surface. The injected session is shared by page persistence and AI commands. */\n@customElement('figure-v3-editor')\nexport class FigureV3Editor 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 figure-v3-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-v3-parts {\n min-height: 0;\n }\n figure-v3-canvas {\n min-width: 0;\n min-height: 0;\n }\n /* The side: tabs over one panel at a time, each using the whole height (V2's side, and why it had tabs). */\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 align-items: center;\n justify-content: center;\n height: 38px;\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 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, and the way back to the whole figure. */\n div[subject] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px 0;\n }\n div[subject] button[chip] {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: 26px;\n padding: 0 10px 0 6px;\n border-radius: 999em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[subject] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\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 .error {\n padding: 10px;\n background: var(--md-sys-color-error-container);\n color: var(--md-sys-color-on-error-container);\n white-space: pre-wrap;\n }\n .hint {\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.5;\n }\n `]\n @property({ attribute: false }) session?: V3ProductSession\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 (V2's badge). */\n @property({ type: Number }) instances?: number\n /** The cost line the parts list shows, from the maturity report. */\n @property({ attribute: false }) budget?: V3BudgetLine\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 @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 (V2's two modes). */\n @state() private middle: 'edit' | 'preview' = 'edit'\n /**\n * How the workbench shows the figure -- V2's view settings, the board's own state names. The viewer's, kept in\n * their browser, never in the figure.\n */\n @state() private view: ViewSettings = FigureV3Editor.storedView()\n private static storedView(): ViewSettings {\n try {\n const stored = JSON.parse(localStorage.getItem('figure-v3-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-v3-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, as in\n * the V2 modeller: a part hidden here is still in the figure, still checked, still drawn on a board.\n */\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 private lastContext: string | null = null\n /** The modeller's keys (`v3-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 const canvas = this.renderRoot.querySelector<FigureV3Canvas>('figure-v3-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 converted part 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?.gizmo(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 }\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKey, true)\n super.disconnectedCallback()\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 }\n if (view && !view.geometry.some(g => ownerOf(g.id) === this.selected)) this.selected = ''\n }\n private run(action: () => unknown) {\n try {\n action()\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = sizeRangeRefusalOf(error, (key, params) => i18next.t(key, params)) ?? (error instanceof Error ? error.message : String(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 drawableV3Parts>[0] | undefined, asset: unknown) {\n const parts = (asset ? liveOverSession(asset as V3Asset, this.currentInputs(), this.live) : null) ?? drawableV3Parts(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 (`v3-joint-fan`).\n */\n private fanOf(asset: V3Asset | 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?: V3PartEdit) {\n this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) }\n }\n private changed() {\n this.requestUpdate()\n this.dispatchEvent(new CustomEvent('v3-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 `v3-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 captureV3Thumbnail(drawableV3Parts(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 this.error = error instanceof Error ? error.message : String(error)\n } finally {\n this.changed()\n }\n }\n private add(kind: V3PaletteKind) {\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 V3 part edits — each one step of the session's history. The copy and the moved\n * part stay selected, as they do in the V2 list.\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) {\n try {\n this.session!.edit({ kind: 'remove-part', target: id })\n this.error = ''\n if (this.selected === id) this.selected = ''\n this.changed()\n } catch (error) {\n /* The refusal a person meets most: another part stands on this one or follows its size. Said in their words. */\n this.error =\n (error as { code?: string })?.code === 'PART_REFERENCED'\n ? i18next.t('figure.text.part-is-referenced', { part: id })\n : error instanceof Error\n ? error.message\n : String(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 /** 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 return gizmoReachOf(JSON.parse(this.session.source()), id)\n } catch {\n return none\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 V3Asset\n const drawn = view.geometry.find(g => g.id === id) as unknown as V3RenderPart | 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 const changes = gizmoChanges(id, this.reachOf(id), jointed && result.scale ? { scale: result.scale } : result, sizes)\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 (a converted one) 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 V3RenderPart | 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 (V2 scaled any part). */\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 : message\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, as the V2 list makes it. */\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 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 const tool = (name: AlignTool, icon: string, label: string, title: string) =>\n html`<button ?disabled=${unavailable} aria-label=${i18next.t(label)} title=${i18next.t(title)} @click=${() => this.align(name)}>\n <md-icon>${icon}</md-icon>\n </button>`\n return html`<div tools title=${i18next.t('figure.text.tools-explained')}>\n ${tool('centre-x', 'horizontal_distribute', 'figure.button.center-x', 'figure.text.center-on-x')}\n ${tool('centre-z', 'vertical_align_center', 'figure.button.center-z', 'figure.text.center-on-z')}\n ${tool('floor', 'vertical_align_bottom', 'figure.button.to-floor', 'figure.text.put-on-floor')}\n ${(['x', 'z'] as const).map(axis => {\n const able = canMirror(asset as never, this.selected, axis, reach)\n return html`<button\n ?disabled=${unavailable || !able}\n aria-label=${i18next.t('figure.button.mirror-' + axis)}\n title=${i18next.t(able ? 'figure.text.mirror-explained' : 'figure.text.mirror-would-overlap')}\n @click=${() => this.mirror(axis)}\n >\n <md-icon>${axis === 'x' ? 'flip' : 'flip_camera_android'}</md-icon>\n </button>`\n })}\n ${tool('snap', 'grid_on', 'figure.button.snap', 'figure.text.snap-explained')}\n </div>`\n }\n /**\n * A part's name — the V2 part name field. 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 (parity ④ ⑤ ⑥), 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-v3-links\n .asset=${asset}\n .section=${section}\n .partId=${this.selected}\n .dims=${dims}\n ?locked=${unavailable}\n @v3-command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-links>`\n }\n /** The figure's controls: try a value, name it, set its range and travel time, keep the pose (parity row ⑥). */\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-v3-controls\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-state=${(e: CustomEvent) => this.run(() => this.session!.apply([{ kind: 'set-state', input: e.detail.input, unit: e.detail.unit, value: e.detail.value }]))}\n @v3-state-live=${(e: CustomEvent) => this.hold({ [e.detail.input]: e.detail.value })}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-controls>\n <figure-v3-clips\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-states=${(e: CustomEvent) => this.run(() => this.session!.apply(e.detail.changes))}\n @v3-states-live=${(e: CustomEvent) => this.hold(e.detail.values)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-clips>`\n }\n /** One command, one step of the history. A refusal a person can meet here is said in their words. */\n private linkCommand(action: V3AuthoringAction) {\n try {\n this.session!.command(action)\n this.error = ''\n this.changed()\n } catch (error) {\n const code = (error as { code?: string })?.code\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)) ?? (error instanceof Error ? error.message : String(error))\n }\n }\n private changeField(field: { id: string; unit: V3InputChange['unit']; role?: string }, event: Event) {\n const input = event.target as HTMLInputElement,\n value = input.valueAsNumber\n this.run(() =>\n this.session!.apply([\n { kind: field.role === 'state' ? 'set-state' : 'set-design', input: field.id, unit: field.unit, value }\n ])\n )\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: V3InputChange['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> }\n /** The sizes a board may give the figure, and the way to measure them again after its parts changed. */\n private renderInstanceRange(asset: V3Asset | 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 try {\n of = instanceRangeOf(asset)\n } catch {\n of = undefined\n }\n this.range = { at, of }\n }\n const range = this.range.of\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()}</label><span>${mm(range.declared[axis].min)} – ${mm(range.declared[axis].max)} mm</span>\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: V3Asset, unavailable: boolean) {\n if (asset.sizing === 'uniform') return html`<div inline-field><label>${i18next.t('figure.label.sizing-rule')}</label><span>${i18next.t('figure.label.sizing-uniform')}</span></div>`\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 (V2 listed\n * its parts the same way; user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\n private partRows(geometry: readonly { id: string }[]): V3PartRow[] {\n const rows = new Map<string, V3PartRow>()\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 provider: (g as { shape?: { provider?: string } }).shape?.provider ?? '',\n hidden: this.hiddenParts.has(id),\n invisible: (g as { visible?: boolean }).visible === false,\n ...(id !== g.id ? { copies: 1 } : {})\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: V3Asset | undefined) {\n if (!asset) return undefined\n try {\n return { level: asset.detailLevel ?? null, used: v3PartCountOf(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 -- V2's `repeat: { axis, pitch }`.\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: V3Asset | undefined, geometry: readonly { id: string }[], unavailable: boolean) {\n const repeat = repeatOf(this.selected, geometry)\n if (!asset || !repeat || repeat.index) 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 const pitch = asset.designInputs[own] ?? model.constants.find(c => c.id === layout?.args[4])?.value\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 <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 ${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 /**\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 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 : message\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 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 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 private renderTab(tab: SideTab, icon: string, label: string, badge?: number) {\n return html`<button tab ?on=${this.tab === tab} title=${label} aria-label=${label} @click=${() => (this.tab = tab)}>\n <md-icon>${icon}</md-icon>${badge == null ? '' : html`<span badge>${badge.toLocaleString()}</span>`}\n </button>`\n }\n updated(changed: PropertyValues<this>) {\n super.updated?.(changed)\n const panes = this.renderRoot.querySelector<OxThreePane>('ox-three-pane') ?? undefined\n if (panes !== this.panes) this.panes = panes\n }\n /** Which part the panel speaks of, with the way back to the whole figure. */\n private renderSubject() {\n if (!this.selected) return null\n return html`<div subject>\n <button chip title=${i18next.t('figure.button.whole-figure')} @click=${() => (this.selected = '')}>\n <md-icon>arrow_back</md-icon>${i18next.t('figure.button.whole-figure')}\n </button>\n </div>`\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 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<FigureV3Canvas>('figure-v3-canvas')?.fit()}\n >\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 <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.error || view.error ? html`<div role=\"alert\" class=\"error\">${this.error || view.error}</div>` : null}\n <ox-three-pane>\n <figure-v3-parts\n slot=\"start\"\n .budget=${this.budget}\n @show-maturity=${() => (this.tab = 'verdict')}\n .parts=${this.partRows(view.geometry)}\n .partBudget=${this.partBudgetOf(asset as V3Asset | undefined)}\n @set-detail-level=${(e: CustomEvent) => this.linkCommand({ kind: 'set-detail-level', level: e.detail.level })}\n .selected=${this.selected}\n ?locked=${unavailable}\n @add-part=${(e: CustomEvent) => this.add(e.detail.kind)}\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-v3-parts>\n ${this.middle === 'preview'\n ? html`<figure-v3-preview\n .asset=${asset}\n .context=${view.context ?? ''}\n .view=${this.view}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-preview>`\n : html`<figure-v3-canvas\n .view=${this.view}\n .parts=${this.drawnParts(view.geometry, asset)}\n .fan=${this.fanOf(asset as V3Asset | undefined)}\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-v3-canvas>`}\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)}\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 V3Asset | undefined, view.geometry, unavailable)}\n ${this.renderGroups(groupFields(own, this.selected), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable))}\n ${this.renderLinks(unavailable, 'shape')}\n <figure-v3-material\n .body=${{ ...part, id: this.selected }}\n .palette=${view.palette ?? {}}\n ?locked=${unavailable}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n @v3-part-live=${(e: CustomEvent) => this.hold({}, e.detail.edit)}\n ></figure-v3-material>`\n : html`<slot name=\"figure\"></slot>\n ${this.renderGroups(groupFields(common), 'figure.label.group-figure-size', 'figure.label.design-inputs', unavailable)}\n ${this.renderInstanceRange(asset as V3Asset | undefined, unavailable)}`}\n </div>\n <div panel ?off=${tab !== 'capability'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'places') : null}\n <figure-v3-capability\n .asset=${asset}\n .selected=${this.selected}\n ?locked=${unavailable}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-capability>\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 ) {\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))}\n ${tools ? html`<div vector-row><label>${i18next.t('figure.label.tools')}</label>${tools}</div>` : 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 private renderVector(group: FieldGroup, unavailable: boolean) {\n if (group.kind !== 'vector') return nothing\n const unit = group.cells.x.unit === 'deg' ? '°' : group.cells.x.unit\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 => 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 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"]}
@@ -43,20 +43,46 @@ export declare function canFollow(asset: V3Asset, part: string): boolean;
43
43
  export declare function followableAxes(asset: V3Asset, part: string): Axis[];
44
44
  /** What a part's own measure on an axis is now (a box's side, a cylinder's radius or length), at the design as it stands. */
45
45
  export declare function dimensionNow(asset: V3Asset, part: string, axis: Axis): number | undefined;
46
- /** Whether `attach` can take this part: a box, or a cylinder (figure-model measures its faces since 0.1.47). */
46
+ /**
47
+ * The flat faces a part's shape declares, by name -- figure-model's shape definitions are the one place they are
48
+ * written (a portal's opening sides as well as its outer faces). A sphere has none.
49
+ */
50
+ export declare function facesOf(asset: V3Asset, part: string): string[];
51
+ /** The axis a face of a part faces along, from the same definitions. */
52
+ export declare function faceAxisOf(asset: V3Asset, part: string, face: string): Axis | undefined;
53
+ /** Whether `attach` can take this part: any part whose shape has a flat face. */
47
54
  export declare function canFasten(asset: V3Asset, part: string): boolean;
55
+ /**
56
+ * The axes a part can be made a row along (r3 §8, figure-model `make-repeat`): across the face it is fastened by, when
57
+ * it is fastened fixed to another part and holds nothing. None for a part that is loose, moves, stands on the floor or
58
+ * already repeats -- the command would refuse those, so they are not offered.
59
+ */
60
+ export declare function rowAxesOf(asset: V3Asset, part: string): Axis[];
61
+ /** The row a part is made into, as its fastening's record keeps it. */
62
+ export declare const rowOf: (asset: V3Asset, part: string) => {
63
+ axis: import("@hatiolab/figure-model").V3JointAxis;
64
+ pitch: number;
65
+ count?: number;
66
+ } | undefined;
48
67
  /** Where a part sits across the face it is fastened to, on one axis: centred, level with an edge, or a distance off centre. */
49
68
  export type Alignment = 'centre' | 'min' | 'max' | 'mm';
50
69
  /**
51
- * The axes across the face a part is fastened to — the two a fastening does not set by itself. On the plane the figure is
52
- * mounted on these are X and Z, and the plane has no edges, so only centred or a distance is offered there.
70
+ * The axes across the face a part is fastened to — the two a fastening does not set by itself. Edges to line up with
71
+ * are offered where both parts have their two outer faces on that axis; the plane the figure is mounted on has none,
72
+ * so on it (X and Z) only centred or a distance is offered.
53
73
  */
54
- export declare function alignAxesOf(target: V3Face | 'plane'): {
74
+ export declare function alignAxesOf(asset: V3Asset, part: string, target: {
75
+ part: string;
76
+ face: string;
77
+ } | 'plane', twisted?: boolean): {
55
78
  axis: Axis;
56
79
  edges: boolean;
57
80
  }[];
58
81
  /** The `align` of an attach command from the form's choices: only the axes across that face, and centred ones left out. */
59
- export declare function alignOf(target: V3Face | 'plane', how: Partial<Record<Axis, Alignment>>, mm: Partial<Record<Axis, number>>): Partial<Record<Axis, "min" | "max" | {
82
+ export declare function alignOf(asset: V3Asset, part: string, target: {
83
+ part: string;
84
+ face: string;
85
+ } | 'plane', how: Partial<Record<Axis, Alignment>>, mm: Partial<Record<Axis, number>>, twisted?: boolean): Partial<Record<Axis, "min" | "max" | {
60
86
  mm: number;
61
87
  }>> | undefined;
62
88
  /**
@@ -1,4 +1,4 @@
1
- import { V3_FACES, compileV3Graph, defaultInstanceSizeRange, foldInstanceSizeRange, v3AttachmentsOf, v3BindingsOf, v3InstanceSizeLimitsOf } from '@hatiolab/figure-model';
1
+ import { V3_FACES, v3ShapeFaces, compileV3Graph, defaultInstanceSizeRange, foldInstanceSizeRange, v3AttachmentsOf, v3BindingsOf, v3InstanceSizeLimitsOf } from '@hatiolab/figure-model';
2
2
  export const AXES = ['x', 'y', 'z'];
3
3
  const modelOf = (asset) => asset.document.model;
4
4
  /**
@@ -96,25 +96,59 @@ export function dimensionNow(asset, part, axis) {
96
96
  return undefined;
97
97
  }
98
98
  }
99
- /** Whether `attach` can take this part: a box, or a cylinder (figure-model measures its faces since 0.1.47). */
100
- export function canFasten(asset, part) {
99
+ /**
100
+ * The flat faces a part's shape declares, by name -- figure-model's shape definitions are the one place they are
101
+ * written (a portal's opening sides as well as its outer faces). A sphere has none.
102
+ */
103
+ export function facesOf(asset, part) {
101
104
  const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`);
102
- return canFollow(asset, part) || shape?.op === 'cylinder-shape@1';
105
+ return Object.keys((shape && v3ShapeFaces(shape.op)) ?? {});
106
+ }
107
+ /** The axis a face of a part faces along, from the same definitions. */
108
+ export function faceAxisOf(asset, part, face) {
109
+ const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`);
110
+ return (shape && v3ShapeFaces(shape.op)?.[face]?.axis);
111
+ }
112
+ /** Whether `attach` can take this part: any part whose shape has a flat face. */
113
+ export function canFasten(asset, part) {
114
+ return facesOf(asset, part).length > 0;
103
115
  }
116
+ const OUTER = { x: ['left', 'right'], y: ['bottom', 'top'], z: ['back', 'front'] };
104
117
  /**
105
- * The axes across the face a part is fastened to — the two a fastening does not set by itself. On the plane the figure is
106
- * mounted on these are X and Z, and the plane has no edges, so only centred or a distance is offered there.
118
+ * The axes a part can be made a row along (r3 §8, figure-model `make-repeat`): across the face it is fastened by, when
119
+ * it is fastened fixed to another part and holds nothing. None for a part that is loose, moves, stands on the floor or
120
+ * already repeats -- the command would refuse those, so they are not offered.
107
121
  */
108
- export function alignAxesOf(target) {
122
+ export function rowAxesOf(asset, part) {
123
+ const joints = asset.joints ?? [];
124
+ const j = joints.find(o => o.body1.part === part);
125
+ if (!j || j.type !== 'fixed' || j.repeat || !('part' in j.body0))
126
+ return [];
127
+ if (joints.some(o => 'part' in o.body0 && o.body0.part === part))
128
+ return [];
129
+ return AXES.filter(axis => axis !== V3_FACES[j.body1.face]);
130
+ }
131
+ /** The row a part is made into, as its fastening's record keeps it. */
132
+ export const rowOf = (asset, part) => asset.joints?.find(o => o.body1.part === part)?.repeat;
133
+ /**
134
+ * The axes across the face a part is fastened to — the two a fastening does not set by itself. Edges to line up with
135
+ * are offered where both parts have their two outer faces on that axis; the plane the figure is mounted on has none,
136
+ * so on it (X and Z) only centred or a distance is offered.
137
+ */
138
+ export function alignAxesOf(asset, part, target, twisted = false) {
109
139
  if (target === 'plane')
110
140
  return ['x', 'z'].map(axis => ({ axis, edges: false }));
111
- const along = V3_FACES[target];
112
- return AXES.filter(axis => axis !== along).map(axis => ({ axis, edges: true }));
141
+ const along = faceAxisOf(asset, target.part, target.face);
142
+ if (!along)
143
+ return [];
144
+ const theirs = new Set(facesOf(asset, target.part)), mine = new Set(facesOf(asset, part));
145
+ /* A part twisted about the face's normal has no side level with the target's edges. */
146
+ return AXES.filter(axis => axis !== along).map(axis => ({ axis, edges: !twisted && OUTER[axis].every(f => theirs.has(f) && mine.has(f)) }));
113
147
  }
114
148
  /** The `align` of an attach command from the form's choices: only the axes across that face, and centred ones left out. */
115
- export function alignOf(target, how, mm) {
149
+ export function alignOf(asset, part, target, how, mm, twisted = false) {
116
150
  const align = {};
117
- for (const { axis, edges } of alignAxesOf(target)) {
151
+ for (const { axis, edges } of alignAxesOf(asset, part, target, twisted)) {
118
152
  const one = how[axis] ?? 'centre';
119
153
  if (one === 'mm' && mm[axis])
120
154
  align[axis] = { mm: mm[axis] };