@things-factory/figure-ui 10.1.245 → 10.1.246

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 (127) hide show
  1. package/client/modeller/align.ts +51 -13
  2. package/client/modeller/clips.ts +51 -1
  3. package/client/modeller/data-interface.ts +16 -0
  4. package/client/modeller/editor-styles.ts +6 -0
  5. package/client/modeller/editor.ts +112 -25
  6. package/client/modeller/fasten-form.ts +8 -1
  7. package/client/modeller/fasten-geometry.ts +24 -2
  8. package/client/modeller/figure-clips.ts +137 -4
  9. package/client/modeller/figure-fasten-dialog.ts +1 -0
  10. package/client/modeller/figure-fasten-drawing.ts +11 -5
  11. package/client/modeller/figure-links.ts +25 -0
  12. package/client/modeller/figure-material-panel.ts +54 -4
  13. package/client/modeller/figure-parts.ts +7 -2
  14. package/client/modeller/figure-pipe-panel.ts +215 -0
  15. package/client/modeller/figure-preview.ts +125 -4
  16. package/client/modeller/figure-section-editor.ts +36 -3
  17. package/client/modeller/links.ts +24 -2
  18. package/client/modeller/material-edit.ts +9 -0
  19. package/client/modeller/maturity.ts +15 -4
  20. package/client/modeller/palette.ts +9 -0
  21. package/client/modeller/pipe-path.ts +21 -0
  22. package/client/modeller/refusals.ts +66 -1
  23. package/client/modeller/section-controls.ts +2 -1
  24. package/client/modeller/section-drawing.ts +20 -1
  25. package/client/modeller/starting-shape.ts +8 -5
  26. package/dist-client/modeller/align.d.ts +28 -7
  27. package/dist-client/modeller/align.js +37 -12
  28. package/dist-client/modeller/align.js.map +1 -1
  29. package/dist-client/modeller/clips.d.ts +24 -0
  30. package/dist-client/modeller/clips.js +53 -1
  31. package/dist-client/modeller/clips.js.map +1 -1
  32. package/dist-client/modeller/data-interface.d.ts +6 -0
  33. package/dist-client/modeller/data-interface.js +17 -0
  34. package/dist-client/modeller/data-interface.js.map +1 -1
  35. package/dist-client/modeller/editor-styles.js +6 -0
  36. package/dist-client/modeller/editor-styles.js.map +1 -1
  37. package/dist-client/modeller/editor.d.ts +10 -1
  38. package/dist-client/modeller/editor.js +117 -26
  39. package/dist-client/modeller/editor.js.map +1 -1
  40. package/dist-client/modeller/fasten-form.d.ts +2 -0
  41. package/dist-client/modeller/fasten-form.js +5 -1
  42. package/dist-client/modeller/fasten-form.js.map +1 -1
  43. package/dist-client/modeller/fasten-geometry.d.ts +8 -1
  44. package/dist-client/modeller/fasten-geometry.js +22 -1
  45. package/dist-client/modeller/fasten-geometry.js.map +1 -1
  46. package/dist-client/modeller/figure-clips.d.ts +9 -0
  47. package/dist-client/modeller/figure-clips.js +137 -4
  48. package/dist-client/modeller/figure-clips.js.map +1 -1
  49. package/dist-client/modeller/figure-fasten-dialog.js +1 -0
  50. package/dist-client/modeller/figure-fasten-dialog.js.map +1 -1
  51. package/dist-client/modeller/figure-fasten-drawing.d.ts +3 -1
  52. package/dist-client/modeller/figure-fasten-drawing.js +13 -5
  53. package/dist-client/modeller/figure-fasten-drawing.js.map +1 -1
  54. package/dist-client/modeller/figure-links.d.ts +5 -0
  55. package/dist-client/modeller/figure-links.js +22 -0
  56. package/dist-client/modeller/figure-links.js.map +1 -1
  57. package/dist-client/modeller/figure-material-panel.d.ts +2 -0
  58. package/dist-client/modeller/figure-material-panel.js +53 -4
  59. package/dist-client/modeller/figure-material-panel.js.map +1 -1
  60. package/dist-client/modeller/figure-parts.d.ts +1 -1
  61. package/dist-client/modeller/figure-parts.js +5 -1
  62. package/dist-client/modeller/figure-parts.js.map +1 -1
  63. package/dist-client/modeller/figure-pipe-panel.d.ts +29 -0
  64. package/dist-client/modeller/figure-pipe-panel.js +221 -0
  65. package/dist-client/modeller/figure-pipe-panel.js.map +1 -0
  66. package/dist-client/modeller/figure-preview.d.ts +8 -0
  67. package/dist-client/modeller/figure-preview.js +128 -4
  68. package/dist-client/modeller/figure-preview.js.map +1 -1
  69. package/dist-client/modeller/figure-section-editor.d.ts +5 -0
  70. package/dist-client/modeller/figure-section-editor.js +33 -3
  71. package/dist-client/modeller/figure-section-editor.js.map +1 -1
  72. package/dist-client/modeller/links.d.ts +6 -0
  73. package/dist-client/modeller/links.js +17 -2
  74. package/dist-client/modeller/links.js.map +1 -1
  75. package/dist-client/modeller/material-edit.d.ts +8 -0
  76. package/dist-client/modeller/material-edit.js +8 -0
  77. package/dist-client/modeller/material-edit.js.map +1 -1
  78. package/dist-client/modeller/maturity.js +16 -5
  79. package/dist-client/modeller/maturity.js.map +1 -1
  80. package/dist-client/modeller/palette.js +9 -0
  81. package/dist-client/modeller/palette.js.map +1 -1
  82. package/dist-client/modeller/pipe-path.d.ts +19 -0
  83. package/dist-client/modeller/pipe-path.js +14 -0
  84. package/dist-client/modeller/pipe-path.js.map +1 -0
  85. package/dist-client/modeller/refusals.d.ts +12 -1
  86. package/dist-client/modeller/refusals.js +67 -0
  87. package/dist-client/modeller/refusals.js.map +1 -1
  88. package/dist-client/modeller/section-controls.js +2 -1
  89. package/dist-client/modeller/section-controls.js.map +1 -1
  90. package/dist-client/modeller/section-drawing.d.ts +5 -0
  91. package/dist-client/modeller/section-drawing.js +19 -1
  92. package/dist-client/modeller/section-drawing.js.map +1 -1
  93. package/dist-client/modeller/starting-shape.d.ts +9 -2
  94. package/dist-client/modeller/starting-shape.js +8 -3
  95. package/dist-client/modeller/starting-shape.js.map +1 -1
  96. package/dist-client/tsconfig.tsbuildinfo +1 -1
  97. package/package.json +8 -8
  98. package/test/align.test.ts +28 -6
  99. package/test/browser/editing-page.js +21 -1
  100. package/test/browser/editing.check.mjs +124 -0
  101. package/test/browser/links.check.mjs +49 -8
  102. package/test/browser/modeller.check.mjs +27 -1
  103. package/test/browser/part-ids.check.mjs +60 -3
  104. package/test/browser/parts.check.mjs +2 -2
  105. package/test/browser/places-mesh.check.mjs +14 -8
  106. package/test/browser/screen.check.mjs +54 -1
  107. package/test/browser/section-page.js +7 -1
  108. package/test/browser/section.check.mjs +81 -0
  109. package/test/browser/side-panel-sweep.check.mjs +13 -0
  110. package/test/clips.test.ts +30 -1
  111. package/test/data-motion.test.ts +14 -1
  112. package/test/fasten-geometry.test.ts +13 -2
  113. package/test/joint-frames.test.ts +12 -2
  114. package/test/links.test.ts +24 -0
  115. package/test/material.test.ts +15 -1
  116. package/test/maturity.test.ts +19 -1
  117. package/test/palette-icons.test.ts +2 -1
  118. package/test/pipe-panel.test.ts +33 -0
  119. package/test/refusals.test.ts +29 -0
  120. package/test/revision.test.ts +1 -1
  121. package/test/section-editor.test.ts +17 -1
  122. package/translations/en.json +86 -3
  123. package/translations/es.json +86 -3
  124. package/translations/ja.json +86 -3
  125. package/translations/ko.json +86 -3
  126. package/translations/ms.json +86 -3
  127. package/translations/zh.json +86 -3
