@things-factory/figure-ui 10.1.68 → 10.1.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/client/graphql/index.ts +89 -0
  2. package/client/modeller/figure-v3-links.ts +73 -7
  3. package/client/modeller/figure-v3-parts.ts +153 -2
  4. package/client/modeller/v3-editor.ts +133 -5
  5. package/client/modeller/v3-gizmo.ts +18 -2
  6. package/client/modeller/v3-links.ts +71 -2
  7. package/client/modeller/v3-palette.ts +2 -1
  8. package/client/modeller/v3-product-session.ts +8 -0
  9. package/client/modeller/v3-recipes.ts +69 -0
  10. package/client/pages/figure-recipe-page.ts +338 -0
  11. package/client/pages/figure-v3-modeller-page.ts +25 -2
  12. package/client/route.ts +4 -0
  13. package/dist-client/graphql/index.d.ts +21 -0
  14. package/dist-client/graphql/index.js +75 -0
  15. package/dist-client/graphql/index.js.map +1 -1
  16. package/dist-client/modeller/figure-v3-capability.d.ts +1 -1
  17. package/dist-client/modeller/figure-v3-clips.d.ts +1 -1
  18. package/dist-client/modeller/figure-v3-controls.d.ts +1 -1
  19. package/dist-client/modeller/figure-v3-links.d.ts +11 -1
  20. package/dist-client/modeller/figure-v3-links.js +69 -8
  21. package/dist-client/modeller/figure-v3-links.js.map +1 -1
  22. package/dist-client/modeller/figure-v3-material.d.ts +1 -1
  23. package/dist-client/modeller/figure-v3-parts.d.ts +15 -1
  24. package/dist-client/modeller/figure-v3-parts.js +166 -1
  25. package/dist-client/modeller/figure-v3-parts.js.map +1 -1
  26. package/dist-client/modeller/figure-v3-properties.d.ts +1 -1
  27. package/dist-client/modeller/v3-clips.d.ts +1 -1
  28. package/dist-client/modeller/v3-editor.d.ts +26 -0
  29. package/dist-client/modeller/v3-editor.js +147 -4
  30. package/dist-client/modeller/v3-editor.js.map +1 -1
  31. package/dist-client/modeller/v3-gizmo.d.ts +6 -0
  32. package/dist-client/modeller/v3-gizmo.js +20 -2
  33. package/dist-client/modeller/v3-gizmo.js.map +1 -1
  34. package/dist-client/modeller/v3-links.d.ts +27 -0
  35. package/dist-client/modeller/v3-links.js +68 -2
  36. package/dist-client/modeller/v3-links.js.map +1 -1
  37. package/dist-client/modeller/v3-palette.js +2 -1
  38. package/dist-client/modeller/v3-palette.js.map +1 -1
  39. package/dist-client/modeller/v3-product-session.d.ts +34 -0
  40. package/dist-client/modeller/v3-product-session.js +8 -0
  41. package/dist-client/modeller/v3-product-session.js.map +1 -1
  42. package/dist-client/modeller/v3-recipes.d.ts +26 -0
  43. package/dist-client/modeller/v3-recipes.js +69 -0
  44. package/dist-client/modeller/v3-recipes.js.map +1 -0
  45. package/dist-client/pages/figure-recipe-page.d.ts +41 -0
  46. package/dist-client/pages/figure-recipe-page.js +352 -0
  47. package/dist-client/pages/figure-recipe-page.js.map +1 -0
  48. package/dist-client/pages/figure-v3-modeller-page.d.ts +4 -0
  49. package/dist-client/pages/figure-v3-modeller-page.js +29 -2
  50. package/dist-client/pages/figure-v3-modeller-page.js.map +1 -1
  51. package/dist-client/route.d.ts +1 -1
  52. package/dist-client/route.js +3 -0
  53. package/dist-client/route.js.map +1 -1
  54. package/dist-client/tsconfig.fui.tsbuildinfo +1 -1
  55. package/dist-client/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +5 -5
  57. package/test/browser/modeller-page.js +15 -1
  58. package/test/browser/modeller.check.mjs +217 -2
  59. package/test/modeller-route.test.ts +9 -0
  60. package/test/v3-gizmo.test.ts +44 -0
  61. package/test/v3-links.test.ts +91 -1
  62. package/test/v3-recipes.test.ts +60 -0
  63. package/things-factory.config.js +1 -0
  64. package/translations/en.json +40 -8
  65. package/translations/ja.json +40 -8
  66. package/translations/ko.json +40 -8
  67. package/translations/ms.json +40 -8
  68. package/translations/zh.json +40 -8