@@ -1 +1 @@
1
- {"version":3,"file":"figure-preview.js","sourceRoot":"","sources":["../../client/modeller/figure-preview.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,0BAA0B,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE7G,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAqB,MAAM,0DAA0D,CAAA;AACnJ,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO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uB;AAEtB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAsC;AAEzD;IAAX,QAAQ,EAAE;;+CAAc;AACR;IAAhB,KAAK,EAAE;;gDAAuB;AAEd;IAAhB,KAAK,EAAE;;0CAAqC;AAE5B;IAAhB,KAAK,EAAE;;6CAAqD;AAY5C;IAAhB,KAAK,EAAE;;2CAA4D;AA5SzD,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAytBzB","sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { unitWord } from './unit-words.js'\nimport * as THREE from 'three'\nimport { compileFigureAsset } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureDataRow, FigureDataValue, FigureGraphStateInput } from '@hatiolab/figure-model'\nimport { create, figureLegendSourcesChanged, registerFigure, unregisterFigure } from '@hatiolab/things-scene'\n\nimport { DEFAULT_VIEW, previewBoardDepth, sceneLook, WORKBENCH, type ViewSettings } from '@things-factory/figure-viewer/dist-client/figure-view.js'\nimport { dialShape } from './angle-dial.js'\nimport { domainOf, motionWrittenByData, typedValueOf, valueRowsOf } from './data-interface.js'\nimport { derivedOf, type FigureRevision } from './revision.js'\nimport { authoredSizeOf, bodyAtSize, PREVIEW_FACTOR, PREVIEW_WAYS, previewClampsOf, previewInstances, previewOneInstance, previewTypeOf, setupPartOf, sizeSpanOf, sizeWithinRange } from '@things-factory/figure-viewer/dist-client/preview-model.js'\nimport { previewSizeWordsOf } from './preview-size.js'\n\n/**\n * The figure placed on a board.\n *\n * The editing canvas shows the figure at the size it was made. Half of what a figure is lies in how it answers a\n * different size, so here the figure being authored is registered as a board registers it and placed as a\n * `FigureInstance` the author stretches with a slider per axis the figure lets change, its size and its rows' counts\n * said beside it (first 15 minutes, 2026-10-16: eight variants side by side at one scale made a 60 mm roller on a 3 m\n * conveyor a speck). The eight -- the size it was made, and each of the seven ways of growing one, two or three axes\n * twice as large, four to a row -- are a choice in the legend. The board draws them as it will on a real board --\n * placement, lights, environment, the same renderer.\n *\n * The controls: each value that poses the figure with a slider (and a dial for an angle), each clip's\n * speed, and 「이 자세를 기본으로」 to keep the pose as the one it stands in. Nothing here is edited; the canvas edits.\n */\n\ninterface SceneHandle {\n dispose?: () => void\n resize?: () => void\n fit?: (type?: string) => void\n /** The scene's container: it can make the content again while keeping the 3D renderer and the camera (undo and redo use it). */\n rootContainer?: {\n rebuildContentModel?: (model: unknown, options?: { preserveThreeD?: boolean }) => void\n /** The scene's legends, by name (ADR-0166 7): what its figures' tables choose from. */\n style?: Record<string, unknown>\n }\n root?: {\n set?: (patch: Record<string, unknown>) => void\n fitCameraToModel?: () => void\n components?: { set?: (property: string, value: unknown) => void }[]\n }\n}\n\n@customElement('figure-preview')\nexport class FigurePreview extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background-color: ${unsafeCSS(WORKBENCH)};\n font-size: var(--ui-t-small, 11.5px);\n }\n div[stage] {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n }\n /*\n The size help and the posing controls share the stage's bottom edge. Each stood in its own corner, so on a narrow\n stage (the 1024 width, both side panels open) the controls lay over the help's button. One row that wraps keeps both\n whole: side by side when there is room, the controls above the help when there is not.\n */\n /* A variant's name over its box: small, on the stage, never in the way of the pointer. */\n div[tags] {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n }\n div[tags] span {\n position: absolute;\n transform: translate(-50%, calc(-100% - 4px));\n padding: 1px 6px;\n white-space: nowrap;\n font-size: var(--ui-t-micro, 11px);\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 4px;\n }\n div[foot] {\n position: absolute;\n left: 8px;\n right: 8px;\n bottom: 8px;\n display: flex;\n flex-wrap: wrap-reverse;\n justify-content: space-between;\n align-items: flex-end;\n gap: 8px;\n pointer-events: none;\n }\n div[foot] > * { pointer-events: auto; }\n div[setup] { max-width: min(320px, 100%); padding: 12px; border-radius: 8px; background: rgba(28,28,30,.9); color: #fff; display: grid; gap: 8px; }\n div[setup] p { margin: 0; line-height: 1.5; }\n /* The help's choice and button in the look of the controls beside it, not the browser's grey (sweep 2026-10-27 U7). */\n div[setup] select,\n div[setup] button {\n min-width: 0;\n padding: 4px 8px;\n font: inherit;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[setup] button {\n cursor: pointer;\n }\n div[setup] button:hover {\n background-color: rgba(255, 255, 255, 0.24);\n }\n div[setup] option {\n color: initial;\n }\n /* Which is which: side by side means nothing without a legend. */\n div[legend] {\n position: absolute;\n top: 8px;\n left: 8px;\n display: flex;\n gap: 6px;\n padding: 4px 8px;\n color: rgba(255, 255, 255, 0.9);\n background-color: rgba(28, 28, 30, 0.6);\n border-radius: 6px;\n font-size: var(--ui-t-micro, 11px);\n flex-wrap: wrap;\n max-width: calc(100% - 16px);\n }\n /* One figure or eight: two words in the legend, the one shown pressed. */\n div[legend] button[way] {\n padding: 0 6px;\n font: inherit;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n opacity: 0.7;\n }\n div[legend] button[way][aria-pressed='true'] {\n opacity: 1;\n background-color: rgba(255, 255, 255, 0.18);\n }\n /* The one figure's size: under the legend, in the controls' look. */\n div[sizes] {\n position: absolute;\n top: 40px;\n left: 8px;\n display: grid;\n gap: 6px;\n padding: 8px 10px;\n max-width: calc(100% - 16px);\n box-sizing: border-box;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 8px;\n font-size: var(--ui-t-micro, 11px);\n }\n div[sizes] label {\n display: grid;\n grid-template-columns: 32px 160px 52px;\n align-items: center;\n gap: 8px;\n }\n div[sizes] input {\n width: 100%;\n accent-color: var(--md-sys-color-primary);\n }\n div[sizes] output {\n font-variant-numeric: tabular-nums;\n text-align: right;\n }\n div[sizes] p[said] {\n margin: 0;\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n }\n /* A variant drawn at another size than it asks: the figure does not declare that size. */\n div[legend] small[clamp] {\n margin-left: 4px;\n color: #ffcc80;\n }\n /*\n One grid for every row, each row its subgrid: the rows' names in one column, so a value's field starts where the one\n above it does whatever the names' lengths (a row of its own grid started 28px off, sweep 2026-10-27 U7).\n */\n div[clips] {\n margin-left: auto;\n display: grid;\n grid-template-columns: auto 20px 96px 34px;\n gap: 6px 8px;\n align-items: center;\n padding: 8px 10px;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 8px;\n font-size: var(--ui-t-micro, 11px);\n }\n div[clips] > * {\n grid-column: 1 / -1;\n }\n div[clips] label {\n display: grid;\n grid-template-columns: subgrid;\n align-items: center;\n }\n /* A motion group's clip: as wide as the dial, slider and value together, so its name reads. */\n div[clips] select {\n grid-column: 2 / -1;\n min-width: 0;\n font: inherit;\n color: inherit;\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[clips] svg[dial] {\n width: 20px;\n height: 20px;\n }\n div[clips] svg[dial] path {\n fill: rgba(255, 255, 255, 0.22);\n }\n div[clips] svg[dial] line {\n stroke: var(--md-sys-color-primary, #7cc6ff);\n stroke-width: 2;\n stroke-linecap: round;\n }\n div[clips] svg[dial] circle {\n fill: none;\n stroke: rgba(255, 255, 255, 0.35);\n }\n div[clips] button[pose] {\n align-self: stretch;\n padding: 4px 8px;\n font: inherit;\n font-size: var(--ui-t-micro, 11px);\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n cursor: pointer;\n }\n div[clips] button[pose]:hover {\n background-color: rgba(255, 255, 255, 0.24);\n }\n div[clips] span[drive] {\n opacity: 0.6;\n font-size: var(--ui-t-micro, 11px);\n }\n div[clips] input {\n width: 96px;\n accent-color: var(--md-sys-color-primary);\n }\n /* A value typed, not slid: in the look of the group's clip choice, starting where the sliders start. */\n div[clips] input:not([type='range']) {\n box-sizing: border-box;\n min-width: 0;\n font: inherit;\n color: inherit;\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[clips] input:not([type='range']):not([type='number']) {\n grid-column: 3 / -1;\n width: auto;\n }\n div[clips] output {\n font-variant-numeric: tabular-nums;\n text-align: right;\n opacity: 0.85;\n }\n div[cannot] {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n text-align: center;\n line-height: 1.6;\n color: #f4f4f4;\n background-color: ${unsafeCSS(WORKBENCH)};\n }\n `\n\n /** The figure being authored, as the editor holds it now. */\n @property({ attribute: false }) revision?: FigureRevision\n private get asset(): FigureAsset | undefined {\n return this.revision?.asset\n }\n /** The size the figure was made at, once per version: without a declared size it is measured by evaluating the figure. */\n private authoredSize(): { x: number; y: number; z: number } {\n const shown = this.revision!\n return derivedOf(shown, 'authored-size', () => authoredSizeOf(shown.asset))\n }\n /** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */\n @property() context = ''\n /**\n * In front. Once made, the preview stays standing behind the edit canvas, so coming back to it is not a new 3D scene\n * (about 300 ms): out of sight it does not follow the figure, and when it is shown again it makes its content again\n * inside the scene that stands if the figure changed meanwhile.\n */\n @property({ type: Boolean }) active = true\n private stale = false\n @property({ attribute: false }) view: ViewSettings = DEFAULT_VIEW\n\n @query('div[stage]') private stage!: HTMLDivElement\n @state() private cannot = ''\n /** Clip speeds and control values given here -- the preview's, not the figure's. */\n @state() private driving: Record<string, number> = {}\n @state() private giving: Record<string, number> = {}\n /** Per motion group, the clip played here and how fast (ADR-0051 §3.2) -- the preview's, as a board's \\`motion\\`. */\n @state() private moving: Record<string, { clip: string; speed: number }> = {}\n /** Data values given here by accessor, as a board's saved `figureValues`: what moves a group whose clip or speed the data writes. */\n @state() private valuing: Record<string, FigureDataValue> = {}\n /** Data tried in the data tab: the preview's figures take it as their \\`data\\`, as a board's data source gives it; null when none is. */\n @property({ attribute: false }) sample: unknown = null\n /** Sample legends by role (ADR-0166 10): the scene's legends named as the roles, as a board would give them. */\n @property({ attribute: false }) legends: Record<string, unknown> = {}\n /** The part chosen in the editor. The size help starts on it, so the help speaks of the part the author was working on. */\n @property() selected = ''\n @state() private setupPart = ''\n /** One figure stretched by sliders, or the eight ways of growing side by side. */\n @state() private way: 'one' | 'eight' = 'one'\n /** The size the one figure is tried at; the authored size when the figure stands up. */\n @state() private trying?: { x: number; y: number; z: number }\n private board = { width: 0, height: 0 }\n\n /** What is being tried here now -- clip speeds and control values -- for the AI dock to hear with a request; none when nothing is. */\n tried(): { clips?: Record<string, number>; controls?: Record<string, number> } | undefined {\n const clips = Object.keys(this.driving).length ? { ...this.driving } : undefined\n const controls = Object.keys(this.giving).length ? { ...this.giving } : undefined\n return clips || controls ? { ...(clips ? { clips } : {}), ...(controls ? { controls } : {}) } : undefined\n }\n\n private scene?: SceneHandle\n /* The eight variants named over each one, where the camera shows it (sweep 2026-10-27 M4). */\n @state() private tags: { name: string; x: number; y: number }[] = []\n private tagFrame = 0\n private standing?: string\n private registered?: string\n private watcher?: ResizeObserver\n\n render() {\n const asset = this.asset\n const controls = asset ? asset.document.model.inputs.filter(i => i.role === 'state') : []\n /* Clips in a motion group are played by the group's choice of clip, not each by its own speed. */\n const grouped = new Set((asset?.motionGroups ?? []).flatMap(g => g.clips))\n const clips = asset ? [...new Set((asset.drivers ?? []).map(d => d.clip))].filter(c => !grouped.has(c)) : []\n let clampsByWay: ReturnType<typeof previewClampsOf> = {}\n try {\n clampsByWay = asset ? previewClampsOf(asset, this.authoredSize()) : {}\n } catch {\n clampsByWay = {}\n }\n /* The part the help speaks of: the one picked in it, else the one chosen in the editor, else the first. */\n const setupPart = setupPartOf(this.setupPart, this.selected, asset?.appearance.map(p => p.target) ?? [])\n return html`<div stage></div>\n ${this.tags.length ? html`<div tags>${this.tags.map(t => html`<span style=${`left:${t.x}px;top:${t.y}px`}>${t.name}</span>`)}</div>` : nothing}\n ${this.cannot\n ? html`<div cannot>${this.cannot}</div>`\n : html`<div legend>\n ${(['one', 'eight'] as const).map(\n way => html`<button way=${way} aria-pressed=${String(this.way === way)} @click=${() => this.chooseWay(way)}>${i18next.t(`figure.label.preview-way-${way}`)}</button>`\n )}\n ${this.way === 'one' ? nothing : PREVIEW_WAYS.map(way => {\n const clamps = clampsByWay[way.name] ?? []\n return html`<span>\n ${way.axes.length ? way.name : i18next.t('figure.label.preview-base')}\n ${clamps.length\n ? html`<small clamp>${clamps.map(c => i18next.t('figure.text.preview-clamped', { axis: c.axis.toUpperCase(), asked: c.asked.toLocaleString(), used: c.used.toLocaleString() })).join(' · ')}</small>`\n : nothing}\n </span>`\n })}\n </div>\n ${this.way === 'one' && asset && this.trying ? this.renderSizes(asset, this.trying) : nothing}\n <div foot>${asset?.appearance.length ? html`<div setup>\n <p>${i18next.t('figure.text.preview-setup')}</p>\n <select aria-label=${i18next.t('figure.label.resize-part')} @change=${(e: Event) => this.setupPart = (e.target as HTMLSelectElement).value}>\n ${asset.appearance.map(p => html`<option value=${p.target} ?selected=${p.target === setupPart}>${p.target}</option>`)}\n </select>\n <button @click=${() => this.dispatchEvent(new CustomEvent('configure-size', { detail: { part: setupPart }, bubbles: true, composed: true }))}>${i18next.t('figure.button.configure-size')}</button>\n </div>` : nothing}\n ${controls.length + clips.length + (asset?.motionGroups?.length ?? 0) + (asset ? valueRowsOf(asset).length : 0) ? this.renderDrivers(asset!, controls, clips) : nothing}</div>`}`\n }\n\n /** The one figure's size: a slider per axis the figure lets change, and what it is at the size tried. */\n private renderSizes(asset: FigureAsset, size: { x: number; y: number; z: number }) {\n const say = (key: string, params?: Record<string, string>) => i18next.t(key, params)\n return html`<div sizes>\n ${(['x', 'y', 'z'] as const).map(axis => {\n const range = sizeSpanOf(asset, axis)\n if (!range) return nothing\n return html`<label>\n <span>${i18next.t(`figure.label.measure-${axis}`)}</span>\n <input type=\"range\" aria-label=${i18next.t(`figure.label.measure-${axis}`)} min=${range.min} max=${range.max} step=\"any\" .value=${String(size[axis])}\n @input=${(e: Event) => this.tryAxis(axis, (e.target as HTMLInputElement).valueAsNumber)}\n @change=${() => this.fitView()} />\n <output>${Math.round(size[axis]).toLocaleString()}</output>\n </label>`\n })}\n <p said>${previewSizeWordsOf(asset, size, say)}</p>\n </div>`\n }\n\n /*\n Each variant's name over its top, followed while the eight stand: the legend alone listed 「x · y · x·y …」 with\n nothing saying which box was which (sweep 2026-10-27 M4).\n */\n private followTags() {\n cancelAnimationFrame(this.tagFrame)\n if (this.way !== 'eight' || !this.scene) {\n if (this.tags.length) this.tags = []\n return\n }\n const names = new Map(PREVIEW_WAYS.map(way => [`at-${way.name}`, way.axes.length ? way.name : i18next.t('figure.label.preview-base')]))\n const box = new THREE.Box3()\n const top = new THREE.Vector3()\n const step = () => {\n const root = this.scene?.root as { activeCamera3d?: THREE.Camera; renderer3d?: THREE.WebGLRenderer; components?: { model?: { id?: string }; _realObject?: { object3d?: THREE.Object3D } }[] } | undefined\n const camera = root?.activeCamera3d\n const canvas = root?.renderer3d?.domElement\n if (!camera || !canvas || this.way !== 'eight') return\n const at = canvas.getBoundingClientRect()\n const host = this.getBoundingClientRect()\n const tags: { name: string; x: number; y: number }[] = []\n for (const component of root?.components ?? []) {\n const name = names.get(component.model?.id ?? '')\n const object = component._realObject?.object3d\n if (!name || !object) continue\n box.setFromObject(object)\n if (box.isEmpty()) continue\n box.getCenter(top)\n top.y = box.max.y\n top.project(camera)\n if (top.z > 1) continue\n tags.push({ name, x: Math.round((top.x * 0.5 + 0.5) * at.width + at.left - host.left), y: Math.round((-top.y * 0.5 + 0.5) * at.height + at.top - host.top) })\n }\n if (JSON.stringify(tags) !== JSON.stringify(this.tags)) this.tags = tags\n this.tagFrame = requestAnimationFrame(step)\n }\n this.tagFrame = requestAnimationFrame(step)\n }\n\n private chooseWay(way: 'one' | 'eight') {\n if (way === this.way) return\n this.way = way\n this.standUp()\n this.followTags()\n /* The content is made again inside the scene standing, which keeps the camera: from one figure to eight it stood inside them. */\n requestAnimationFrame(() => this.fitView())\n }\n\n /** The one figure at another size on an axis, held to what the figure declares, its centre kept on the board's. */\n private tryAxis(axis: 'x' | 'y' | 'z', value: number) {\n const asset = this.asset\n const used = asset ? sizeWithinRange(asset, axis, value) : undefined\n if (used === undefined || !this.trying) return\n this.trying = { ...this.trying, [axis]: used }\n const instance = this.scene?.root?.components?.[0] as { model?: { width?: number; height?: number }; set(props: Record<string, unknown>): void } | undefined\n /* The instance's box is the body at the sizes tried, not the sizes (bodyAtSize). */\n const box = bodyAtSize(asset!, this.trying) ?? this.trying\n instance?.set({ width: box.x, depth: box.y, height: box.z })\n const { width = 0, height = 0 } = instance?.model ?? {}\n instance?.set({ left: this.board.width / 2 - width / 2, top: this.board.height / 2 - height / 2 })\n }\n\n /** The figure as stretched, whole in view: done once the slider is let go, so the ground does not slide under a drag. */\n fitView() {\n this.scene?.fit?.('ratio')\n this.scene?.root?.fitCameraToModel?.()\n }\n\n private renderDrivers(asset: FigureAsset, controls: FigureGraphStateInput[], clips: string[]) {\n const changed = controls.filter(c => this.giving[c.id] !== undefined && this.giving[c.id] !== asset.stateDefaults[c.id])\n return html`<div clips>\n ${changed.length\n ? html`<button pose title=${i18next.t('figure.text.pose-as-default-explained')} @click=${() => this.poseAsDefault()}>\n ${i18next.t('figure.button.pose-as-default')}\n </button>`\n : nothing}\n ${controls.map(control => {\n const value = this.giving[control.id] ?? asset.stateDefaults[control.id] ?? control.min\n const step = Math.max((control.max - control.min) / 100, 0.01)\n const label = asset.stateInputs?.[control.id]?.label ?? control.id\n return html`<label>\n <span>${label} <span drive>${unitWord(control.unit)}</span></span>\n ${this.renderDial(control, value)}\n <input\n type=\"range\"\n min=${control.min}\n max=${control.max}\n step=${step}\n .value=${String(value)}\n @input=${(e: Event) => this.give(control.id, Number((e.target as HTMLInputElement).value))}\n />\n <output>${Math.round(value)}</output>\n </label>`\n })}\n ${clips.map(clip => {\n /*\n A clip nothing has driven stands still, here as on a board: the instances get a speed only from `drive`. The\n slider showed 1.00 over rollers that did not turn (2026-10-03). It shows what plays -- 0 until moved.\n */\n const value = this.driving[clip] ?? 0\n return html`<label>\n <span>${clip} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>\n <span></span>\n <input type=\"range\" min=\"0\" max=\"3\" step=\"0.05\" .value=${String(value)} @input=${(e: Event) => this.drive(clip, Number((e.target as HTMLInputElement).value))} />\n <output>${value.toFixed(2)}</output>\n </label>`\n })}\n ${valueRowsOf(asset).map(row => this.renderDataValue(row))}\n ${(asset.motionGroups ?? []).map(group => {\n const playing = this.moving[group.id] ?? { clip: group.defaultClip, speed: 0 }\n /* A field the data writes wins over the group's own setting, here as on a board: it is moved by the data values above. */\n const byData = motionWrittenByData(asset)[group.id] ?? { clip: false, speed: false }\n return html`${byData.clip\n ? nothing\n : html`<label>\n <span>${group.label} <span drive>${i18next.t('figure.label.clip')}</span></span>\n <select aria-label=${group.label} @change=${(e: Event) => this.move(group.id, { ...playing, clip: (e.target as HTMLSelectElement).value })}>\n ${group.clips.map(c => html`<option value=${c} ?selected=${c === playing.clip}>${c}</option>`)}\n </select>\n </label>`}\n ${byData.speed\n ? nothing\n : html`<label>\n <span>${group.label} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>\n <span></span>\n <input type=\"range\" min=\"0\" max=\"3\" step=\"0.05\" .value=${String(playing.speed)} @input=${(e: Event) => this.move(group.id, { ...playing, speed: Number((e.target as HTMLInputElement).value) })} />\n <output>${playing.speed.toFixed(2)}</output>\n </label>`}`\n })}\n </div>`\n }\n\n /** A value the data's bindings read, as the board's saved values give it: a number on a slider when it has a range, a choice when it is closed. */\n private renderDataValue(row: FigureDataRow) {\n const node = row.node\n const label = row.label ?? row.path\n const fallback = 'default' in node ? node.default : undefined\n const value = this.valuing[row.path] ?? fallback\n if (node.kind === 'number') {\n const ranged = node.min !== undefined && node.max !== undefined && node.max > node.min\n return html`<label>\n <span>${label} <span drive>${unitWord(node.unit)}</span></span>\n <span></span>\n ${ranged\n ? html`<input type=\"range\" min=${node.min!} max=${node.max!} step=${Math.max((node.max! - node.min!) / 100, 0.01)} .value=${String(value ?? node.min)} @input=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n <output>${value === undefined ? '' : Number(value).toFixed(2)}</output>`\n : html`<input type=\"number\" step=\"any\" .value=${value === undefined ? '' : String(value)} @change=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n <span></span>`}\n </label>`\n }\n const domain = domainOf(node)\n if (!domain.length)\n return html`<label>\n <span>${label}</span>\n <input aria-label=${label} .value=${value === undefined ? '' : String(value)} @change=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n </label>`\n return html`<label>\n <span>${label}</span>\n <select aria-label=${label} @change=${(e: Event) => this.value(row, (e.target as HTMLSelectElement).value)}>\n ${domain.map(v => html`<option value=${String(v)} ?selected=${v === value}>${typeof v === 'boolean' ? i18next.t(v ? 'figure.label.data-true' : 'figure.label.data-false') : v}</option>`)}\n </select>\n </label>`\n }\n\n private value(row: FigureDataRow, typed: string) {\n const value = typedValueOf(row.node, typed)\n const next = { ...this.valuing }\n if (typeof value === 'number' && Number.isNaN(value)) delete next[row.path]\n else next[row.path] = value\n this.valuing = next\n this.tellInstances('figureValues', this.valuing)\n }\n\n private move(group: string, playing: { clip: string; speed: number }) {\n this.moving = { ...this.moving, [group]: playing }\n this.tellInstances('motion', Object.fromEntries(Object.entries(this.moving).map(([id, m]) => [id, { ...m, paused: false }])))\n }\n\n private renderDial(control: { unit: string; min: number; max: number }, value: number) {\n if (control.unit !== 'deg') return html`<span></span>`\n const dial = dialShape(control.min, control.max, value)\n const span = dial.radius * 2 + 2\n return html`<svg dial viewBox=\"0 0 ${span} ${span}\" aria-hidden=\"true\">\n <path d=${dial.sector}></path>\n <circle cx=${dial.centre.x} cy=${dial.centre.y} r=${dial.radius}></circle>\n <line x1=${dial.centre.x} y1=${dial.centre.y} x2=${dial.needle.x} y2=${dial.needle.y}></line>\n </svg>`\n }\n\n private drive(clip: string, value: number) {\n this.driving = { ...this.driving, [clip]: value }\n this.tellInstances('clips', this.driving)\n }\n\n private give(id: string, value: number) {\n this.giving = { ...this.giving, [id]: value }\n this.tellInstances('parameters', this.giving)\n }\n\n private poseAsDefault() {\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-state-defaults', values: { ...this.giving } } }, bubbles: true, composed: true }))\n this.giving = {}\n }\n\n private tellInstances(key: 'clips' | 'parameters' | 'motion' | 'figureValues', values: Record<string, unknown> | null) {\n for (const component of this.scene?.root?.components ?? []) component.set?.(key, values === null ? null : { ...values })\n }\n\n /** The tried data to the figures standing now, as their \\`data\\`: the preview's board is not saved. */\n private tellData(data: unknown) {\n for (const component of this.scene?.root?.components ?? []) component.set?.('data', data === null || data === undefined ? null : structuredClone(data))\n }\n\n\n /** The data sample to the figures standing now. */\n private tellSample() {\n if (this.sample !== null && this.sample !== undefined) this.tellData(this.sample)\n }\n\n /** The sample legends as the scene's (its root container's, where a board's are): its tables choose again. */\n private tellLegends() {\n const container = this.scene?.rootContainer\n if (!container) return\n container.style = { ...this.legends }\n figureLegendSourcesChanged()\n }\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('sample') && this.scene) this.tellData(this.sample)\n if (changed.has('legends') && this.scene) this.tellLegends()\n if (!this.hasUpdated) return\n if (!this.active) {\n this.stale = true\n return\n }\n if (this.stale || changed.has('active')) {\n this.stale = false\n this.standUp()\n return\n }\n if (changed.has('revision') || changed.has('context')) {\n this.standUp()\n return\n }\n if (!changed.has('view')) return\n const before = changed.get('view') as ViewSettings | undefined\n const now = this.view ?? DEFAULT_VIEW\n if (before?.placement !== now.placement || before?.ceilingHeight !== now.ceilingHeight) this.standUp()\n else this.scene?.root?.set?.(sceneLook(now))\n }\n\n firstUpdated() {\n this.standUp()\n this.watcher = new ResizeObserver(() => {\n if (this.active) this.scene?.resize?.()\n })\n this.watcher.observe(this)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.watcher?.disconnect()\n this.watcher = undefined\n this.teardown()\n }\n\n private standUp() {\n const asset = this.asset\n const view = this.view ?? DEFAULT_VIEW\n if (!asset || !asset.appearance.length) {\n this.cannot = i18next.t('figure.text.preview-needs-a-part')\n this.teardown()\n return\n }\n const signature = JSON.stringify([asset, view.placement, view.ceilingHeight, this.way])\n if (this.scene && this.standing === signature) return\n try {\n compileFigureAsset(asset)\n } catch {\n this.cannot = i18next.t('figure.text.preview-blocked-by-errors')\n this.teardown()\n return\n }\n try {\n /* Registered as a board registers it, under a type of this preview's own: a real type's drawings stay as they are. */\n const type = previewTypeOf(this.context)\n const size = this.authoredSize()\n /*\n The figure changed under a scene that is standing: the same type is registered again and the content made again\n inside the same 3D scene. Making a scene anew costs about a third of a second and its first drawing compiles the\n shaders again -- a value typed beside the preview held the screen for seconds. The scene is made anew only when\n there is none, for another figure, or when the content cannot be made again in place.\n */\n const again = this.scene?.rootContainer?.rebuildContentModel && this.registered === type\n if (!again) this.teardown()\n this.driving = {}\n this.moving = {}\n this.valuing = {}\n registerFigure(type, asset)\n this.registered = type\n /* Each instance stands in its body at the size it is asked (bodyAtSize), as a board reads it. */\n const boxOf = (asked: { x: number; y: number; z: number }) => bodyAtSize(asset, asked) ?? asked\n const { components, board } = this.way === 'one' ? previewOneInstance(type, boxOf(size)) : previewInstances(type, size, boxOf)\n this.board = board\n this.trying = this.way === 'one' ? { ...size } : undefined\n const model = {\n type: 'model-layer',\n width: board.width,\n height: board.height,\n /* As tall as the figure may grow: twice for the eight, the top of the height slider for the one. */\n depth: previewBoardDepth({ placement: asset.placement, base: { y: size.y } }, view.ceilingHeight, this.way === 'one' ? Math.max(1, (sizeSpanOf(asset, 'y')?.max ?? size.y) / size.y) : PREVIEW_FACTOR),\n threed: true,\n sky: 'color',\n ...sceneLook(view),\n placement: view.placement,\n heights: { floor: 0, ceiling: view.ceilingHeight },\n pixelRatio: Math.min(3, (window.devicePixelRatio || 1) * 2),\n components\n }\n if (again) {\n try {\n this.scene!.rootContainer!.rebuildContentModel!(model, { preserveThreeD: true })\n this.standing = signature\n this.cannot = ''\n this.tellLegends()\n this.tellSample()\n this.followTags()\n return\n } catch {\n this.teardown()\n registerFigure(type, asset)\n this.registered = type\n }\n }\n this.scene = create({\n target: this.stage,\n model,\n style: { ...this.legends },\n mode: 0\n }) as SceneHandle\n this.standing = signature\n this.scene.resize?.()\n this.scene.fit?.('ratio')\n this.scene.root?.fitCameraToModel?.()\n this.cannot = ''\n this.tellSample()\n this.followTags()\n } catch (error) {\n this.cannot = (error as Error).message\n }\n }\n\n private teardown() {\n cancelAnimationFrame(this.tagFrame)\n this.tags = []\n this.scene?.dispose?.()\n this.scene = undefined\n this.standing = undefined\n if (this.registered) unregisterFigure(this.registered)\n this.registered = undefined\n }\n}\n"]}
1
+ {"version":3,"file":"figure-preview.js","sourceRoot":"","sources":["../../client/modeller/figure-preview.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,0BAA0B,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wB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C,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAsC;AAEzD;IAAX,QAAQ,EAAE;;+CAAc;AACR;IAAhB,KAAK,EAAE;;gDAAuB;AAEd;IAAhB,KAAK,EAAE;;0CAAqC;AAE5B;IAAhB,KAAK,EAAE;;8CAA6C;AAEpC;IAAhB,KAAK,EAAE;;qDAA+B;AAEtB;IAAhB,KAAK,EAAE;;6CAAqD;AAY5C;IAAhB,KAAK,EAAE;;2CAA4D;AA1VzD,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA00BzB","sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { unitWord } from './unit-words.js'\nimport * as THREE from 'three'\nimport { compileFigureAsset } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureDataRow, FigureDataValue, FigureGraphStateInput } from '@hatiolab/figure-model'\nimport { create, figureLegendSourcesChanged, registerFigure, unregisterFigure } from '@hatiolab/things-scene'\n\nimport { DEFAULT_VIEW, previewBoardDepth, sceneLook, WORKBENCH, type ViewSettings } from '@things-factory/figure-viewer/dist-client/figure-view.js'\nimport { parametersForClip } from '@things-factory/figure-viewer/dist-client/detail-motion.js'\nimport { controlsOf } from '@things-factory/figure-viewer/dist-client/controls.js'\nimport { dialShape } from './angle-dial.js'\nimport { dataValueAt, domainOf, motionWrittenByData, typedValueOf, valueRowsOf } from './data-interface.js'\nimport { derivedOf, type FigureRevision } from './revision.js'\nimport { authoredSizeOf, bodyAtSize, PREVIEW_FACTOR, PREVIEW_WAYS, previewClampsOf, previewInstances, previewOneInstance, previewTypeOf, setupPartOf, sizeSpanOf, sizeWithinRange } from '@things-factory/figure-viewer/dist-client/preview-model.js'\nimport { previewSizeWordsOf } from './preview-size.js'\n\n/**\n * The figure placed on a board.\n *\n * The editing canvas shows the figure at the size it was made. Half of what a figure is lies in how it answers a\n * different size, so here the figure being authored is registered as a board registers it and placed as a\n * `FigureInstance` the author stretches with a slider per axis the figure lets change, its size and its rows' counts\n * said beside it (first 15 minutes, 2026-10-16: eight variants side by side at one scale made a 60 mm roller on a 3 m\n * conveyor a speck). The eight -- the size it was made, and each of the seven ways of growing one, two or three axes\n * twice as large, four to a row -- are a choice in the legend. The board draws them as it will on a real board --\n * placement, lights, environment, the same renderer.\n *\n * The controls: each value that poses the figure with a slider (and a dial for an angle), each clip's\n * speed, and 「이 자세를 기본으로」 to keep the pose as the one it stands in. Nothing here is edited; the canvas edits.\n */\n\ninterface SceneHandle {\n dispose?: () => void\n resize?: () => void\n fit?: (type?: string) => void\n /** The scene's container: it can make the content again while keeping the 3D renderer and the camera (undo and redo use it). */\n rootContainer?: {\n rebuildContentModel?: (model: unknown, options?: { preserveThreeD?: boolean }) => void\n /** The scene's legends, by name (ADR-0166 7): what its figures' tables choose from. */\n style?: Record<string, unknown>\n }\n root?: {\n set?: (patch: Record<string, unknown>) => void\n fitCameraToModel?: () => void\n /** The scene's camera presets: the perspective, or a square-on view from one side. */\n setCameraView?: (view: PreviewView) => void\n components?: { set?: (property: string, value: unknown) => void }[]\n }\n}\n\n/* Where the preview looks from: the edit canvas's presets, which the preview's still scene does not draw (robot dog 2026-11-03). */\ntype PreviewView = 'perspective' | 'front' | 'right' | 'top'\nconst PREVIEW_VIEWS: readonly PreviewView[] = ['perspective', 'front', 'right', 'top']\n\n@customElement('figure-preview')\nexport class FigurePreview extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background-color: ${unsafeCSS(WORKBENCH)};\n font-size: var(--ui-t-small, 11.5px);\n }\n div[stage] {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n }\n /*\n The size help and the posing controls share the stage's bottom edge. Each stood in its own corner, so on a narrow\n stage (the 1024 width, both side panels open) the controls lay over the help's button. One row that wraps keeps both\n whole: side by side when there is room, the controls above the help when there is not.\n */\n /* A variant's name over its box: small, on the stage, never in the way of the pointer. */\n div[tags] {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n }\n div[tags] span {\n position: absolute;\n transform: translate(-50%, calc(-100% - 4px));\n padding: 1px 6px;\n white-space: nowrap;\n font-size: var(--ui-t-micro, 11px);\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 4px;\n }\n div[foot] {\n position: absolute;\n left: 8px;\n right: 8px;\n bottom: 8px;\n display: flex;\n flex-wrap: wrap-reverse;\n justify-content: space-between;\n align-items: flex-end;\n gap: 8px;\n pointer-events: none;\n }\n div[foot] > * { pointer-events: auto; }\n div[setup] { max-width: min(320px, 100%); padding: 12px; border-radius: 8px; background: rgba(28,28,30,.9); color: #fff; display: grid; gap: 8px; }\n div[setup] p { margin: 0; line-height: 1.5; }\n /* The help's choice and button in the look of the controls beside it, not the browser's grey (sweep 2026-10-27 U7). */\n div[setup] select,\n div[setup] button {\n min-width: 0;\n padding: 4px 8px;\n font: inherit;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[setup] button {\n cursor: pointer;\n }\n div[setup] button:hover {\n background-color: rgba(255, 255, 255, 0.24);\n }\n div[setup] option {\n color: initial;\n }\n /* Which is which: side by side means nothing without a legend. */\n div[legend] {\n position: absolute;\n top: 8px;\n left: 8px;\n display: flex;\n gap: 6px;\n padding: 4px 8px;\n color: rgba(255, 255, 255, 0.9);\n background-color: rgba(28, 28, 30, 0.6);\n border-radius: 6px;\n font-size: var(--ui-t-micro, 11px);\n flex-wrap: wrap;\n max-width: calc(100% - 16px);\n }\n /* One figure or eight: two words in the legend, the one shown pressed. */\n div[legend] button[way] {\n padding: 0 6px;\n font: inherit;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n opacity: 0.7;\n }\n div[legend] button[view] {\n padding: 0 6px;\n font: inherit;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n opacity: 0.7;\n }\n div[legend] span[views] {\n display: flex;\n gap: 2px;\n padding-left: 6px;\n border-left: 1px solid rgba(255, 255, 255, 0.22);\n }\n div[legend] button[view][aria-pressed='true'],\n div[legend] button[way][aria-pressed='true'] {\n opacity: 1;\n background-color: rgba(255, 255, 255, 0.18);\n }\n /* The one figure's size: under the legend, in the controls' look. */\n div[sizes] {\n position: absolute;\n top: 40px;\n left: 8px;\n display: grid;\n gap: 6px;\n padding: 8px 10px;\n max-width: calc(100% - 16px);\n box-sizing: border-box;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 8px;\n font-size: var(--ui-t-micro, 11px);\n }\n div[sizes] label {\n display: grid;\n grid-template-columns: 32px 160px 52px;\n align-items: center;\n gap: 8px;\n }\n div[sizes] input {\n width: 100%;\n accent-color: var(--md-sys-color-primary);\n }\n div[sizes] output {\n font-variant-numeric: tabular-nums;\n text-align: right;\n }\n div[sizes] p[said] {\n margin: 0;\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n }\n /* A variant drawn at another size than it asks: the figure does not declare that size. */\n div[legend] small[clamp] {\n margin-left: 4px;\n color: #ffcc80;\n }\n /*\n One grid for every row, each row its subgrid: the rows' names in one column, so a value's field starts where the one\n above it does whatever the names' lengths (a row of its own grid started 28px off, sweep 2026-10-27 U7).\n */\n div[clips] {\n margin-left: auto;\n display: grid;\n grid-template-columns: auto 20px 96px 44px;\n gap: 6px 8px;\n align-items: center;\n padding: 8px 10px;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 8px;\n font-size: var(--ui-t-micro, 11px);\n }\n div[clips] > * {\n grid-column: 1 / -1;\n }\n div[clips] label {\n display: grid;\n grid-template-columns: subgrid;\n align-items: center;\n }\n /* A motion group's clip: as wide as the dial, slider and value together, so its name reads. */\n div[clips] select {\n grid-column: 2 / -1;\n min-width: 0;\n font: inherit;\n color: inherit;\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[clips] svg[dial] {\n width: 20px;\n height: 20px;\n }\n div[clips] svg[dial] path {\n fill: rgba(255, 255, 255, 0.22);\n }\n div[clips] svg[dial] line {\n stroke: var(--md-sys-color-primary, #7cc6ff);\n stroke-width: 2;\n stroke-linecap: round;\n }\n div[clips] svg[dial] circle {\n fill: none;\n stroke: rgba(255, 255, 255, 0.35);\n }\n /* Folded, the controls are one button: what they covered -- a leg, say -- can be seen (robot dog 2026-11-03). */\n div[clips] button[fold-controls] {\n justify-self: end;\n padding: 0 4px;\n font: inherit;\n color: inherit;\n background: none;\n border: none;\n cursor: pointer;\n opacity: 0.75;\n }\n div[clips] button[fold-controls]:hover {\n opacity: 1;\n }\n div[clips] button[pose] {\n align-self: stretch;\n padding: 4px 8px;\n font: inherit;\n font-size: var(--ui-t-micro, 11px);\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n cursor: pointer;\n }\n div[clips] button[pose]:hover {\n background-color: rgba(255, 255, 255, 0.24);\n }\n div[clips] span[drive] {\n opacity: 0.6;\n font-size: var(--ui-t-micro, 11px);\n }\n div[clips] input {\n width: 96px;\n accent-color: var(--md-sys-color-primary);\n }\n /* A value typed, not slid: in the look of the group's clip choice, starting where the sliders start. */\n div[clips] input:not([type='range']) {\n box-sizing: border-box;\n min-width: 0;\n font: inherit;\n color: inherit;\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n }\n div[clips] input:not([type='range']):not([type='number']) {\n grid-column: 3 / -1;\n width: auto;\n }\n /* A control's value, typed where the slider cannot land on it (a step of the range's hundredth, robot dog 2026-11-03). */\n div[clips] input[typed] {\n width: 100%;\n padding: 0 3px;\n text-align: right;\n font-variant-numeric: tabular-nums;\n }\n div[clips] label[sampled] output {\n grid-column: 3 / -1;\n text-align: left;\n }\n div[clips] output {\n font-variant-numeric: tabular-nums;\n text-align: right;\n opacity: 0.85;\n }\n div[cannot] {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n text-align: center;\n line-height: 1.6;\n color: #f4f4f4;\n background-color: ${unsafeCSS(WORKBENCH)};\n }\n `\n\n /** The figure being authored, as the editor holds it now. */\n @property({ attribute: false }) revision?: FigureRevision\n private get asset(): FigureAsset | undefined {\n return this.revision?.asset\n }\n /** The size the figure was made at, once per version: without a declared size it is measured by evaluating the figure. */\n private authoredSize(): { x: number; y: number; z: number } {\n const shown = this.revision!\n return derivedOf(shown, 'authored-size', () => authoredSizeOf(shown.asset))\n }\n /** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */\n @property() context = ''\n /**\n * In front. Once made, the preview stays standing behind the edit canvas, so coming back to it is not a new 3D scene\n * (about 300 ms): out of sight it does not follow the figure, and when it is shown again it makes its content again\n * inside the scene that stands if the figure changed meanwhile.\n */\n @property({ type: Boolean }) active = true\n private stale = false\n @property({ attribute: false }) view: ViewSettings = DEFAULT_VIEW\n\n @query('div[stage]') private stage!: HTMLDivElement\n @state() private cannot = ''\n /** Clip speeds and control values given here -- the preview's, not the figure's. */\n @state() private driving: Record<string, number> = {}\n @state() private giving: Record<string, number> = {}\n /** Per motion group, the clip played here and how fast (ADR-0051 §3.2) -- the preview's, as a board's \\`motion\\`. */\n @state() private moving: Record<string, { clip: string; speed: number }> = {}\n /** Data values given here by accessor, as a board's saved `figureValues`: what moves a group whose clip or speed the data writes. */\n @state() private valuing: Record<string, FigureDataValue> = {}\n /** Data tried in the data tab: the preview's figures take it as their \\`data\\`, as a board's data source gives it; null when none is. */\n @property({ attribute: false }) sample: unknown = null\n /** Sample legends by role (ADR-0166 10): the scene's legends named as the roles, as a board would give them. */\n @property({ attribute: false }) legends: Record<string, unknown> = {}\n /** The part chosen in the editor. The size help starts on it, so the help speaks of the part the author was working on. */\n @property() selected = ''\n @state() private setupPart = ''\n /** One figure stretched by sliders, or the eight ways of growing side by side. */\n @state() private way: 'one' | 'eight' = 'one'\n /** Where the camera looks from; a new scene starts in perspective. */\n @state() private looking: PreviewView = 'perspective'\n /** The posing controls folded to their one button. */\n @state() private controlsFolded = false\n /** The size the one figure is tried at; the authored size when the figure stands up. */\n @state() private trying?: { x: number; y: number; z: number }\n private board = { width: 0, height: 0 }\n\n /** What is being tried here now -- clip speeds and control values -- for the AI dock to hear with a request; none when nothing is. */\n tried(): { clips?: Record<string, number>; controls?: Record<string, number> } | undefined {\n const clips = Object.keys(this.driving).length ? { ...this.driving } : undefined\n const controls = Object.keys(this.giving).length ? { ...this.giving } : undefined\n return clips || controls ? { ...(clips ? { clips } : {}), ...(controls ? { controls } : {}) } : undefined\n }\n\n private scene?: SceneHandle\n /* The eight variants named over each one, where the camera shows it (sweep 2026-10-27 M4). */\n @state() private tags: { name: string; x: number; y: number }[] = []\n private tagFrame = 0\n private standing?: string\n private registered?: string\n private watcher?: ResizeObserver\n\n render() {\n const asset = this.asset\n const controls = asset ? asset.document.model.inputs.filter(i => i.role === 'state') : []\n /* Clips in a motion group are played by the group's choice of clip, not each by its own speed. */\n const grouped = new Set((asset?.motionGroups ?? []).flatMap(g => g.clips))\n const clips = asset ? [...new Set((asset.drivers ?? []).map(d => d.clip))].filter(c => !grouped.has(c)) : []\n let clampsByWay: ReturnType<typeof previewClampsOf> = {}\n try {\n clampsByWay = asset ? previewClampsOf(asset, this.authoredSize()) : {}\n } catch {\n clampsByWay = {}\n }\n /* The part the help speaks of: the one picked in it, else the one chosen in the editor, else the first. */\n const setupPart = setupPartOf(this.setupPart, this.selected, asset?.appearance.map(p => p.target) ?? [])\n return html`<div stage></div>\n ${this.tags.length ? html`<div tags>${this.tags.map(t => html`<span style=${`left:${t.x}px;top:${t.y}px`}>${t.name}</span>`)}</div>` : nothing}\n ${this.cannot\n ? html`<div cannot>${this.cannot}</div>`\n : html`<div legend>\n ${(['one', 'eight'] as const).map(\n way => html`<button way=${way} aria-pressed=${String(this.way === way)} @click=${() => this.chooseWay(way)}>${i18next.t(`figure.label.preview-way-${way}`)}</button>`\n )}\n <span views>\n ${PREVIEW_VIEWS.map(\n view => html`<button view=${view} aria-pressed=${String(this.looking === view)} @click=${() => this.lookFrom(view)}>${i18next.t(`figure.label.preview-view-${view}`)}</button>`\n )}\n </span>\n ${this.way === 'one' ? nothing : PREVIEW_WAYS.map(way => {\n const clamps = clampsByWay[way.name] ?? []\n return html`<span>\n ${way.axes.length ? way.name : i18next.t('figure.label.preview-base')}\n ${clamps.length\n ? html`<small clamp>${clamps.map(c => i18next.t('figure.text.preview-clamped', { axis: c.axis.toUpperCase(), asked: c.asked.toLocaleString(), used: c.used.toLocaleString() })).join(' · ')}</small>`\n : nothing}\n </span>`\n })}\n </div>\n ${this.way === 'one' && asset && this.trying ? this.renderSizes(asset, this.trying) : nothing}\n <div foot>${asset?.appearance.length ? html`<div setup>\n <p>${i18next.t('figure.text.preview-setup')}</p>\n <select aria-label=${i18next.t('figure.label.resize-part')} @change=${(e: Event) => this.setupPart = (e.target as HTMLSelectElement).value}>\n ${asset.appearance.map(p => html`<option value=${p.target} ?selected=${p.target === setupPart}>${p.target}</option>`)}\n </select>\n <button @click=${() => this.dispatchEvent(new CustomEvent('configure-size', { detail: { part: setupPart }, bubbles: true, composed: true }))}>${i18next.t('figure.button.configure-size')}</button>\n </div>` : nothing}\n ${controls.length + clips.length + (asset?.motionGroups?.length ?? 0) + (asset ? valueRowsOf(asset).length : 0) ? this.renderDrivers(asset!, controls, clips) : nothing}</div>`}`\n }\n\n private lookFrom(view: PreviewView) {\n this.scene?.root?.setCameraView?.(view)\n this.looking = view\n }\n\n /** The one figure's size: a slider per axis the figure lets change, and what it is at the size tried. */\n private renderSizes(asset: FigureAsset, size: { x: number; y: number; z: number }) {\n const say = (key: string, params?: Record<string, string>) => i18next.t(key, params)\n return html`<div sizes>\n ${(['x', 'y', 'z'] as const).map(axis => {\n const range = sizeSpanOf(asset, axis)\n if (!range) return nothing\n return html`<label>\n <span>${i18next.t(`figure.label.measure-${axis}`)}</span>\n <input type=\"range\" aria-label=${i18next.t(`figure.label.measure-${axis}`)} min=${range.min} max=${range.max} step=\"any\" .value=${String(size[axis])}\n @input=${(e: Event) => this.tryAxis(axis, (e.target as HTMLInputElement).valueAsNumber)}\n @change=${() => this.fitView()} />\n <output>${Math.round(size[axis]).toLocaleString()}</output>\n </label>`\n })}\n <p said>${previewSizeWordsOf(asset, size, say)}</p>\n </div>`\n }\n\n /*\n Each variant's name over its top, followed while the eight stand: the legend alone listed 「x · y · x·y …」 with\n nothing saying which box was which (sweep 2026-10-27 M4).\n */\n private followTags() {\n cancelAnimationFrame(this.tagFrame)\n if (this.way !== 'eight' || !this.scene) {\n if (this.tags.length) this.tags = []\n return\n }\n const names = new Map(PREVIEW_WAYS.map(way => [`at-${way.name}`, way.axes.length ? way.name : i18next.t('figure.label.preview-base')]))\n const box = new THREE.Box3()\n const top = new THREE.Vector3()\n const step = () => {\n const root = this.scene?.root as { activeCamera3d?: THREE.Camera; renderer3d?: THREE.WebGLRenderer; components?: { model?: { id?: string }; _realObject?: { object3d?: THREE.Object3D } }[] } | undefined\n const camera = root?.activeCamera3d\n const canvas = root?.renderer3d?.domElement\n if (!camera || !canvas || this.way !== 'eight') return\n const at = canvas.getBoundingClientRect()\n const host = this.getBoundingClientRect()\n const tags: { name: string; x: number; y: number }[] = []\n for (const component of root?.components ?? []) {\n const name = names.get(component.model?.id ?? '')\n const object = component._realObject?.object3d\n if (!name || !object) continue\n box.setFromObject(object)\n if (box.isEmpty()) continue\n box.getCenter(top)\n top.y = box.max.y\n top.project(camera)\n if (top.z > 1) continue\n tags.push({ name, x: Math.round((top.x * 0.5 + 0.5) * at.width + at.left - host.left), y: Math.round((-top.y * 0.5 + 0.5) * at.height + at.top - host.top) })\n }\n if (JSON.stringify(tags) !== JSON.stringify(this.tags)) this.tags = tags\n this.tagFrame = requestAnimationFrame(step)\n }\n this.tagFrame = requestAnimationFrame(step)\n }\n\n private chooseWay(way: 'one' | 'eight') {\n if (way === this.way) return\n this.way = way\n this.standUp()\n this.followTags()\n /* The content is made again inside the scene standing, which keeps the camera: from one figure to eight it stood inside them. */\n requestAnimationFrame(() => this.fitView())\n }\n\n /** The one figure at another size on an axis, held to what the figure declares, its centre kept on the board's. */\n private tryAxis(axis: 'x' | 'y' | 'z', value: number) {\n const asset = this.asset\n const used = asset ? sizeWithinRange(asset, axis, value) : undefined\n if (used === undefined || !this.trying) return\n this.trying = { ...this.trying, [axis]: used }\n const instance = this.scene?.root?.components?.[0] as { model?: { width?: number; height?: number }; set(props: Record<string, unknown>): void } | undefined\n /* The instance's box is the body at the sizes tried, not the sizes (bodyAtSize). */\n const box = bodyAtSize(asset!, this.trying) ?? this.trying\n instance?.set({ width: box.x, depth: box.y, height: box.z })\n const { width = 0, height = 0 } = instance?.model ?? {}\n instance?.set({ left: this.board.width / 2 - width / 2, top: this.board.height / 2 - height / 2 })\n }\n\n /** The figure as stretched, whole in view: done once the slider is let go, so the ground does not slide under a drag. */\n fitView() {\n this.scene?.fit?.('ratio')\n this.scene?.root?.fitCameraToModel?.()\n }\n\n private renderDrivers(asset: FigureAsset, controls: FigureGraphStateInput[], clips: string[]) {\n const steps = new Map(controlsOf(asset).map(c => [c.id, c.step]))\n const changed = controls.filter(c => this.giving[c.id] !== undefined && this.giving[c.id] !== asset.stateDefaults[c.id])\n const fold = html`<button fold-controls aria-expanded=${String(!this.controlsFolded)} @click=${() => (this.controlsFolded = !this.controlsFolded)}>\n ${i18next.t(this.controlsFolded ? 'figure.button.controls-unfold' : 'figure.button.controls-fold')}\n </button>`\n if (this.controlsFolded) return html`<div clips folded>${fold}</div>`\n return html`<div clips>\n ${fold}\n ${changed.length\n ? html`<button pose title=${i18next.t('figure.text.pose-as-default-explained')} @click=${() => this.poseAsDefault()}>\n ${i18next.t('figure.button.pose-as-default')}\n </button>`\n : nothing}\n ${Object.keys(this.giving).length\n ? html`<button clear-tried title=${i18next.t('figure.text.clear-tried-explained')} @click=${() => this.clearTried()}>\n ${i18next.t('figure.button.clear-tried')}\n </button>`\n : nothing}\n ${controls.map(control => {\n const value = this.giving[control.id] ?? asset.stateDefaults[control.id] ?? control.min\n /* The step the editor's controls take (\\`controlsOf\\`): a degree for an angle, a hundredth of the range otherwise. */\n const step = steps.get(control.id) ?? (control.max - control.min) / 100\n const label = asset.stateInputs?.[control.id]?.label ?? control.id\n return html`<label>\n <span>${label} <span drive>${unitWord(control.unit)}</span></span>\n ${this.renderDial(control, value)}\n <input\n type=\"range\"\n min=${control.min}\n max=${control.max}\n step=${step}\n .value=${String(value)}\n @input=${(e: Event) => this.give(control.id, Number((e.target as HTMLInputElement).value))}\n />\n <input\n typed\n type=\"number\"\n step=\"any\"\n min=${control.min}\n max=${control.max}\n aria-label=${label}\n .value=${String(Math.round(value * 100) / 100)}\n @change=${(e: Event) => {\n const typed = (e.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(typed)) this.give(control.id, Math.min(Math.max(typed, control.min), control.max))\n }}\n />\n </label>`\n })}\n ${clips.map(clip => {\n /*\n A clip nothing has driven stands still, here as on a board: the instances get a speed only from `drive`. The\n slider showed 1.00 over rollers that did not turn (2026-10-03). It shows what plays -- 0 until moved.\n */\n const value = this.driving[clip] ?? 0\n return html`<label>\n <span>${clip} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>\n <span></span>\n <input type=\"range\" min=\"0\" max=\"3\" step=\"0.05\" .value=${String(value)} @input=${(e: Event) => this.drive(clip, Number((e.target as HTMLInputElement).value))} />\n <output>${value.toFixed(2)}</output>\n </label>`\n })}\n ${valueRowsOf(asset).map(row => this.renderDataValue(row))}\n ${(asset.motionGroups ?? []).map(group => {\n const playing = this.moving[group.id] ?? { clip: group.defaultClip, speed: 0 }\n /* A field the data writes wins over the group's own setting, here as on a board: it is moved by the data values above. */\n const byData = motionWrittenByData(asset)[group.id] ?? { clip: false, speed: false }\n return html`${byData.clip\n ? nothing\n : html`<label>\n <span>${group.label} <span drive>${i18next.t('figure.label.clip')}</span></span>\n <select aria-label=${group.label} @change=${(e: Event) => this.move(group.id, { ...playing, clip: (e.target as HTMLSelectElement).value })}>\n ${group.clips.map(c => html`<option value=${c} ?selected=${c === playing.clip}>${c}</option>`)}\n </select>\n </label>`}\n ${byData.speed\n ? nothing\n : html`<label>\n <span>${group.label} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>\n <span></span>\n <input type=\"range\" min=\"0\" max=\"3\" step=\"0.05\" .value=${String(playing.speed)} @input=${(e: Event) => this.move(group.id, { ...playing, speed: Number((e.target as HTMLInputElement).value) })} />\n <output>${playing.speed.toFixed(2)}</output>\n </label>`}`\n })}\n </div>`\n }\n\n /** A value the data's bindings read, as the board's saved values give it: a number on a slider when it has a range, a choice when it is closed. */\n private renderDataValue(row: FigureDataRow) {\n const node = row.node\n const label = row.label ?? row.path\n /*\n The data tab's sample, when it gives the row, is what the figure shows: a value given here is not read. Said, and\n the field not offered, rather than one that changes nothing (robot dog 2026-11-03).\n */\n const sampled = this.sample === null || this.sample === undefined ? undefined : dataValueAt(this.sample, row.path)\n if (sampled !== undefined)\n return html`<label sampled title=${i18next.t('figure.text.data-value-from-sample')}>\n <span>${label} <span drive>${i18next.t('figure.label.data-value-from-sample')}</span></span>\n <output>${typeof sampled === 'object' ? JSON.stringify(sampled) : String(sampled)}</output>\n </label>`\n const fallback = 'default' in node ? node.default : undefined\n const value = this.valuing[row.path] ?? fallback\n if (node.kind === 'number') {\n const ranged = node.min !== undefined && node.max !== undefined && node.max > node.min\n return html`<label>\n <span>${label} <span drive>${unitWord(node.unit)}</span></span>\n <span></span>\n ${ranged\n ? html`<input type=\"range\" min=${node.min!} max=${node.max!} step=${Math.max((node.max! - node.min!) / 100, 0.01)} .value=${String(value ?? node.min)} @input=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n <output>${value === undefined ? '' : Number(value).toFixed(2)}</output>`\n : html`<input type=\"number\" step=\"any\" .value=${value === undefined ? '' : String(value)} @change=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n <span></span>`}\n </label>`\n }\n const domain = domainOf(node)\n if (!domain.length)\n return html`<label>\n <span>${label}</span>\n <input aria-label=${label} .value=${value === undefined ? '' : String(value)} @change=${(e: Event) => this.value(row, (e.target as HTMLInputElement).value)} />\n </label>`\n return html`<label>\n <span>${label}</span>\n <select aria-label=${label} @change=${(e: Event) => this.value(row, (e.target as HTMLSelectElement).value)}>\n ${domain.map(v => html`<option value=${String(v)} ?selected=${v === value}>${typeof v === 'boolean' ? i18next.t(v ? 'figure.label.data-true' : 'figure.label.data-false') : v}</option>`)}\n </select>\n </label>`\n }\n\n private value(row: FigureDataRow, typed: string) {\n const value = typedValueOf(row.node, typed)\n const next = { ...this.valuing }\n if (typeof value === 'number' && Number.isNaN(value)) delete next[row.path]\n else next[row.path] = value\n this.valuing = next\n this.tellInstances('figureValues', this.valuing)\n }\n\n private move(group: string, playing: { clip: string; speed: number }) {\n this.moving = { ...this.moving, [group]: playing }\n this.release(playing.clip)\n this.tellInstances('motion', Object.fromEntries(Object.entries(this.moving).map(([id, m]) => [id, { ...m, paused: false }])))\n }\n\n private renderDial(control: { unit: string; min: number; max: number }, value: number) {\n if (control.unit !== 'deg') return html`<span></span>`\n const dial = dialShape(control.min, control.max, value)\n const span = dial.radius * 2 + 2\n return html`<svg dial viewBox=\"0 0 ${span} ${span}\" aria-hidden=\"true\">\n <path d=${dial.sector}></path>\n <circle cx=${dial.centre.x} cy=${dial.centre.y} r=${dial.radius}></circle>\n <line x1=${dial.centre.x} y1=${dial.centre.y} x2=${dial.needle.x} y2=${dial.needle.y}></line>\n </svg>`\n }\n\n private drive(clip: string, value: number) {\n this.driving = { ...this.driving, [clip]: value }\n if (value) this.release(clip)\n this.tellInstances('clips', this.driving)\n }\n\n /*\n A value given here wins over the clips for its control (things-scene's \\`parameters\\`), so a value left from trying held\n the control still while a clip played (robot dog, 2026-11-03). A clip played lets go of the controls it drives, as\n the detail view does (\\`parametersForClip\\`).\n */\n private release(clip: string) {\n const asset = this.asset\n if (!asset) return\n const next = parametersForClip(asset, this.giving, clip)\n if (Object.keys(next).length === Object.keys(this.giving).length) return\n this.giving = next\n this.tellInstances('parameters', this.giving)\n }\n\n /** Every value tried here let go: the figure stands in its default pose, and its clips move it again. Nothing is saved. */\n private clearTried() {\n this.giving = {}\n this.tellInstances('parameters', this.giving)\n }\n\n private give(id: string, value: number) {\n this.giving = { ...this.giving, [id]: value }\n this.tellInstances('parameters', this.giving)\n }\n\n private poseAsDefault() {\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-state-defaults', values: { ...this.giving } } }, bubbles: true, composed: true }))\n this.giving = {}\n }\n\n private tellInstances(key: 'clips' | 'parameters' | 'motion' | 'figureValues', values: Record<string, unknown> | null) {\n for (const component of this.scene?.root?.components ?? []) component.set?.(key, values === null ? null : { ...values })\n }\n\n /** The tried data to the figures standing now, as their \\`data\\`: the preview's board is not saved. */\n private tellData(data: unknown) {\n for (const component of this.scene?.root?.components ?? []) component.set?.('data', data === null || data === undefined ? null : structuredClone(data))\n }\n\n\n /** The data sample to the figures standing now. */\n private tellSample() {\n if (this.sample !== null && this.sample !== undefined) this.tellData(this.sample)\n }\n\n /** The sample legends as the scene's (its root container's, where a board's are): its tables choose again. */\n private tellLegends() {\n const container = this.scene?.rootContainer\n if (!container) return\n container.style = { ...this.legends }\n figureLegendSourcesChanged()\n }\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('sample') && this.scene) this.tellData(this.sample)\n if (changed.has('legends') && this.scene) this.tellLegends()\n if (!this.hasUpdated) return\n if (!this.active) {\n this.stale = true\n return\n }\n if (this.stale || changed.has('active')) {\n this.stale = false\n this.standUp()\n return\n }\n if (changed.has('revision') || changed.has('context')) {\n this.standUp()\n return\n }\n if (!changed.has('view')) return\n const before = changed.get('view') as ViewSettings | undefined\n const now = this.view ?? DEFAULT_VIEW\n if (before?.placement !== now.placement || before?.ceilingHeight !== now.ceilingHeight) this.standUp()\n else this.scene?.root?.set?.(sceneLook(now))\n }\n\n firstUpdated() {\n this.standUp()\n this.watcher = new ResizeObserver(() => {\n if (this.active) this.scene?.resize?.()\n })\n this.watcher.observe(this)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.watcher?.disconnect()\n this.watcher = undefined\n this.teardown()\n }\n\n private standUp() {\n const asset = this.asset\n const view = this.view ?? DEFAULT_VIEW\n if (!asset || !asset.appearance.length) {\n this.cannot = i18next.t('figure.text.preview-needs-a-part')\n this.teardown()\n return\n }\n const signature = JSON.stringify([asset, view.placement, view.ceilingHeight, this.way])\n if (this.scene && this.standing === signature) return\n try {\n compileFigureAsset(asset)\n } catch {\n this.cannot = i18next.t('figure.text.preview-blocked-by-errors')\n this.teardown()\n return\n }\n try {\n /* Registered as a board registers it, under a type of this preview's own: a real type's drawings stay as they are. */\n const type = previewTypeOf(this.context)\n const size = this.authoredSize()\n /*\n The figure changed under a scene that is standing: the same type is registered again and the content made again\n inside the same 3D scene. Making a scene anew costs about a third of a second and its first drawing compiles the\n shaders again -- a value typed beside the preview held the screen for seconds. The scene is made anew only when\n there is none, for another figure, or when the content cannot be made again in place.\n */\n const again = this.scene?.rootContainer?.rebuildContentModel && this.registered === type\n if (!again) this.teardown()\n this.driving = {}\n this.moving = {}\n this.valuing = {}\n registerFigure(type, asset)\n this.registered = type\n /* Each instance stands in its body at the size it is asked (bodyAtSize), as a board reads it. */\n const boxOf = (asked: { x: number; y: number; z: number }) => bodyAtSize(asset, asked) ?? asked\n const { components, board } = this.way === 'one' ? previewOneInstance(type, boxOf(size)) : previewInstances(type, size, boxOf)\n this.board = board\n this.trying = this.way === 'one' ? { ...size } : undefined\n const model = {\n type: 'model-layer',\n width: board.width,\n height: board.height,\n /* As tall as the figure may grow: twice for the eight, the top of the height slider for the one. */\n depth: previewBoardDepth({ placement: asset.placement, base: { y: size.y } }, view.ceilingHeight, this.way === 'one' ? Math.max(1, (sizeSpanOf(asset, 'y')?.max ?? size.y) / size.y) : PREVIEW_FACTOR),\n threed: true,\n sky: 'color',\n ...sceneLook(view),\n placement: view.placement,\n heights: { floor: 0, ceiling: view.ceilingHeight },\n pixelRatio: Math.min(3, (window.devicePixelRatio || 1) * 2),\n components\n }\n if (again) {\n try {\n this.scene!.rootContainer!.rebuildContentModel!(model, { preserveThreeD: true })\n this.standing = signature\n this.cannot = ''\n this.tellLegends()\n this.tellSample()\n this.followTags()\n return\n } catch {\n this.teardown()\n registerFigure(type, asset)\n this.registered = type\n }\n }\n this.scene = create({\n target: this.stage,\n model,\n style: { ...this.legends },\n mode: 0\n }) as SceneHandle\n this.standing = signature\n this.looking = 'perspective'\n this.scene.resize?.()\n this.scene.fit?.('ratio')\n this.scene.root?.fitCameraToModel?.()\n this.cannot = ''\n this.tellSample()\n this.followTags()\n } catch (error) {\n this.cannot = (error as Error).message\n }\n }\n\n private teardown() {\n cancelAnimationFrame(this.tagFrame)\n this.tags = []\n this.scene?.dispose?.()\n this.scene = undefined\n this.standing = undefined\n if (this.registered) unregisterFigure(this.registered)\n this.registered = undefined\n }\n}\n"]}
@@ -114,6 +114,11 @@ export declare class FigureSectionEditor extends FigureSectionEditor_base {
114
114
  private field;
115
115
  /** A drawn section's end: the section again (a push) or one point (a pyramid), and where that point is. */
116
116
  private apexFields;
117
+ /**
118
+ * A rectangle's top another size (ADR-0100 §16.1: a tapered box -- a thigh's cover, a hopper's mouth): on, its width
119
+ * and depth there and one corner radius; off, its top the section again. A box with an inside is not tapered.
120
+ */
121
+ private topFields;
117
122
  /** The inside, as the section panel shows it, on the working section: on or off, what it makes, its drawing. */
118
123
  private cavityBlock;
119
124
  /** The inside a drawing's set-cavity asks for, every wall written out; the drawing's commands stay in the editor. */
@@ -58,7 +58,7 @@ let FigureSectionEditor = class FigureSectionEditor extends localize(i18next)(Li
58
58
  if (!this.narrow)
59
59
  this.show = 'outline';
60
60
  });
61
- this.working = { points: [], across: {}, length: 0, apex: null, cavity: null };
61
+ this.working = { points: [], across: {}, length: 0, apex: null, top: null, cavity: null };
62
62
  /** Walls one per side in the inside's drawing; on when they open differing. */
63
63
  this.perSide = false;
64
64
  this.selected = null;
@@ -215,13 +215,16 @@ let FigureSectionEditor = class FigureSectionEditor extends localize(i18next)(Li
215
215
  min-width: 0;
216
216
  font: inherit;
217
217
  }
218
- label[apex] {
218
+ /* A drawn section's end to one point, a rectangle's top another size: a choice over the whole row. */
219
+ label[apex],
220
+ label[top] {
219
221
  display: flex;
220
222
  align-items: center;
221
223
  gap: 6px;
222
224
  grid-column: 1 / -1;
223
225
  }
224
- label[apex] small {
226
+ label[apex] small,
227
+ label[top] small {
225
228
  flex-basis: 100%;
226
229
  }
227
230
  ol[points] {
@@ -700,6 +703,32 @@ let FigureSectionEditor = class FigureSectionEditor extends localize(i18next)(Li
700
703
  </label>`)
701
704
  : nothing}`;
702
705
  }
706
+ /**
707
+ * A rectangle's top another size (ADR-0100 §16.1: a tapered box -- a thigh's cover, a hopper's mouth): on, its width
708
+ * and depth there and one corner radius; off, its top the section again. A box with an inside is not tapered.
709
+ */
710
+ topFields() {
711
+ const [h, v] = SCREEN[this.axis];
712
+ const top = this.working.top;
713
+ const set = (patch) => this.change({ ...this.working, top: { ...top, ...patch } });
714
+ return html `<label top>
715
+ <input
716
+ type="checkbox"
717
+ .checked=${live(!!top)}
718
+ ?disabled=${!!this.working.cavity}
719
+ @change=${(ev) => {
720
+ const on = ev.target.checked;
721
+ this.change({ ...this.working, top: on ? (this.opened.top ?? { across: { ...this.working.across }, corner: 0 }) : null });
722
+ }}
723
+ />
724
+ <span>${i18next.t('figure.label.section-editor-top')}</span>
725
+ ${this.working.cavity ? html `<small>${i18next.t('figure.text.section-editor-top-no-inside')}</small>` : nothing}
726
+ </label>
727
+ ${top
728
+ ? html `${[h, v].map(axis => this.field(i18next.t('figure.label.section-editor-top-across', { axis: axis.toUpperCase() }), top.across[axis] ?? 0, value => set({ across: { ...top.across, [axis]: value } }), false, ""))}
729
+ ${this.field(i18next.t('figure.label.section-editor-top-corner'), top.corner, value => set({ corner: value }), false, "")}`
730
+ : nothing}`;
731
+ }
703
732
  /** The inside, as the section panel shows it, on the working section: on or off, what it makes, its drawing. */
704
733
  cavityBlock(invalid) {
705
734
  const w = this.working;
@@ -768,6 +797,7 @@ let FigureSectionEditor = class FigureSectionEditor extends localize(i18next)(Li
768
797
  : this.measures?.round
769
798
  ? this.field(i18next.t('figure.label.section-editor-diameter'), this.working.across[h] ?? 0, value => this.change(this.across(h, value)), m?.[h] !== 'editable', this.noteWords(h))
770
799
  : [h, v].map(axis => this.field(i18next.t('figure.label.section-editor-across', { axis: axis.toUpperCase() }), this.working.across[axis] ?? 0, value => this.change(this.across(axis, value)), m?.[axis] !== 'editable', this.noteWords(axis)))}
800
+ ${this.kind === 'rectangle' ? this.topFields() : nothing}
771
801
  </div>
772
802
  ${this.kind === 'polygon'
773
803
  ? html `<ol points aria-label=${i18next.t('figure.label.section-editor-points')}>