@@ -1 +1 @@
1
- {"version":3,"file":"figure-v3-links.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-links.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,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C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;6CAAe;AAE/B;IAAX,QAAQ,EAAE;;8CAAiD;AAE3C;IAAhB,KAAK,EAAE;;6CAA+B;AACtB;IAAhB,KAAK,EAAE;;6CAA2C;AAClC;IAAhB,KAAK,EAAE;;4CAA6B;AACpB;IAAhB,KAAK,EAAE;;0CAAyB;AAEhB;IAAhB,KAAK,EAAE;;oDAA8B;AA9C3B,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAwgBzB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { V3_FACES } from '@hatiolab/figure-model'\nimport type { V3Asset, V3AuthoringAction, V3DimensionSource, V3Face } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n alignAxesOf,\n mountingPlaneOf,\n alignOf,\n AXES,\n canFasten,\n facesOf,\n canFollow,\n dimensionNow,\n followableAxes,\n positionIsShare,\n choiceOf,\n fastenedTo,\n heldBy,\n followOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionJoint,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n positionsWorkedOut,\n type Alignment,\n type Axis,\n type Follow,\n type MotionForm\n} from './v3-links.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { HelpToggles } from './v3-help.js'\n\nconst FACES = Object.keys(V3_FACES) as V3Face[]\n\nconst freshFasten = () => ({\n face: 'bottom' as V3Face,\n toPlane: false,\n target: '',\n targetFace: 'top' as V3Face,\n facing: 'meet' as 'meet' | 'flush',\n gap: 0,\n twist: 0,\n align: {} as Partial<Record<Axis, Alignment>>,\n alignMm: {} as Partial<Record<Axis, number>>\n})\nconst freshMotion = (): MotionForm => ({ kind: 'slide', axis: 'x', id: '', min: 0, max: 500, follow: '', multiplier: 1, offset: 0, travel: '', travelPlus: 0 })\nconst freshRow = () => ({ axis: '' as Axis | '', pitch: 200, fills: true, count: 5 })\nconst freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as V3Face, label: '', accepts: '', capacity: 1 })\n\n/**\n * What a part is tied to — its size response, what it is fastened to, how it moves.\n *\n * 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets\n * a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that\n * happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the\n * parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.\n *\n * The sections are dimensions, placement and joint, in that order. Every\n * change is one figure-model authoring command, sent as `v3-command` and run by the editor through the session — one\n * step of the undo history. Choices the command would refuse (a round body fastened, a size following an instance\n * size the figure does not declare) are not offered, so the author is not sent into a refusal.\n */\n@customElement('figure-v3-links')\nexport class FigureV3Links extends localize(i18next)(LitElement) {\n private readonly help = new HelpToggles(this)\n static styles = [SidePanelStyles, css`\n :host {\n display: block;\n }\n /* The measure's name, then its rule: X, or a cylinder's 반지름 · 길이, on one line. */\n div[row] > b {\n white-space: nowrap;\n }\n div[row] {\n display: grid;\n grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);\n gap: 6px;\n align-items: center;\n }\n b[bound] {\n font-weight: 600;\n }\n /* The difference a following measure keeps: under its choice, on the same line as its words. */\n label[inline-plus] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n label[inline-plus] input {\n flex: 1;\n min-width: 0;\n }\n `]\n\n /** The asset being edited. */\n @property({ attribute: false }) asset?: V3Asset\n /** The selected part. */\n @property() partId = ''\n /** The part's own extent along its axes now, in mm — what a dimension is fixed at when it stops following. */\n @property({ attribute: false }) dims?: [number, number, number]\n @property({ type: Boolean }) locked = false\n /** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */\n @property() section: 'shape' | 'places' | 'motion' = 'shape'\n\n @state() private fasten = freshFasten()\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\n @state() private row = freshRow()\n /** The motion form is open over the part's own motion, to change it where it is. */\n @state() private editingMotion = false\n\n /*\n The forms describe the next command for the selected part, so another part starts from the defaults: carrying the\n last part's choices over fastened a shutter curtain level with a right edge nobody chose for it (2026-09-25).\n */\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('partId') && changed.get('partId') !== undefined) {\n this.fasten = freshFasten()\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.editingMotion = false\n }\n }\n\n render() {\n const asset = this.asset\n if (!asset || !this.partId) return nothing\n if (this.section === 'motion')\n return html`<section><h3>${i18next.t('figure.label.motion')}${this.help.button('figure.text.motion-explained')}</h3>${this.help.hint('figure.text.motion-explained')}\n ${this.renderMotion(asset)}</section>`\n if (this.section === 'places')\n return html`<section><h3>${i18next.t('figure.label.places-on-part', { part: this.partId })}${this.help.button('figure.text.place-explained')}</h3>${this.help.hint('figure.text.place-explained')}\n ${placeFacesOf(asset, this.partId).length ? this.renderPlaces(asset) : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n return html`\n <section>\n <h3>${i18next.t('figure.label.dimensions')}</h3>\n ${canFollow(asset, this.partId) ? this.renderDimensions(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n <section>\n <h3>${i18next.t('figure.label.placement')}${this.help.button('figure.text.fastening-explained')}</h3>${this.help.hint('figure.text.fastening-explained')}\n ${this.renderPositions(asset)}\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n ${this.renderRow(asset)}\n `\n }\n\n /** Where things are held on this part: a seat things rest on, or a grip things are held in. */\n private renderPlaces(asset: V3Asset) {\n const faces = placeFacesOf(asset, this.partId)\n const p = this.place\n const face = faces.includes(p.face) ? p.face : faces[0]!\n const accepts = acceptsOf(p.accepts)\n const capacityOk = Number.isSafeInteger(p.capacity) && p.capacity >= 1\n const roleName = (role: string) => i18next.t('figure.label.place-' + role)\n return html`\n ${placesOn(asset, this.partId).map(\n one => html`<div pair>\n <span>\n <b bound>${one.label}</b>\n <small>${roleName(one.role)} · ${one.face ? i18next.t('figure.label.face-' + one.face) : ''} · ${one.accepts.join(', ')} · ${i18next.t('figure.label.place-holds', { count: one.capacity })}</small>\n </span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'remove-binding', id: one.id })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-place')}\n </button>\n </div>`\n )}\n ${holdsThings(asset)\n ? nothing\n : html`<p hint>${i18next.t('figure.text.place-needs-holding')}</p>\n <button act ?disabled=${this.locked} @click=${() => this.declareHolding(asset)}>\n <md-icon>inventory_2</md-icon>${i18next.t('figure.button.declare-holding')}\n </button>`}\n <div pair>\n <select @change=${(e: Event) => (this.place = { ...p, role: (e.target as HTMLSelectElement).value as 'seat' | 'grip' })}>\n <option value=\"grip\" ?selected=${p.role === 'grip'}>${roleName('grip')}</option>\n <option value=\"seat\" ?selected=${p.role === 'seat'}>${roleName('seat')}</option>\n </select>\n <select @change=${(e: Event) => (this.place = { ...p, face: (e.target as HTMLSelectElement).value as V3Face })}>\n ${faces.map(one => html`<option value=${one} ?selected=${one === face}>${i18next.t('figure.label.face-' + one)}</option>`)}\n </select>\n </div>\n <div form>\n <span>${i18next.t('figure.label.place-name')}</span>\n <input .value=${p.label} placeholder=${roleName(p.role)} @change=${(e: Event) => (this.place = { ...p, label: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-accepts')}</span>\n <input .value=${p.accepts} placeholder=\"BOX, TOTE\" @input=${(e: Event) => (this.place = { ...p, accepts: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-capacity')}</span>\n <input type=\"number\" min=\"1\" step=\"1\" .value=${String(p.capacity)} @change=${(e: Event) => (this.place = { ...p, capacity: (e.target as HTMLInputElement).valueAsNumber })} />\n </div>\n ${accepts.length ? nothing : html`<small>${i18next.t('figure.text.place-accepts-needed')}</small>`}\n <button\n act\n ?disabled=${this.locked || !accepts.length || !capacityOk}\n @click=${() =>\n this.command({\n kind: 'add-binding',\n id: placeIdFor(asset, this.partId, p.role),\n label: p.label.trim() || roleName(p.role),\n role: p.role,\n part: this.partId,\n face,\n accepts,\n capacity: p.capacity\n })}\n >\n <md-icon>back_hand</md-icon>${i18next.t('figure.button.add-place')}\n </button>\n `\n }\n\n /** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */\n private declareHolding(asset: V3Asset) {\n const names = [...new Set([...(asset.document.capabilities.names ?? []), 'Capacity', 'Holdable'])]\n this.dispatchEvent(new CustomEvent('v3-part-edit', { detail: { edit: { kind: 'set-capabilities', names } }, bubbles: true, composed: true }))\n }\n\n private renderDimensions(asset: V3Asset) {\n const others = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFollow(asset, one))\n const round = followableAxes(asset, this.partId).length === 2\n return followableAxes(asset, this.partId).map(axis => {\n const now = followOf(asset, this.partId, axis)\n const value = choiceOf(now)\n /* A cylinder's two measures are its radius and its length; its X and Y name them. */\n const name = round ? i18next.t(axis === 'x' ? 'figure.label.field-radius' : 'figure.label.field-length') : axis.toUpperCase()\n return html`<div row>\n <b>${name}</b>\n <select ?disabled=${this.locked} @change=${(e: Event) => this.follow(asset, axis, (e.target as HTMLSelectElement).value, now)}>\n <option value=\"own\" ?selected=${value === 'own'}>${i18next.t('figure.label.follows-nothing')}</option>\n ${AXES.filter(one => hasInstanceSize(asset, one)).map(\n one => html`<option value=${`share:${one}`} ?selected=${value === `share:${one}`}>\n ${i18next.t('figure.label.follows-instance-share')} · ${one.toUpperCase()}\n </option>\n <option value=${`instance:${one}`} ?selected=${value === `instance:${one}`}>\n ${i18next.t('figure.label.follows-instance')} · ${one.toUpperCase()}\n </option>`\n )}\n ${others.flatMap(other =>\n AXES.map(\n one => html`<option value=${`part:${other}:${one}`} ?selected=${value === `part:${other}:${one}`}>${other} · ${one.toUpperCase()}</option>`\n )\n )}\n ${now.of === 'expression' || now.of === 'input'\n ? html`<option value=${value} selected>${now.of === 'input' ? now.input : i18next.t('figure.label.follows-expression')}</option>`\n : nothing}\n </select>\n ${now.of === 'instance' || now.of === 'part'\n ? html`<span></span>\n <label inline-plus>\n ${i18next.t('figure.label.follows-plus')}\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.plus ?? 0)}\n @change=${(e: Event) => this.followPlus(axis, now, Number((e.target as HTMLInputElement).value) || 0)}\n />\n </label>`\n : nothing}\n </div>`\n })\n }\n\n /** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */\n private followPlus(axis: Axis, now: Follow, plus: number) {\n if (now.of !== 'instance' && now.of !== 'part') return\n if ((now.plus ?? 0) === plus) return\n const source: V3DimensionSource = now.of === 'instance' ? { of: 'instance', axis: now.axis } : { of: 'part', part: now.part, axis: now.axis }\n const times = now.of === 'instance' ? now.times : (now.times ?? 1)\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, ...(times !== 1 ? { times } : {}), ...(plus ? { plus } : {}), replace: true })\n }\n\n private follow(asset: V3Asset, axis: Axis, choice: string, now: Follow) {\n const following = now.of !== 'own'\n /* The measure as it stands: a dimension stops following at it, and a share is taken of it. */\n const current = dimensionNow(asset, this.partId, axis) ?? this.dims?.[AXES.indexOf(axis)] ?? 100\n if (choice === 'own') {\n if (!following) return\n this.command({ kind: 'unlink-dimension', part: this.partId, axis, mm: Math.max(1, Math.round(current)) })\n return\n }\n const [of, a, b] = choice.split(':')\n if (of === 'share') {\n /* A proportional rule: this measure is the share of the instance size it is now, so it grows with the figure. */\n const size = asset.designInputs[`size.${a}`]\n if (!size) return\n const times = Math.round((current / size) * 1e6) / 1e6\n this.command({ kind: 'link-dimension', part: this.partId, axis, source: { of: 'instance', axis: a as Axis }, times, replace: following })\n return\n }\n const source: V3DimensionSource = of === 'instance' ? { of: 'instance', axis: a as Axis } : { of: 'part', part: a!, axis: b as Axis }\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, replace: following })\n }\n\n /**\n * Positions worked out from other values, each with the way to\n * keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.\n */\n private renderPositions(asset: V3Asset) {\n return positionsWorkedOut(asset, this.partId).map(\n axis => html`<div pair>\n <span>${axis.toUpperCase()} · ${i18next.t(positionIsShare(asset, this.partId, axis) ? 'figure.label.position-in-proportion' : 'figure.label.position-worked-out')}</span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'fix-position', part: this.partId, axis })}>\n <md-icon>push_pin</md-icon>${i18next.t('figure.button.fix-position')}\n </button>\n ${hasInstanceSize(asset, axis) && !positionIsShare(asset, this.partId, axis)\n ? html`<button act ?disabled=${this.locked} title=${i18next.t('figure.text.scale-position-explained')} @click=${() => this.command({ kind: 'scale-position', part: this.partId, axis })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.scale-position')}\n </button>`\n : nothing}\n </div>`\n )\n }\n\n private renderFastening(asset: V3Asset) {\n const held = heldBy(asset, this.partId)\n const f = this.fasten\n const targets = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFasten(asset, one))\n /* The faces are the ones each shape declares: a part is fastened by one of its outer faces, to any face of the target. */\n /* On the mounting plane only the faces it takes: a bottom or a top on the floor, a back on a wall. */\n const plane = mountingPlaneOf(asset)\n const mineFaces = facesOf(asset, this.partId).filter(face => FACES.includes(face as V3Face) && (!f.toPlane || plane.faces.includes(face as V3Face)))\n const myFace = mineFaces.includes(f.face) ? f.face : (mineFaces[0] as V3Face)\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : { part: f.target, face: targetFace }\n const align = f.target || f.toPlane ? alignOf(asset, this.partId, aim, f.align, f.alignMm, !!f.twist) : undefined\n return html`\n ${held\n ? html`<div pair>\n <span>${i18next.t('figure.label.fastened-to')}: <b bound>${'plane' in held ? i18next.t('figure.label.mounting-plane') : held.part}</b></span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n </div>`\n : nothing}\n <div form>\n <span>${i18next.t('figure.label.my-face')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, face: (e.target as HTMLSelectElement).value as V3Face })}>\n ${mineFaces.map(face => html`<option value=${face} ?selected=${face === myFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${f.toPlane} @change=${(e: Event) => (this.fasten = { ...f, toPlane: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.stands-on-plane')}\n </label>\n ${f.toPlane\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.target-part')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, target: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!f.target}>—</option>\n ${targets.map(one => html`<option value=${one} ?selected=${one === f.target}>${one}</option>`)}\n </select>\n <span>${i18next.t('figure.label.target-face')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, targetFace: (e.target as HTMLSelectElement).value as V3Face })}>\n ${theirFaces.map(face => html`<option value=${face} ?selected=${face === targetFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n <span>${i18next.t('figure.label.facing-meet')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, facing: (e.target as HTMLSelectElement).value as 'meet' | 'flush' })}>\n <option value=\"meet\" ?selected=${f.facing === 'meet'}>${i18next.t('figure.label.facing-meet')}</option>\n <option value=\"flush\" ?selected=${f.facing === 'flush'}>${i18next.t('figure.label.facing-flush')}</option>\n </select>\n </div>`}\n ${this.renderAlignment(f.toPlane || f.target ? alignAxesOf(asset, this.partId, aim, !!f.twist) : [])}\n <div form>\n <span>${i18next.t('figure.label.gap')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.gap)} @change=${(e: Event) => (this.fasten = { ...f, gap: Number((e.target as HTMLInputElement).value) || 0 })} />\n <span>${i18next.t('figure.label.twist')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.twist)} @change=${(e: Event) => (this.fasten = { ...f, twist: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>\n <button\n act\n ?disabled=${this.locked || (!f.toPlane && !f.target)}\n @click=${() =>\n this.command({\n kind: 'attach',\n part: this.partId,\n face: myFace,\n to: f.toPlane ? { plane: 'mounting-plane' } : { part: f.target, face: targetFace },\n ...(f.toPlane ? {} : { facing: f.facing }),\n ...(f.gap ? { gap: f.gap } : {}),\n twist: f.twist,\n ...(align ? { align } : {}),\n replace: !!held\n } as V3AuthoringAction)}\n >\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten')}\n </button>\n `\n }\n\n /**\n * Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on\n * either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.\n */\n private renderAlignment(axes: { axis: Axis; edges: boolean }[]) {\n const f = this.fasten\n const set = (axis: Axis, how: Alignment) => (this.fasten = { ...f, align: { ...f.align, [axis]: how } })\n const setMm = (axis: Axis, mm: number) => (this.fasten = { ...f, alignMm: { ...f.alignMm, [axis]: mm } })\n return html`<div form>\n ${axes.map(({ axis, edges }) => {\n const how = f.align[axis] === 'min' || f.align[axis] === 'max' ? (edges ? f.align[axis]! : 'centre') : (f.align[axis] ?? 'centre')\n return html`<span>${i18next.t('figure.label.align-' + axis)}</span>\n <select @change=${(e: Event) => set(axis, (e.target as HTMLSelectElement).value as Alignment)}>\n <option value=\"centre\" ?selected=${how === 'centre'}>${i18next.t('figure.label.align-centre')}</option>\n ${edges\n ? html`<option value=\"min\" ?selected=${how === 'min'}>${i18next.t(`figure.label.align-${axis}-min`)}</option>\n <option value=\"max\" ?selected=${how === 'max'}>${i18next.t(`figure.label.align-${axis}-max`)}</option>`\n : nothing}\n <option value=\"mm\" ?selected=${how === 'mm'}>${i18next.t('figure.label.align-mm')}</option>\n ${this.asset && hasInstanceSize(this.asset, axis)\n ? html`<option value=\"share\" ?selected=${how === 'share'}>${i18next.t('figure.label.align-share')}</option>`\n : nothing}\n </select>\n ${how === 'mm' || how === 'share'\n ? html`<span></span><input type=\"number\" step=\"any\" aria-label=${i18next.t('figure.label.align-mm')} .value=${String(f.alignMm[axis] ?? 0)} @change=${(e: Event) => setMm(axis, Number((e.target as HTMLInputElement).value) || 0)} />`\n : nothing}`\n })}\n </div>`\n }\n\n /**\n * Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its\n * face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section\n * (the editor's) shows it and takes it away.\n */\n private renderRow(asset: V3Asset) {\n const axes = rowAxesOf(asset, this.partId)\n if (!axes.length) return nothing\n const r = this.row\n const axis = axes.includes(r.axis as Axis) ? (r.axis as Axis) : axes[0]!\n const ok = r.pitch > 0 && (r.fills || (Number.isSafeInteger(r.count) && r.count >= 1))\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select @change=${(e: Event) => (this.row = { ...r, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${axes.map(a => html`<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}\n </select>\n <span>${i18next.t('figure.label.repeat-pitch')} (mm)</span>\n <input type=\"number\" step=\"any\" min=\"0\" .value=${String(r.pitch)} @change=${(e: Event) => (this.row = { ...r, pitch: Number((e.target as HTMLInputElement).value) })} />\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${r.fills} @change=${(e: Event) => (this.row = { ...r, fills: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.repeat-fills')}\n </label>\n ${r.fills\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.repeat-count')}</span>\n <input type=\"number\" step=\"1\" min=\"1\" .value=${String(r.count)} @change=${(e: Event) => (this.row = { ...r, count: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n <button\n act\n ?disabled=${this.locked || !ok}\n @click=${() => this.command({ kind: 'make-repeat', part: this.partId, axis, pitch: r.pitch, ...(r.fills ? {} : { count: r.count }) } as V3AuthoringAction)}\n >\n <md-icon>view_week</md-icon>${i18next.t('figure.button.make-repeat')}\n </button>\n </section>`\n }\n\n private renderMotion(asset: V3Asset) {\n const now = motionOf(asset, this.partId)\n const joint = asset.joints?.find(j => j.body1.part === this.partId)\n if (now && !(this.editingMotion && joint)) {\n return html`<div pair>\n <span>\n ${i18next.t('figure.label.motion-' + now.kind)} · ${String(now.axis).toUpperCase()}\n ${now.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`\n : nothing}\n ${now.follows\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.joint, multiplier: now.follows.multiplier, offset: now.follows.offset ?? 0 })}</small>`\n : now.control\n ? html`<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`\n : nothing}\n </span>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => joint && this.command({ kind: 'set-joint', joint: { id: joint.id, type: 'fixed', body0: joint.body0, body1: joint.body1, ...(joint.origin ? { origin: joint.origin } : {}) } })}\n >\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => {\n if (!joint) return\n this.motion = motionFormOf(joint)\n this.editingMotion = true\n }}\n >\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\n </div>`\n }\n /* A joint needs a parent (URDF): a part fastened to nothing is fastened first. */\n if (!joint) return html`<p hint>${i18next.t('figure.text.fasten-before-moving')}</p>`\n const m = this.motion\n const unit = m.kind === 'slide' ? 'mm' : 'deg'\n /* A follower follows a joint that moves the same way; a choice the kind no longer allows is dropped. */\n const leaders = leadersFor(asset, this.partId, m.kind)\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n return html`\n <div pair>\n <select @change=${(e: Event) => this.setKind((e.target as HTMLSelectElement).value as 'slide' | 'turn' | 'continuous')}>\n <option value=\"slide\" ?selected=${m.kind === 'slide'}>${i18next.t('figure.label.motion-slide')}</option>\n <option value=\"turn\" ?selected=${m.kind === 'turn'}>${i18next.t('figure.label.motion-turn')}</option>\n <option value=\"continuous\" ?selected=${m.kind === 'continuous'}>${i18next.t('figure.label.motion-continuous')}</option>\n </select>\n <select @change=${(e: Event) => (this.motion = { ...m, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${AXES.map(a => html`<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}\n </select>\n </div>\n ${leaders.length\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, follow: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>\n ${leaders.map(j => html`<option value=${j.id} ?selected=${j.id === follow}>${j.body1.part}${j.state ? ` · ${j.state.id}` : ''}</option>`)}\n </select>\n </div>`\n : nothing}\n ${follow\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-multiplier')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.multiplier)} @change=${(e: Event) => (this.motion = { ...m, multiplier: Number((e.target as HTMLInputElement).value) })} />\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : html`<div form>\n ${m.kind === 'slide'\n ? html`<span>${i18next.t('figure.label.motion-travel')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, travel: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>\n ${asset.appearance\n .map(look => look.target)\n .filter(one => canFollow(asset, one))\n .flatMap(one => AXES.map(a => html`<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}\n </select>\n ${m.travel\n ? html`<span>${i18next.t('figure.label.follows-plus')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.travelPlus ?? 0)} @change=${(e: Event) => (this.motion = { ...m, travelPlus: Number((e.target as HTMLInputElement).value) || 0 })} />`\n : nothing}`\n : nothing}\n <span>${i18next.t('figure.label.control-id')}</span>\n <input .value=${m.id} placeholder=${`${this.partId}-${m.kind}`} @change=${(e: Event) => (this.motion = { ...m, id: (e.target as HTMLInputElement).value.trim() })} />\n ${m.kind === 'continuous' || (m.kind === 'slide' && m.travel)\n ? nothing\n : html`<span>${i18next.t('figure.label.control-range')} (${unit})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(m.min)} @change=${(e: Event) => (this.motion = { ...m, min: Number((e.target as HTMLInputElement).value) })} />\n <input type=\"number\" step=\"any\" .value=${String(m.max)} @change=${(e: Event) => (this.motion = { ...m, max: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n </div>`}\n <button\n act\n ?disabled=${this.locked || (follow ? !(Number.isFinite(m.multiplier) && m.multiplier !== 0) : m.kind !== 'continuous' && !(m.kind === 'slide' && m.travel) && !(m.max > m.min && m.min <= 0 && 0 <= m.max))}\n title=${!follow && m.kind !== 'continuous' && !(m.min <= 0 && 0 <= m.max) ? i18next.t('figure.text.joint-range-holds-zero') : ''}\n @click=${() => {\n this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId) })\n this.editingMotion = false\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => (this.editingMotion = false)}><md-icon>undo</md-icon>${i18next.t('figure.button.cancel-motion-change')}</button>`\n : nothing}\n `\n }\n\n private setKind(kind: 'slide' | 'turn' | 'continuous') {\n this.motion = kind === 'slide' ? { ...this.motion, kind, min: 0, max: 500 } : { ...this.motion, kind, min: -90, max: 90 }\n }\n\n private command(action: V3AuthoringAction) {\n this.dispatchEvent(new CustomEvent('v3-command', { detail: { action }, bubbles: true, composed: true }))\n }\n}\n\n"]}
1
+ {"version":3,"file":"figure-v3-links.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-links.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAGjD,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,OAAO,EACP,IAAI,EACJ,SAAS,EACT,OAAO,EACP,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,QAAQ,EAER,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,kBAAkB,EAKnB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAa,CAAA;AAE/C,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CAAC;IACzB,IAAI,EAAE,QAA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C,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAA;IAC3H,CAAC;IAEO,OAAO,CAAC,MAAyB;QACvC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAC1G,CAAC;;AAriB+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;4CAAgB;AAEnC;IAAX,QAAQ,EAAE;;6CAAY;AAES;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;2CAAgC;AAClC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;6CAAe;AAE/B;IAAX,QAAQ,EAAE;;8CAAiD;AAE3C;IAAhB,KAAK,EAAE;;6CAA+B;AACtB;IAAhB,KAAK,EAAE;;6CAA2C;AAClC;IAAhB,KAAK,EAAE;;4CAA6B;AACpB;IAAhB,KAAK,EAAE;;0CAAyB;AAEhB;IAAhB,KAAK,EAAE;;oDAA8B;AA9C3B,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAskBzB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { V3_FACES } from '@hatiolab/figure-model'\nimport type { V3Asset, V3AuthoringAction, V3DimensionSource, V3Face } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n alignAxesOf,\n mountingPlaneOf,\n alignOf,\n AXES,\n canFasten,\n facesOf,\n canFollow,\n dimensionNow,\n followableAxes,\n positionIsShare,\n choiceOf,\n fastenedTo,\n heldBy,\n followOf,\n hangsFrom,\n shownWhenOf,\n visibilityControlsOf,\n placeKeptOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionJoint,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n positionsWorkedOut,\n type Alignment,\n type Axis,\n type Follow,\n type MotionForm\n} from './v3-links.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { HelpToggles } from './v3-help.js'\n\nconst FACES = Object.keys(V3_FACES) as V3Face[]\n\nconst freshFasten = () => ({\n face: 'bottom' as V3Face,\n toPlane: false,\n target: '',\n targetFace: 'top' as V3Face,\n facing: 'meet' as 'meet' | 'flush',\n gap: 0,\n twist: 0,\n align: {} as Partial<Record<Axis, Alignment>>,\n alignMm: {} as Partial<Record<Axis, number>>\n})\nconst freshMotion = (): MotionForm => ({ kind: 'slide', axis: 'x', id: '', min: 0, max: 500, follow: '', multiplier: 1, offset: 0, travel: '', travelPlus: 0 })\nconst freshRow = () => ({ axis: '' as Axis | '', pitch: 200, fills: true, count: 5 })\nconst freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as V3Face, label: '', accepts: '', capacity: 1 })\n\n/**\n * What a part is tied to — its size response, what it is fastened to, how it moves.\n *\n * 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets\n * a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that\n * happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the\n * parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.\n *\n * The sections are dimensions, placement and joint, in that order. Every\n * change is one figure-model authoring command, sent as `v3-command` and run by the editor through the session — one\n * step of the undo history. Choices the command would refuse (a round body fastened, a size following an instance\n * size the figure does not declare) are not offered, so the author is not sent into a refusal.\n */\n@customElement('figure-v3-links')\nexport class FigureV3Links extends localize(i18next)(LitElement) {\n private readonly help = new HelpToggles(this)\n static styles = [SidePanelStyles, css`\n :host {\n display: block;\n }\n /* The measure's name, then its rule: X, or a cylinder's 반지름 · 길이, on one line. */\n div[row] > b {\n white-space: nowrap;\n }\n div[row] {\n display: grid;\n grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);\n gap: 6px;\n align-items: center;\n }\n b[bound] {\n font-weight: 600;\n }\n /* The difference a following measure keeps: under its choice, on the same line as its words. */\n label[inline-plus] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n label[inline-plus] input {\n flex: 1;\n min-width: 0;\n }\n `]\n\n /** The asset being edited. */\n @property({ attribute: false }) asset?: V3Asset\n /** The selected part. */\n @property() partId = ''\n /** The part's own extent along its axes now, in mm — what a dimension is fixed at when it stops following. */\n @property({ attribute: false }) dims?: [number, number, number]\n @property({ type: Boolean }) locked = false\n /** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */\n @property() section: 'shape' | 'places' | 'motion' = 'shape'\n\n @state() private fasten = freshFasten()\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\n @state() private row = freshRow()\n /** The motion form is open over the part's own motion, to change it where it is. */\n @state() private editingMotion = false\n\n /*\n The forms describe the next command for the selected part, so another part starts from the defaults: carrying the\n last part's choices over fastened a shutter curtain level with a right edge nobody chose for it (2026-09-25).\n */\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('partId') && changed.get('partId') !== undefined) {\n this.fasten = freshFasten()\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.editingMotion = false\n }\n }\n\n render() {\n const asset = this.asset\n if (!asset || !this.partId) return nothing\n if (this.section === 'motion')\n return html`<section><h3>${i18next.t('figure.label.motion')}${this.help.button('figure.text.motion-explained')}</h3>${this.help.hint('figure.text.motion-explained')}\n ${this.renderMotion(asset)}${this.renderShown(asset)}</section>`\n if (this.section === 'places')\n return html`<section><h3>${i18next.t('figure.label.places-on-part', { part: this.partId })}${this.help.button('figure.text.place-explained')}</h3>${this.help.hint('figure.text.place-explained')}\n ${placeFacesOf(asset, this.partId).length ? this.renderPlaces(asset) : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n return html`\n <section>\n <h3>${i18next.t('figure.label.dimensions')}</h3>\n ${canFollow(asset, this.partId) ? this.renderDimensions(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n <section>\n <h3>${i18next.t('figure.label.placement')}${this.help.button('figure.text.fastening-explained')}</h3>${this.help.hint('figure.text.fastening-explained')}\n ${this.renderPositions(asset)}\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n ${this.renderRow(asset)}\n `\n }\n\n /** Where things are held on this part: a seat things rest on, or a grip things are held in. */\n private renderPlaces(asset: V3Asset) {\n const faces = placeFacesOf(asset, this.partId)\n const p = this.place\n const face = faces.includes(p.face) ? p.face : faces[0]!\n const accepts = acceptsOf(p.accepts)\n const capacityOk = Number.isSafeInteger(p.capacity) && p.capacity >= 1\n const roleName = (role: string) => i18next.t('figure.label.place-' + role)\n return html`\n ${placesOn(asset, this.partId).map(\n one => html`<div pair>\n <span>\n <b bound>${one.label}</b>\n <small>${roleName(one.role)} · ${one.face ? i18next.t('figure.label.face-' + one.face) : ''} · ${one.accepts.join(', ')} · ${i18next.t('figure.label.place-holds', { count: one.capacity })}</small>\n </span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'remove-binding', id: one.id })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-place')}\n </button>\n </div>`\n )}\n ${holdsThings(asset)\n ? nothing\n : html`<p hint>${i18next.t('figure.text.place-needs-holding')}</p>\n <button act ?disabled=${this.locked} @click=${() => this.declareHolding(asset)}>\n <md-icon>inventory_2</md-icon>${i18next.t('figure.button.declare-holding')}\n </button>`}\n <div pair>\n <select @change=${(e: Event) => (this.place = { ...p, role: (e.target as HTMLSelectElement).value as 'seat' | 'grip' })}>\n <option value=\"grip\" ?selected=${p.role === 'grip'}>${roleName('grip')}</option>\n <option value=\"seat\" ?selected=${p.role === 'seat'}>${roleName('seat')}</option>\n </select>\n <select @change=${(e: Event) => (this.place = { ...p, face: (e.target as HTMLSelectElement).value as V3Face })}>\n ${faces.map(one => html`<option value=${one} ?selected=${one === face}>${i18next.t('figure.label.face-' + one)}</option>`)}\n </select>\n </div>\n <div form>\n <span>${i18next.t('figure.label.place-name')}</span>\n <input .value=${p.label} placeholder=${roleName(p.role)} @change=${(e: Event) => (this.place = { ...p, label: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-accepts')}</span>\n <input .value=${p.accepts} placeholder=\"BOX, TOTE\" @input=${(e: Event) => (this.place = { ...p, accepts: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-capacity')}</span>\n <input type=\"number\" min=\"1\" step=\"1\" .value=${String(p.capacity)} @change=${(e: Event) => (this.place = { ...p, capacity: (e.target as HTMLInputElement).valueAsNumber })} />\n </div>\n ${accepts.length ? nothing : html`<small>${i18next.t('figure.text.place-accepts-needed')}</small>`}\n <button\n act\n ?disabled=${this.locked || !accepts.length || !capacityOk}\n @click=${() =>\n this.command({\n kind: 'add-binding',\n id: placeIdFor(asset, this.partId, p.role),\n label: p.label.trim() || roleName(p.role),\n role: p.role,\n part: this.partId,\n face,\n accepts,\n capacity: p.capacity\n })}\n >\n <md-icon>back_hand</md-icon>${i18next.t('figure.button.add-place')}\n </button>\n `\n }\n\n /** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */\n private declareHolding(asset: V3Asset) {\n const names = [...new Set([...(asset.document.capabilities.names ?? []), 'Capacity', 'Holdable'])]\n this.dispatchEvent(new CustomEvent('v3-part-edit', { detail: { edit: { kind: 'set-capabilities', names } }, bubbles: true, composed: true }))\n }\n\n private renderDimensions(asset: V3Asset) {\n const others = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFollow(asset, one))\n const round = followableAxes(asset, this.partId).length === 2\n /* One step for the whole part (figure-model follow-size): the size is declared from the parts if there is none. */\n const followsAll = followableAxes(asset, this.partId).every(axis => followOf(asset, this.partId, axis).of === 'instance')\n const whole = followsAll\n ? nothing\n : html`<button act follow-size ?disabled=${this.locked} @click=${() => this.command({ kind: 'follow-size', part: this.partId })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size')}\n </button>`\n return html`${whole}${followableAxes(asset, this.partId).map(axis => {\n const now = followOf(asset, this.partId, axis)\n const value = choiceOf(now)\n /* A cylinder's two measures are its radius and its length; its X and Y name them. */\n const name = round ? i18next.t(axis === 'x' ? 'figure.label.field-radius' : 'figure.label.field-length') : axis.toUpperCase()\n return html`<div row>\n <b>${name}</b>\n <select ?disabled=${this.locked} @change=${(e: Event) => this.follow(asset, axis, (e.target as HTMLSelectElement).value, now)}>\n <option value=\"own\" ?selected=${value === 'own'}>${i18next.t('figure.label.follows-nothing')}</option>\n ${AXES.filter(one => hasInstanceSize(asset, one)).map(\n one => html`<option value=${`share:${one}`} ?selected=${value === `share:${one}`}>\n ${i18next.t('figure.label.follows-instance-share')} · ${one.toUpperCase()}\n </option>\n <option value=${`instance:${one}`} ?selected=${value === `instance:${one}`}>\n ${i18next.t('figure.label.follows-instance')} · ${one.toUpperCase()}\n </option>`\n )}\n ${others.flatMap(other =>\n AXES.map(\n one => html`<option value=${`part:${other}:${one}`} ?selected=${value === `part:${other}:${one}`}>${other} · ${one.toUpperCase()}</option>`\n )\n )}\n ${now.of === 'expression' || now.of === 'input'\n ? html`<option value=${value} selected>${now.of === 'input' ? now.input : i18next.t('figure.label.follows-expression')}</option>`\n : nothing}\n </select>\n ${now.of === 'instance' || now.of === 'part'\n ? html`<span></span>\n <label inline-plus>\n ${i18next.t('figure.label.follows-plus')}\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.plus ?? 0)}\n @change=${(e: Event) => this.followPlus(axis, now, Number((e.target as HTMLInputElement).value) || 0)}\n />\n </label>`\n : nothing}\n </div>`\n })}`\n }\n\n /** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */\n private followPlus(axis: Axis, now: Follow, plus: number) {\n if (now.of !== 'instance' && now.of !== 'part') return\n if ((now.plus ?? 0) === plus) return\n const source: V3DimensionSource = now.of === 'instance' ? { of: 'instance', axis: now.axis } : { of: 'part', part: now.part, axis: now.axis }\n const times = now.of === 'instance' ? now.times : (now.times ?? 1)\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, ...(times !== 1 ? { times } : {}), ...(plus ? { plus } : {}), replace: true })\n }\n\n private follow(asset: V3Asset, axis: Axis, choice: string, now: Follow) {\n const following = now.of !== 'own'\n /* The measure as it stands: a dimension stops following at it, and a share is taken of it. */\n const current = dimensionNow(asset, this.partId, axis) ?? this.dims?.[AXES.indexOf(axis)] ?? 100\n if (choice === 'own') {\n if (!following) return\n this.command({ kind: 'unlink-dimension', part: this.partId, axis, mm: Math.max(1, Math.round(current)) })\n return\n }\n const [of, a, b] = choice.split(':')\n if (of === 'share') {\n /* A proportional rule: this measure is the share of the instance size it is now, so it grows with the figure. */\n const size = asset.designInputs[`size.${a}`]\n if (!size) return\n const times = Math.round((current / size) * 1e6) / 1e6\n this.command({ kind: 'link-dimension', part: this.partId, axis, source: { of: 'instance', axis: a as Axis }, times, replace: following })\n return\n }\n const source: V3DimensionSource = of === 'instance' ? { of: 'instance', axis: a as Axis } : { of: 'part', part: a!, axis: b as Axis }\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, replace: following })\n }\n\n /**\n * Positions worked out from other values, each with the way to\n * keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.\n */\n private renderPositions(asset: V3Asset) {\n return positionsWorkedOut(asset, this.partId).map(\n axis => html`<div pair>\n <span>${axis.toUpperCase()} · ${i18next.t(positionIsShare(asset, this.partId, axis) ? 'figure.label.position-in-proportion' : 'figure.label.position-worked-out')}</span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'fix-position', part: this.partId, axis })}>\n <md-icon>push_pin</md-icon>${i18next.t('figure.button.fix-position')}\n </button>\n ${hasInstanceSize(asset, axis) && !positionIsShare(asset, this.partId, axis)\n ? html`<button act ?disabled=${this.locked} title=${i18next.t('figure.text.scale-position-explained')} @click=${() => this.command({ kind: 'scale-position', part: this.partId, axis })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.scale-position')}\n </button>`\n : nothing}\n </div>`\n )\n }\n\n /**\n * A new aim for the fastening: where on the face is filled in as where the part stands now, so fastening it keeps it\n * there (`placeKeptOf`). The author changes it from there.\n */\n private aimAt(asset: V3Asset, f: ReturnType<typeof freshFasten>) {\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : f.target ? { part: f.target, face: targetFace } : undefined\n this.fasten = { ...f, ...(aim ? placeKeptOf(asset, this.partId, aim, !!f.twist) : { align: {}, alignMm: {} }) }\n }\n\n private renderFastening(asset: V3Asset) {\n const held = heldBy(asset, this.partId)\n const f = this.fasten\n /* Not a part that hangs from this one: fastening a frame to its own roller would close a loop. */\n const targets = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFasten(asset, one) && !hangsFrom(asset, one, this.partId))\n /* The faces are the ones each shape declares: a part is fastened by one of its outer faces, to any face of the target. */\n /* On the mounting plane only the faces it takes: a bottom or a top on the floor, a back on a wall. */\n const plane = mountingPlaneOf(asset)\n const mineFaces = facesOf(asset, this.partId).filter(face => FACES.includes(face as V3Face) && (!f.toPlane || plane.faces.includes(face as V3Face)))\n const myFace = mineFaces.includes(f.face) ? f.face : (mineFaces[0] as V3Face)\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : { part: f.target, face: targetFace }\n const align = f.target || f.toPlane ? alignOf(asset, this.partId, aim, f.align, f.alignMm, !!f.twist) : undefined\n return html`\n ${held\n ? html`<div pair>\n <span>${i18next.t('figure.label.fastened-to')}: <b bound>${'plane' in held ? i18next.t('figure.label.mounting-plane') : held.part}</b></span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n </div>`\n : nothing}\n <div form>\n <span>${i18next.t('figure.label.my-face')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, face: (e.target as HTMLSelectElement).value as V3Face })}>\n ${mineFaces.map(face => html`<option value=${face} ?selected=${face === myFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${f.toPlane} @change=${(e: Event) => this.aimAt(asset, { ...f, toPlane: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.stands-on-plane')}\n </label>\n ${f.toPlane\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.target-part')}</span>\n <select @change=${(e: Event) => this.aimAt(asset, { ...f, target: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!f.target}>—</option>\n ${targets.map(one => html`<option value=${one} ?selected=${one === f.target}>${one}</option>`)}\n </select>\n <span>${i18next.t('figure.label.target-face')}</span>\n <select @change=${(e: Event) => this.aimAt(asset, { ...f, targetFace: (e.target as HTMLSelectElement).value as V3Face })}>\n ${theirFaces.map(face => html`<option value=${face} ?selected=${face === targetFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n <span>${i18next.t('figure.label.facing-meet')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, facing: (e.target as HTMLSelectElement).value as 'meet' | 'flush' })}>\n <option value=\"meet\" ?selected=${f.facing === 'meet'}>${i18next.t('figure.label.facing-meet')}</option>\n <option value=\"flush\" ?selected=${f.facing === 'flush'}>${i18next.t('figure.label.facing-flush')}</option>\n </select>\n </div>`}\n ${this.renderAlignment(f.toPlane || f.target ? alignAxesOf(asset, this.partId, aim, !!f.twist) : [])}\n <div form>\n <span>${i18next.t('figure.label.gap')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.gap)} @change=${(e: Event) => (this.fasten = { ...f, gap: Number((e.target as HTMLInputElement).value) || 0 })} />\n <span>${i18next.t('figure.label.twist')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.twist)} @change=${(e: Event) => (this.fasten = { ...f, twist: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>\n <button\n act\n ?disabled=${this.locked || (!f.toPlane && !f.target)}\n @click=${() =>\n this.command({\n kind: 'attach',\n part: this.partId,\n face: myFace,\n to: f.toPlane ? { plane: 'mounting-plane' } : { part: f.target, face: targetFace },\n ...(f.toPlane ? {} : { facing: f.facing }),\n ...(f.gap ? { gap: f.gap } : {}),\n twist: f.twist,\n ...(align ? { align } : {}),\n replace: !!held\n } as V3AuthoringAction)}\n >\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten')}\n </button>\n `\n }\n\n /**\n * Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on\n * either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.\n */\n private renderAlignment(axes: { axis: Axis; edges: boolean }[]) {\n const f = this.fasten\n const set = (axis: Axis, how: Alignment) => (this.fasten = { ...f, align: { ...f.align, [axis]: how } })\n const setMm = (axis: Axis, mm: number) => (this.fasten = { ...f, alignMm: { ...f.alignMm, [axis]: mm } })\n return html`<div form>\n ${axes.map(({ axis, edges }) => {\n const how = f.align[axis] === 'min' || f.align[axis] === 'max' ? (edges ? f.align[axis]! : 'centre') : (f.align[axis] ?? 'centre')\n return html`<span>${i18next.t('figure.label.align-' + axis)}</span>\n <select @change=${(e: Event) => set(axis, (e.target as HTMLSelectElement).value as Alignment)}>\n <option value=\"centre\" ?selected=${how === 'centre'}>${i18next.t('figure.label.align-centre')}</option>\n ${edges\n ? html`<option value=\"min\" ?selected=${how === 'min'}>${i18next.t(`figure.label.align-${axis}-min`)}</option>\n <option value=\"max\" ?selected=${how === 'max'}>${i18next.t(`figure.label.align-${axis}-max`)}</option>`\n : nothing}\n <option value=\"mm\" ?selected=${how === 'mm'}>${i18next.t('figure.label.align-mm')}</option>\n ${this.asset && hasInstanceSize(this.asset, axis)\n ? html`<option value=\"share\" ?selected=${how === 'share'}>${i18next.t('figure.label.align-share')}</option>`\n : nothing}\n </select>\n ${how === 'mm' || how === 'share'\n ? html`<span></span><input type=\"number\" step=\"any\" aria-label=${i18next.t('figure.label.align-mm')} .value=${String(f.alignMm[axis] ?? 0)} @change=${(e: Event) => setMm(axis, Number((e.target as HTMLInputElement).value) || 0)} />`\n : nothing}`\n })}\n </div>`\n }\n\n /**\n * Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its\n * face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section\n * (the editor's) shows it and takes it away.\n */\n private renderRow(asset: V3Asset) {\n const axes = rowAxesOf(asset, this.partId)\n if (!axes.length) return nothing\n const r = this.row\n const axis = axes.includes(r.axis as Axis) ? (r.axis as Axis) : axes[0]!\n const ok = r.pitch > 0 && (r.fills || (Number.isSafeInteger(r.count) && r.count >= 1))\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select @change=${(e: Event) => (this.row = { ...r, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${axes.map(a => html`<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}\n </select>\n <span>${i18next.t('figure.label.repeat-pitch')} (mm)</span>\n <input type=\"number\" step=\"any\" min=\"0\" .value=${String(r.pitch)} @change=${(e: Event) => (this.row = { ...r, pitch: Number((e.target as HTMLInputElement).value) })} />\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${r.fills} @change=${(e: Event) => (this.row = { ...r, fills: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.repeat-fills')}\n </label>\n ${r.fills\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.repeat-count')}</span>\n <input type=\"number\" step=\"1\" min=\"1\" .value=${String(r.count)} @change=${(e: Event) => (this.row = { ...r, count: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n <button\n act\n ?disabled=${this.locked || !ok}\n @click=${() => this.command({ kind: 'make-repeat', part: this.partId, axis, pitch: r.pitch, ...(r.fills ? {} : { count: r.count }) } as V3AuthoringAction)}\n >\n <md-icon>view_week</md-icon>${i18next.t('figure.button.make-repeat')}\n </button>\n </section>`\n }\n\n /**\n * When the part is drawn: always, or while a control is at least a value -- a lamp lit while the gate is open. One\n * part edit (`set-visibility`), one step. Offered once the figure has a control; a motion is what makes one.\n */\n private renderShown(asset: V3Asset) {\n const controls = visibilityControlsOf(asset)\n if (!controls.length) return nothing\n const now = shownWhenOf(asset, this.partId)\n const send = (shownWhen: { input: string; atLeast: number } | null) =>\n this.dispatchEvent(new CustomEvent('v3-part-edit', { detail: { edit: { kind: 'set-visibility', target: this.partId, shownWhen } }, bubbles: true, composed: true }))\n const first = (id: string) => {\n const c = controls.find(one => one.id === id)!\n return Math.round((c.min + (c.max - c.min) * 0.01) * 1000) / 1000\n }\n const unit = now ? controls.find(c => c.id === now.input)?.unit : ''\n return html`<div form>\n <span>${i18next.t('figure.label.shown-when')}</span>\n <select\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const id = (e.target as HTMLSelectElement).value\n send(id ? { input: id, atLeast: now?.input === id ? now.atLeast : first(id) } : null)\n }}\n >\n <option value=\"\" ?selected=${!now}>${i18next.t('figure.label.shown-always')}</option>\n ${controls.map(c => html`<option value=${c.id} ?selected=${now?.input === c.id}>${i18next.t('figure.label.shown-while', { control: c.label })}</option>`)}\n </select>\n ${now\n ? html`<span>${i18next.t('figure.label.shown-at-least')}${unit ? ` (${unit})` : ''}</span>\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.atLeast)}\n @change=${(e: Event) => {\n const v = (e.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(v)) send({ input: now.input, atLeast: v })\n }}\n />`\n : nothing}\n </div>`\n }\n\n private renderMotion(asset: V3Asset) {\n const now = motionOf(asset, this.partId)\n const joint = asset.joints?.find(j => j.body1.part === this.partId)\n if (now && !(this.editingMotion && joint)) {\n return html`<div pair>\n <span>\n ${i18next.t('figure.label.motion-' + now.kind)} · ${String(now.axis).toUpperCase()}\n ${now.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`\n : nothing}\n ${now.follows\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.joint, multiplier: now.follows.multiplier, offset: now.follows.offset ?? 0 })}</small>`\n : now.control\n ? html`<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`\n : nothing}\n </span>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => joint && this.command({ kind: 'set-joint', joint: { id: joint.id, type: 'fixed', body0: joint.body0, body1: joint.body1, ...(joint.origin ? { origin: joint.origin } : {}) } })}\n >\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => {\n if (!joint) return\n this.motion = motionFormOf(joint)\n this.editingMotion = true\n }}\n >\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\n </div>`\n }\n /* A joint needs a parent (URDF): a part fastened to nothing is fastened first. */\n if (!joint) return html`<p hint>${i18next.t('figure.text.fasten-before-moving')}</p>`\n const m = this.motion\n const unit = m.kind === 'slide' ? 'mm' : 'deg'\n /* A follower follows a joint that moves the same way; a choice the kind no longer allows is dropped. */\n const leaders = leadersFor(asset, this.partId, m.kind)\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n return html`\n <div pair>\n <select @change=${(e: Event) => this.setKind((e.target as HTMLSelectElement).value as 'slide' | 'turn' | 'continuous')}>\n <option value=\"slide\" ?selected=${m.kind === 'slide'}>${i18next.t('figure.label.motion-slide')}</option>\n <option value=\"turn\" ?selected=${m.kind === 'turn'}>${i18next.t('figure.label.motion-turn')}</option>\n <option value=\"continuous\" ?selected=${m.kind === 'continuous'}>${i18next.t('figure.label.motion-continuous')}</option>\n </select>\n <select @change=${(e: Event) => (this.motion = { ...m, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${AXES.map(a => html`<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}\n </select>\n </div>\n ${leaders.length\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, follow: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>\n ${leaders.map(j => html`<option value=${j.id} ?selected=${j.id === follow}>${j.body1.part}${j.state ? ` · ${j.state.id}` : ''}</option>`)}\n </select>\n </div>`\n : nothing}\n ${follow\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-multiplier')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.multiplier)} @change=${(e: Event) => (this.motion = { ...m, multiplier: Number((e.target as HTMLInputElement).value) })} />\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : html`<div form>\n ${m.kind === 'slide'\n ? html`<span>${i18next.t('figure.label.motion-travel')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, travel: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>\n ${asset.appearance\n .map(look => look.target)\n .filter(one => canFollow(asset, one))\n .flatMap(one => AXES.map(a => html`<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}\n </select>\n ${m.travel\n ? html`<span>${i18next.t('figure.label.follows-plus')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.travelPlus ?? 0)} @change=${(e: Event) => (this.motion = { ...m, travelPlus: Number((e.target as HTMLInputElement).value) || 0 })} />`\n : nothing}`\n : nothing}\n <span>${i18next.t('figure.label.control-id')}</span>\n <input .value=${m.id} placeholder=${`${this.partId}-${m.kind}`} @change=${(e: Event) => (this.motion = { ...m, id: (e.target as HTMLInputElement).value.trim() })} />\n ${m.kind === 'continuous' || (m.kind === 'slide' && m.travel)\n ? nothing\n : html`<span>${i18next.t('figure.label.control-range')} (${unit})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(m.min)} @change=${(e: Event) => (this.motion = { ...m, min: Number((e.target as HTMLInputElement).value) })} />\n <input type=\"number\" step=\"any\" .value=${String(m.max)} @change=${(e: Event) => (this.motion = { ...m, max: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n </div>`}\n <button\n act\n ?disabled=${this.locked || (follow ? !(Number.isFinite(m.multiplier) && m.multiplier !== 0) : m.kind !== 'continuous' && !(m.kind === 'slide' && m.travel) && !(m.max > m.min && m.min <= 0 && 0 <= m.max))}\n title=${!follow && m.kind !== 'continuous' && !(m.min <= 0 && 0 <= m.max) ? i18next.t('figure.text.joint-range-holds-zero') : ''}\n @click=${() => {\n this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId) })\n this.editingMotion = false\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => (this.editingMotion = false)}><md-icon>undo</md-icon>${i18next.t('figure.button.cancel-motion-change')}</button>`\n : nothing}\n `\n }\n\n private setKind(kind: 'slide' | 'turn' | 'continuous') {\n this.motion = kind === 'slide' ? { ...this.motion, kind, min: 0, max: 500 } : { ...this.motion, kind, min: -90, max: 90 }\n }\n\n private command(action: V3AuthoringAction) {\n this.dispatchEvent(new CustomEvent('v3-command', { detail: { action }, bubbles: true, composed: true }))\n }\n}\n\n"]}
@@ -26,7 +26,7 @@ export declare class FigureV3Material extends FigureV3Material_base {
26
26
  locked: boolean;
27
27
  /** The glow while its slider is dragged: shown beside it and drawn on the canvas, recorded on release. */
28
28
  private glowing?;
29
- render(): typeof nothing | import("lit-html").TemplateResult<1>;
29
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
30
30
  private renderSegments;
31
31
  private swatches;
32
32
  private offered;
@@ -1,6 +1,6 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import { LitElement } from 'lit';
3
- import type { V3PrimitiveCreation } from '@hatiolab/figure-model';
3
+ import type { V3PrimitiveCreation, V3Recipe } from '@hatiolab/figure-model';
4
4
  import type { V3BudgetLine } from './v3-maturity.js';
5
5
  /**
6
6
  * 도형 팔레트와 부품 목록 — V3 자산의 것.
@@ -47,6 +47,13 @@ export declare class FigureV3Parts extends FigureV3Parts_base {
47
47
  used: number;
48
48
  limit: number | null;
49
49
  };
50
+ /** The recipes this domain sees (ADR-0095). */
51
+ recipes: V3Recipe[];
52
+ /** Why the last recipe put in was refused -- the kernel's sentence, as it is (ADR-0095 condition 3). */
53
+ recipeError: string;
54
+ /** The recipe whose form is open, and the values in it. */
55
+ private openRecipe;
56
+ private recipeValues;
50
57
  render(): import("lit-html").TemplateResult<1>;
51
58
  /** 디테일 등급 — 고르면 한도가 바뀐다. 목록 머리 아래. */
52
59
  private renderLevel;
@@ -56,6 +63,13 @@ export declare class FigureV3Parts extends FigureV3Parts_base {
56
63
  private renderRow;
57
64
  /** 고른 줄의 조작. 못 하는 것은 빼지 않고 흐리게 둔다 — 자리가 밀리면 연달아 지우다 엉뚱한 것을 누른다. */
58
65
  private renderOps;
66
+ /**
67
+ * Recipes (ADR-0095): a door, a roller row -- parts made in one step, with a few numbers and choices. A recipe for a
68
+ * part needs one chosen; its form opens under it, and putting it in is one step of the history.
69
+ */
70
+ private renderRecipes;
71
+ private openFor;
72
+ private renderRecipeForm;
59
73
  /** 정본을 고치지 않는다 — 무엇을 하겠다는 것만 알린다. */
60
74
  private ask;
61
75
  }
@@ -1,10 +1,11 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@material/web/icon/icon.js';
3
3
  import { css, html, LitElement, nothing } from 'lit';
4
- import { customElement, property } from 'lit/decorators.js';
4
+ import { customElement, property, state } from 'lit/decorators.js';
5
5
  import { i18next, localize } from '@operato/i18n';
6
6
  import { ScrollbarStyles } from '@operato/styles';
7
7
  import { PART_LIMIT } from '@hatiolab/figure-model';
8
+ import { recipeFieldOf, recipeReady, recipeValueOf, recipeWord } from './v3-recipes.js';
8
9
  import { partLabelOf } from './v3-fields.js';
9
10
  /** 제공자마다의 아이콘. Material Symbols 이름이다. */
10
11
  const PROVIDER_ICON = {
@@ -39,6 +40,13 @@ let FigureV3Parts = class FigureV3Parts extends localize(i18next)(LitElement) {
39
40
  this.selected = '';
40
41
  /** 편집할 수 없을 때(불러오는 중 · 저장 중) 팔레트와 조작을 잠근다. */
41
42
  this.locked = false;
43
+ /** The recipes this domain sees (ADR-0095). */
44
+ this.recipes = [];
45
+ /** Why the last recipe put in was refused -- the kernel's sentence, as it is (ADR-0095 condition 3). */
46
+ this.recipeError = '';
47
+ /** The recipe whose form is open, and the values in it. */
48
+ this.openRecipe = '';
49
+ this.recipeValues = {};
42
50
  }
43
51
  static { this.styles = [
44
52
  ScrollbarStyles,
@@ -183,6 +191,83 @@ let FigureV3Parts = class FigureV3Parts extends localize(i18next)(LitElement) {
183
191
  border-radius: 6px;
184
192
  cursor: pointer;
185
193
  }
194
+ div[recipe-list] {
195
+ display: flex;
196
+ flex-wrap: wrap;
197
+ gap: 3px;
198
+ }
199
+ button[recipe] {
200
+ padding: 4px 8px;
201
+ font: inherit;
202
+ font-size: 0.75rem;
203
+ color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
204
+ background: none;
205
+ border: 1px solid var(--md-sys-color-outline-variant);
206
+ border-radius: 999em;
207
+ cursor: pointer;
208
+ }
209
+ button[recipe][on] {
210
+ color: var(--md-sys-color-on-secondary-container);
211
+ background: var(--md-sys-color-secondary-container);
212
+ border-color: transparent;
213
+ }
214
+ button[recipe]:disabled {
215
+ opacity: 0.38;
216
+ cursor: default;
217
+ }
218
+ div[recipe-form] {
219
+ display: grid;
220
+ gap: 6px;
221
+ margin-top: 8px;
222
+ padding: 8px;
223
+ border: 1px solid var(--md-sys-color-outline-variant);
224
+ border-radius: 8px;
225
+ font-size: 0.75rem;
226
+ }
227
+ /* The side pane is narrow (200 px, 160 under 860): the name above its field, not beside it. */
228
+ div[recipe-form] label[field] {
229
+ display: grid;
230
+ gap: 2px;
231
+ }
232
+ div[recipe-form] input[type='number'],
233
+ div[recipe-form] select {
234
+ min-width: 0;
235
+ font: inherit;
236
+ }
237
+ div[recipe-form] p[hint] {
238
+ margin: 0;
239
+ color: var(--md-sys-color-on-surface-variant);
240
+ }
241
+ div[recipe-form] p[error] {
242
+ margin: 0;
243
+ padding: 6px;
244
+ white-space: pre-wrap;
245
+ color: var(--md-sys-color-on-error-container);
246
+ background: var(--md-sys-color-error-container);
247
+ border-radius: 6px;
248
+ }
249
+ div[recipe-actions] {
250
+ display: flex;
251
+ gap: 6px;
252
+ }
253
+ div[recipe-actions] button {
254
+ white-space: nowrap;
255
+ display: inline-flex;
256
+ align-items: center;
257
+ gap: 4px;
258
+ padding: 4px 10px;
259
+ font: inherit;
260
+ border: 1px solid var(--md-sys-color-outline-variant);
261
+ border-radius: 999em;
262
+ background: none;
263
+ color: var(--md-sys-color-on-surface);
264
+ cursor: pointer;
265
+ }
266
+ div[recipe-actions] button[insert] {
267
+ border-color: transparent;
268
+ color: var(--md-sys-color-on-primary);
269
+ background: var(--md-sys-color-primary);
270
+ }
186
271
  button[shape]:hover:not([disabled]) {
187
272
  color: var(--md-sys-color-on-primary-container);
188
273
  background-color: var(--md-sys-color-primary-container);
@@ -344,6 +429,7 @@ let FigureV3Parts = class FigureV3Parts extends localize(i18next)(LitElement) {
344
429
  </div>
345
430
  ${full ? html `<p full>${i18next.t('figure.text.part-limit-reached-short', { level: b.level, limit: b.limit })}</p>` : nothing}
346
431
  </section>
432
+ ${this.renderRecipes(full)}
347
433
 
348
434
  <section list>
349
435
  <h3>
@@ -491,6 +577,69 @@ let FigureV3Parts = class FigureV3Parts extends localize(i18next)(LitElement) {
491
577
  </div>
492
578
  `;
493
579
  }
580
+ /**
581
+ * Recipes (ADR-0095): a door, a roller row -- parts made in one step, with a few numbers and choices. A recipe for a
582
+ * part needs one chosen; its form opens under it, and putting it in is one step of the history.
583
+ */
584
+ renderRecipes(full) {
585
+ if (!this.recipes.length)
586
+ return nothing;
587
+ const language = i18next.language || 'en';
588
+ const open = this.recipes.find(r => r.name === this.openRecipe);
589
+ return html `<section recipes>
590
+ <h3>${i18next.t('figure.label.recipes')}</h3>
591
+ <div recipe-list>
592
+ ${this.recipes.map(recipe => {
593
+ const ready = recipeReady(recipe, this.selected);
594
+ return html `<button
595
+ recipe=${recipe.name}
596
+ ?on=${recipe.name === this.openRecipe}
597
+ ?disabled=${this.locked || full || !ready}
598
+ title=${ready ? recipeWord(recipe.description, language) : i18next.t('figure.text.recipe-needs-a-part')}
599
+ @click=${() => this.openFor(recipe)}
600
+ >
601
+ ${recipeWord(recipe.title, language)}
602
+ </button>`;
603
+ })}
604
+ </div>
605
+ ${this.selected || !this.recipes.some(r => r.target === 'part') ? nothing : html `<p hint>${i18next.t('figure.text.recipe-needs-a-part')}</p>`}
606
+ ${open && recipeReady(open, this.selected) ? this.renderRecipeForm(open, language) : nothing}
607
+ </section>`;
608
+ }
609
+ openFor(recipe) {
610
+ if (this.openRecipe === recipe.name) {
611
+ this.openRecipe = '';
612
+ return;
613
+ }
614
+ this.openRecipe = recipe.name;
615
+ this.recipeValues = Object.fromEntries(recipe.params.map(p => [p.name, p.default]));
616
+ }
617
+ renderRecipeForm(recipe, language) {
618
+ const set = (name, value) => (this.recipeValues = { ...this.recipeValues, [name]: value });
619
+ return html `<div recipe-form>
620
+ ${recipe.target === 'part' ? html `<p hint>${i18next.t('figure.text.recipe-onto', { part: this.selected })}</p>` : nothing}
621
+ ${recipe.params.map(param => {
622
+ const label = recipeWord(param.label, language) || param.name;
623
+ const value = this.recipeValues[param.name] ?? param.default;
624
+ if (param.kind === 'flag')
625
+ return html `<label toggle><input type="checkbox" .checked=${value === true} @change=${(e) => set(param.name, e.target.checked)} />${label}</label>`;
626
+ if (param.kind === 'choice' || param.kind === 'face')
627
+ return html `<label field><span>${label}</span>
628
+ <select @change=${(e) => set(param.name, recipeValueOf(param, e.target.value))}>
629
+ ${(param.options ?? []).map(o => html `<option value=${String(o)} ?selected=${o === value}>${String(o)}</option>`)}
630
+ </select></label>`;
631
+ return html `<label field><span>${label}${param.kind === 'ratio' ? ' (%)' : ''}</span>
632
+ <input type="number" step="any" param=${param.name} .value=${recipeFieldOf(param, value)} @change=${(e) => set(param.name, recipeValueOf(param, e.target.value))} /></label>`;
633
+ })}
634
+ ${this.recipeError ? html `<p role="alert" error>${this.recipeError}</p>` : nothing}
635
+ <div recipe-actions>
636
+ <button act insert ?disabled=${this.locked} @click=${() => this.ask('insert-recipe', { recipe, values: this.recipeValues })}>
637
+ <md-icon>add</md-icon>${i18next.t('figure.button.insert-recipe')}
638
+ </button>
639
+ <button act @click=${() => (this.openRecipe = '')}>${i18next.t('figure.button.close')}</button>
640
+ </div>
641
+ </div>`;
642
+ }
494
643
  /** 정본을 고치지 않는다 — 무엇을 하겠다는 것만 알린다. */
495
644
  ask(what, detail) {
496
645
  this.dispatchEvent(new CustomEvent(what, { detail, bubbles: true, composed: true }));
@@ -516,6 +665,22 @@ __decorate([
516
665
  property({ attribute: false }),
517
666
  __metadata("design:type", Object)
518
667
  ], FigureV3Parts.prototype, "partBudget", void 0);
668
+ __decorate([
669
+ property({ attribute: false }),
670
+ __metadata("design:type", Array)
671
+ ], FigureV3Parts.prototype, "recipes", void 0);
672
+ __decorate([
673
+ property({ type: String }),
674
+ __metadata("design:type", Object)
675
+ ], FigureV3Parts.prototype, "recipeError", void 0);
676
+ __decorate([
677
+ state(),
678
+ __metadata("design:type", Object)
679
+ ], FigureV3Parts.prototype, "openRecipe", void 0);
680
+ __decorate([
681
+ state(),
682
+ __metadata("design:type", Object)
683
+ ], FigureV3Parts.prototype, "recipeValues", void 0);
519
684
  FigureV3Parts = __decorate([
520
685
  customElement('figure-v3-parts')
521
686
  ], FigureV3Parts);