@things-factory/figure-ui 10.1.76 → 10.1.77

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 (125) hide show
  1. package/dist-client/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +2 -2
  3. package/dist-client/graphql/v3-store.d.ts +0 -3
  4. package/dist-client/graphql/v3-store.js +0 -39
  5. package/dist-client/graphql/v3-store.js.map +0 -1
  6. package/dist-client/modeller/figure-v3-capability.d.ts +0 -22
  7. package/dist-client/modeller/figure-v3-capability.js +0 -141
  8. package/dist-client/modeller/figure-v3-capability.js.map +0 -1
  9. package/dist-client/modeller/figure-v3-clips.d.ts +0 -31
  10. package/dist-client/modeller/figure-v3-clips.js +0 -268
  11. package/dist-client/modeller/figure-v3-clips.js.map +0 -1
  12. package/dist-client/modeller/figure-v3-controls.d.ts +0 -36
  13. package/dist-client/modeller/figure-v3-controls.js +0 -226
  14. package/dist-client/modeller/figure-v3-controls.js.map +0 -1
  15. package/dist-client/modeller/figure-v3-first-save.d.ts +0 -20
  16. package/dist-client/modeller/figure-v3-first-save.js +0 -118
  17. package/dist-client/modeller/figure-v3-first-save.js.map +0 -1
  18. package/dist-client/modeller/figure-v3-links.d.ts +0 -77
  19. package/dist-client/modeller/figure-v3-links.js +0 -649
  20. package/dist-client/modeller/figure-v3-links.js.map +0 -1
  21. package/dist-client/modeller/figure-v3-material.d.ts +0 -39
  22. package/dist-client/modeller/figure-v3-material.js +0 -323
  23. package/dist-client/modeller/figure-v3-material.js.map +0 -1
  24. package/dist-client/modeller/figure-v3-parts.d.ts +0 -69
  25. package/dist-client/modeller/figure-v3-parts.js +0 -559
  26. package/dist-client/modeller/figure-v3-parts.js.map +0 -1
  27. package/dist-client/modeller/figure-v3-preview.d.ts +0 -34
  28. package/dist-client/modeller/figure-v3-preview.js +0 -346
  29. package/dist-client/modeller/figure-v3-preview.js.map +0 -1
  30. package/dist-client/modeller/figure-v3-properties.d.ts +0 -45
  31. package/dist-client/modeller/figure-v3-properties.js +0 -239
  32. package/dist-client/modeller/figure-v3-properties.js.map +0 -1
  33. package/dist-client/modeller/figure-v3-recipe-catalog.d.ts +0 -38
  34. package/dist-client/modeller/figure-v3-recipe-catalog.js +0 -399
  35. package/dist-client/modeller/figure-v3-recipe-catalog.js.map +0 -1
  36. package/dist-client/modeller/figure-v3-verdict.d.ts +0 -64
  37. package/dist-client/modeller/figure-v3-verdict.js +0 -787
  38. package/dist-client/modeller/figure-v3-verdict.js.map +0 -1
  39. package/dist-client/modeller/v3-ai-proposal.d.ts +0 -51
  40. package/dist-client/modeller/v3-ai-proposal.js +0 -64
  41. package/dist-client/modeller/v3-ai-proposal.js.map +0 -1
  42. package/dist-client/modeller/v3-align.d.ts +0 -30
  43. package/dist-client/modeller/v3-align.js +0 -75
  44. package/dist-client/modeller/v3-align.js.map +0 -1
  45. package/dist-client/modeller/v3-canvas.d.ts +0 -72
  46. package/dist-client/modeller/v3-canvas.js +0 -379
  47. package/dist-client/modeller/v3-canvas.js.map +0 -1
  48. package/dist-client/modeller/v3-clips.d.ts +0 -39
  49. package/dist-client/modeller/v3-clips.js +0 -58
  50. package/dist-client/modeller/v3-clips.js.map +0 -1
  51. package/dist-client/modeller/v3-controls.d.ts +0 -28
  52. package/dist-client/modeller/v3-controls.js +0 -28
  53. package/dist-client/modeller/v3-controls.js.map +0 -1
  54. package/dist-client/modeller/v3-editor.d.ts +0 -203
  55. package/dist-client/modeller/v3-editor.js +0 -1526
  56. package/dist-client/modeller/v3-editor.js.map +0 -1
  57. package/dist-client/modeller/v3-fields.d.ts +0 -45
  58. package/dist-client/modeller/v3-fields.js +0 -83
  59. package/dist-client/modeller/v3-fields.js.map +0 -1
  60. package/dist-client/modeller/v3-figure-facts.d.ts +0 -35
  61. package/dist-client/modeller/v3-figure-facts.js +0 -55
  62. package/dist-client/modeller/v3-figure-facts.js.map +0 -1
  63. package/dist-client/modeller/v3-first-save.d.ts +0 -17
  64. package/dist-client/modeller/v3-first-save.js +0 -26
  65. package/dist-client/modeller/v3-first-save.js.map +0 -1
  66. package/dist-client/modeller/v3-gizmo.d.ts +0 -72
  67. package/dist-client/modeller/v3-gizmo.js +0 -111
  68. package/dist-client/modeller/v3-gizmo.js.map +0 -1
  69. package/dist-client/modeller/v3-help.d.ts +0 -18
  70. package/dist-client/modeller/v3-help.js +0 -37
  71. package/dist-client/modeller/v3-help.js.map +0 -1
  72. package/dist-client/modeller/v3-joint-drag.d.ts +0 -19
  73. package/dist-client/modeller/v3-joint-drag.js +0 -97
  74. package/dist-client/modeller/v3-joint-drag.js.map +0 -1
  75. package/dist-client/modeller/v3-joint-fan.d.ts +0 -9
  76. package/dist-client/modeller/v3-joint-fan.js +0 -276
  77. package/dist-client/modeller/v3-joint-fan.js.map +0 -1
  78. package/dist-client/modeller/v3-keys.d.ts +0 -22
  79. package/dist-client/modeller/v3-keys.js +0 -26
  80. package/dist-client/modeller/v3-keys.js.map +0 -1
  81. package/dist-client/modeller/v3-links.d.ts +0 -267
  82. package/dist-client/modeller/v3-links.js +0 -480
  83. package/dist-client/modeller/v3-links.js.map +0 -1
  84. package/dist-client/modeller/v3-live.d.ts +0 -37
  85. package/dist-client/modeller/v3-live.js +0 -68
  86. package/dist-client/modeller/v3-live.js.map +0 -1
  87. package/dist-client/modeller/v3-maturity.d.ts +0 -120
  88. package/dist-client/modeller/v3-maturity.js +0 -313
  89. package/dist-client/modeller/v3-maturity.js.map +0 -1
  90. package/dist-client/modeller/v3-occupancy.d.ts +0 -18
  91. package/dist-client/modeller/v3-occupancy.js +0 -24
  92. package/dist-client/modeller/v3-occupancy.js.map +0 -1
  93. package/dist-client/modeller/v3-palette.d.ts +0 -7
  94. package/dist-client/modeller/v3-palette.js +0 -46
  95. package/dist-client/modeller/v3-palette.js.map +0 -1
  96. package/dist-client/modeller/v3-preview-model.d.ts +0 -47
  97. package/dist-client/modeller/v3-preview-model.js +0 -68
  98. package/dist-client/modeller/v3-preview-model.js.map +0 -1
  99. package/dist-client/modeller/v3-product-session.d.ts +0 -510
  100. package/dist-client/modeller/v3-product-session.js +0 -157
  101. package/dist-client/modeller/v3-product-session.js.map +0 -1
  102. package/dist-client/modeller/v3-recipe-source.d.ts +0 -8
  103. package/dist-client/modeller/v3-recipe-source.js +0 -14
  104. package/dist-client/modeller/v3-recipe-source.js.map +0 -1
  105. package/dist-client/modeller/v3-recipes.d.ts +0 -37
  106. package/dist-client/modeller/v3-recipes.js +0 -103
  107. package/dist-client/modeller/v3-recipes.js.map +0 -1
  108. package/dist-client/modeller/v3-refusals.d.ts +0 -68
  109. package/dist-client/modeller/v3-refusals.js +0 -142
  110. package/dist-client/modeller/v3-refusals.js.map +0 -1
  111. package/dist-client/modeller/v3-renderer.d.ts +0 -40
  112. package/dist-client/modeller/v3-renderer.js +0 -73
  113. package/dist-client/modeller/v3-renderer.js.map +0 -1
  114. package/dist-client/modeller/v3-stage-model.d.ts +0 -39
  115. package/dist-client/modeller/v3-stage-model.js +0 -147
  116. package/dist-client/modeller/v3-stage-model.js.map +0 -1
  117. package/dist-client/modeller/v3-thumbnail.d.ts +0 -3
  118. package/dist-client/modeller/v3-thumbnail.js +0 -75
  119. package/dist-client/modeller/v3-thumbnail.js.map +0 -1
  120. package/dist-client/pages/figure-v3-modeller-page.d.ts +0 -102
  121. package/dist-client/pages/figure-v3-modeller-page.js +0 -548
  122. package/dist-client/pages/figure-v3-modeller-page.js.map +0 -1
  123. package/dist-client/tsconfig.chk.tsbuildinfo +0 -1
  124. package/dist-client/tsconfig.fui.tsbuildinfo +0 -1
  125. package/dist-client/tsconfig.scratch-fm.tsbuildinfo +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"v3-editor.js","sourceRoot":"","sources":["../../client/modeller/v3-editor.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CA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hB,KAAK,EAAE;;mDAA4B;AAEnB;IAAhB,KAAK,EAAE;;mDAAyB;AACL;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAmB;AAEd;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAsB;AAKrB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAA6D;AAC3E;IAAhB,KAAK,EAAE;;gDAAsB;AACb;IAAhB,KAAK,EAAE;;6CAAmB;AAEV;IAAhB,KAAK,EAAE;;6CAAgF;AACvE;IAAhB,KAAK,EAAE;;2CAAoC;AAE3B;IAAhB,KAAK,EAAE;;6CAA4B;AAEnB;IAAhB,KAAK,EAAE;;8CAA4C;AAEnC;IAAhB,KAAK,EAAE;;iDAAqD;AAE5C;IAAhB,KAAK,EAAE;;8CAAoB;AAKX;IAAhB,KAAK,EAAE;;4CAAyD;AAqBhD;IAAhB,KAAK,EAAE;;mDAAwC;AAE/B;IAAhB,KAAK,EAAE;;4CAAwC;AAnRrC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAg2C1B","sourcesContent":["import { LitElement, html, css, nothing, type PropertyValues } from 'lit'\nimport { i18next } from '@operato/i18n'\nimport type { OxThreePane } from '@operato/layout'\nimport '@operato/layout'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { live } from 'lit/directives/live.js'\nimport { PART_LIMIT, parseV3Recipe, resolveV3Recipe, v3PartCountOf, v3RecipeIdFor } from '@hatiolab/figure-model'\nimport type { RecipeTemplate } from './v3-recipes.js'\nimport './figure-v3-recipe-catalog.js'\nimport type { V3Asset, V3AuthoringAction, V3InputChange, V3PartEdit, V3PrimitiveCreation, V3ProposalStep, V3Recipe, V3RecipeValue } from '@hatiolab/figure-model'\nimport type { V3ProductSession } from './v3-product-session.js'\nimport { captureV3Thumbnail } from './v3-thumbnail.js'\nimport { drawableV3Parts } from './v3-renderer.js'\nimport './v3-canvas.js'\nimport './figure-v3-parts.js'\nimport './figure-v3-material.js'\nimport './figure-v3-links.js'\nimport './figure-v3-controls.js'\nimport './figure-v3-clips.js'\nimport './figure-v3-preview.js'\nimport './figure-settings.js'\nimport { DEFAULT_VIEW, type ViewSettings } from './figure-view.js'\nimport './figure-v3-capability.js'\nimport { gizmoChanges, gizmoReachOf, keepBottomChanges, type GizmoReach, type GizmoResult } from './v3-gizmo.js'\nimport { keyActionOf } from './v3-keys.js'\nimport { groupFields, ownerOf, partLabelOf, repeatOf, type FieldLike, type FieldGroup } from './v3-fields.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { alignChanges, boxOf, canMirror, mirrorChanges, type AlignTool } from './v3-align.js'\nimport type { V3PaletteKind, V3PartRow } from './figure-v3-parts.js'\nimport { paletteRecipe } from './v3-palette.js'\nimport type { FigureV3Canvas } from './v3-canvas.js'\nimport { nudgeOf } from './v3-stage-model.js'\nimport { editRefusalOf, inDeclaredRoom, inputRangeRefusalOf, narrowingRetryOf, partRefusalOf, placementRefusalOf, recipeRefusalOf, removalNoticeOf, sizeRangeRefusalOf } from './v3-refusals.js'\nimport type { V3RenderPart } from './v3-renderer.js'\nimport type { V3BudgetLine } from './v3-maturity.js'\nimport { instanceRangeOf, instanceRangeToDeclare, proportionToFollow, rangeDiffers, rangeWith, turnsAboutAJoint, valueNow } from './v3-links.js'\nimport { jointFanOf } from './v3-joint-fan.js'\nimport { jointDragOf } from './v3-joint-drag.js'\nimport type { FirstSave } from './v3-first-save.js'\nimport { isLive, livePartsOf, liveOverSession, NOTHING_LIVE, scrubbed, scrubStep, type LiveValues } from './v3-live.js'\n\n\n/**\n * The side's tabs: properties, what it does (places), motion, the verdict, the view, the release history. A figure-level tab (verdict, history) gives way to properties when a part is chosen; a tab about\n * parts keeps showing the newly chosen part.\n */\ntype SideTab = 'properties' | 'capability' | 'motion' | 'verdict' | 'view' | 'history'\n\n/** Product editor surface. The injected session is shared by page persistence and AI commands. */\n@customElement('figure-v3-editor')\nexport class FigureV3Editor extends LitElement {\n /* The operato scrollbar, as every scrolling panel of the app has it -- the side panel scrolled with the browser's own. */\n static styles = [ScrollbarStyles, SidePanelStyles, css`\n :host {\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n /* The editor folds by the width it is given, not the window's (UX ruling, 2026-09-24). */\n container-type: inline-size;\n font: 13px sans-serif;\n color: var(--md-sys-color-on-surface);\n }\n /* The bar over the work is ox-canvas-bar (ADR-0060 decision 8): the folds at its edges, undo, redo and\n fit in the suite's places. What the editor puts in it - the mode switch, the status, save - is styled here. */\n ox-canvas-bar button[mode] {\n height: 28px;\n padding: 0 10px;\n border-radius: 999em;\n border-color: transparent;\n background: none;\n }\n ox-canvas-bar button[mode][aria-pressed='true'] {\n border-color: var(--md-sys-color-primary);\n }\n /* The gizmo's tools, drawn as the bar's own icon buttons (undo, redo, fit). */\n ox-canvas-bar .gizmo-tools {\n display: inline-flex;\n gap: 2px;\n padding-left: 4px;\n border-left: 1px solid var(--md-sys-color-outline-variant);\n }\n ox-canvas-bar button[tool] {\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: var(--md-sys-shape-corner-small, 8px);\n background: transparent;\n color: var(--md-sys-color-on-surface-variant);\n cursor: pointer;\n }\n ox-canvas-bar button[tool]:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container-high);\n color: var(--md-sys-color-on-surface);\n }\n ox-canvas-bar button[tool][aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n ox-canvas-bar button[tool]:disabled {\n opacity: 0.38;\n cursor: default;\n }\n figure-v3-preview {\n min-width: 0;\n min-height: 0;\n }\n ox-canvas-bar .status {\n padding: 0 8px;\n color: var(--md-sys-color-on-surface-variant);\n }\n ox-canvas-bar .status[dirty] {\n color: var(--md-sys-color-primary);\n font-weight: 600;\n }\n ox-canvas-bar button[save] {\n height: 32px;\n padding: 0 14px;\n border: none;\n border-radius: 999em;\n color: var(--md-sys-color-on-primary);\n background: var(--md-sys-color-primary);\n }\n /* The three panes are ox-three-pane's (ADR-0060 decision 8): widths 200 | 1fr | 340, 160 | 300 under\n 860px and one column with the middle first under 560px are the frame's, as are the dividers. */\n ox-three-pane {\n flex: 1;\n min-height: 0;\n }\n figure-v3-parts {\n min-height: 0;\n }\n figure-v3-canvas {\n min-width: 0;\n min-height: 0;\n }\n /* The side: tabs over one panel at a time, each using the whole height. */\n aside {\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: var(--md-sys-color-surface-container-lowest);\n }\n div[tabs] {\n display: flex;\n flex: none;\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n button[tab] {\n flex: 1;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 38px;\n padding: 0;\n border: none;\n border-radius: 0;\n border-bottom: 2px solid transparent;\n background: none;\n color: var(--md-sys-color-on-surface-variant);\n }\n button[tab]:hover:not([on]) {\n background: var(--md-sys-color-surface-container);\n }\n button[tab][on] {\n color: var(--md-sys-color-primary);\n border-bottom-color: var(--md-sys-color-primary);\n }\n button[tab] md-icon {\n font-size: 20px;\n width: 20px;\n height: 20px;\n }\n span[badge] {\n position: absolute;\n top: 3px;\n right: 2px;\n padding: 0 5px;\n font-size: 0.62rem;\n font-weight: 700;\n line-height: 1.5;\n color: var(--md-sys-color-on-primary-container);\n background: var(--md-sys-color-primary-container);\n border-radius: 999em;\n pointer-events: none;\n }\n /* The sections inside carry the margins (side-panel-styles); the panel only scrolls. */\n div[panel] {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 0;\n }\n div[panel][flush] {\n padding: 0;\n }\n /* Hidden, not removed: a panel keeps what it holds (the verdict its last answer) while another tab is open. */\n [off] {\n display: none !important;\n }\n /* Which part the panel speaks of, and the way back to the whole figure. */\n div[subject] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px 0;\n }\n div[subject] button[chip] {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: 26px;\n padding: 0 10px 0 6px;\n border-radius: 999em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[subject] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n button {\n font: inherit;\n box-sizing: border-box;\n height: 32px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n background: var(--md-sys-color-surface);\n color: inherit;\n padding: 0 8px;\n min-width: 0;\n }\n button {\n cursor: pointer;\n }\n button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n button[aria-pressed='true'] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n border-color: var(--md-sys-color-primary);\n }\n .error {\n padding: 10px;\n background: var(--md-sys-color-error-container);\n color: var(--md-sys-color-on-error-container);\n white-space: pre-wrap;\n }\n .notice {\n padding: 8px 10px;\n background: var(--md-sys-color-surface-container);\n color: var(--md-sys-color-on-surface);\n }\n .hint {\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.5;\n }\n `]\n @property({ attribute: false }) session?: V3ProductSession\n /** The recipe templates (ADR-0095), read by the page from the server. */\n @property({ attribute: false }) templates: RecipeTemplate[] = []\n /** Reads a template's guide; given by the page. */\n @property({ attribute: false }) guideOf?: (name: string) => Promise<string>\n @property({ attribute: false }) thumbnailOf?: (name: string) => string\n /** The 「보드에서 바꿀 수 있음」 form being filled for a row, before it is published (ADR-0096). */\n @state() private publishing?: { part: string; label: string; min: number; max: number }\n @state() private catalogOpen = false\n /** Why the last recipe was refused, in the kernel's words. */\n @state() private recipeError = ''\n @property({ type: Number }) revision = 0\n /** The verdict's count, drawn on its tab so it stays in sight while another tab is open. */\n @property({ type: Number }) instances?: number\n /** The cost line the parts list shows, from the maturity report. */\n @property({ attribute: false }) budget?: V3BudgetLine\n /**\n * Asks the type and name of a figure saved for the first time (the host has the catalogue's names); undefined\n * when the author cancels, and then nothing is saved. Without it a new figure is saved under a temporary type.\n */\n @property({ attribute: false }) firstSave?: (name: string) => Promise<FirstSave | undefined>\n @state() private selected = ''\n @state() private error = ''\n /** The same link offered again with the size range narrowed, after a link the declared range could not hold. */\n @state() private retry?: { label: string; action?: V3AuthoringAction; run?: () => void }\n @state() private tab: SideTab = 'properties'\n /** The frame the bar folds - found after the first render, since the bar is drawn before it. */\n @state() private panes?: OxThreePane\n /** What the middle shows: the parts being edited, or the figure placed on a board at eight sizes. */\n @state() private middle: 'edit' | 'preview' = 'edit'\n /** The gizmo shown on the selected part, as the tools in the bar and W · E · R choose it; none once the part changes. */\n @state() private gizmoMode?: 'translate' | 'rotate' | 'scale'\n /** A line saying what a command did besides what was asked; gone at the next command. */\n @state() private notice = ''\n /**\n * How the workbench shows the figure, in the board's own state names. The viewer's, kept in\n * their browser, never in the figure.\n */\n @state() private view: ViewSettings = FigureV3Editor.storedView()\n private static storedView(): ViewSettings {\n try {\n const stored = JSON.parse(localStorage.getItem('figure-v3-view') ?? 'null')\n return stored && typeof stored === 'object' ? { ...DEFAULT_VIEW, ...stored } : { ...DEFAULT_VIEW }\n } catch {\n return { ...DEFAULT_VIEW }\n }\n }\n private setView(view: ViewSettings) {\n this.view = { ...DEFAULT_VIEW, ...view }\n try {\n localStorage.setItem('figure-v3-view', JSON.stringify(this.view))\n } catch {\n /* A browser that keeps nothing still shows the change for this visit. */\n }\n }\n /**\n * Parts hidden on the workbench — the author's view while working, not the asset's visibility. Not saved: a part\n * hidden here is still in the figure, still checked, still drawn on a board.\n */\n @state() private hiddenParts = new Set<string>()\n /** A value in hand -- typed, held on a spinner, scrubbed, dragged -- drawn at once and recorded on release. */\n @state() private live: LiveValues = NOTHING_LIVE\n private lastContext: string | null = null\n /**\n * Move, turn and size on the canvas, in the bar's tools: the gizmo the W · E · R keys give, found without knowing the\n * keys (2026-09-26 -- a person dragging the part turned the camera). Each is offered only where the part's own\n * numbers can take it (`gizmoReachOf`).\n */\n private renderGizmoTools(editing: boolean) {\n const reach = editing && this.selected ? this.reachOf(this.selected) : undefined\n const tools = [\n { mode: 'translate', icon: 'open_with', key: 'W', can: !!reach?.translate },\n { mode: 'rotate', icon: '3d_rotation', key: 'E', can: !!reach?.rotate },\n { mode: 'scale', icon: 'open_in_full', key: 'R', can: !!reach?.scale }\n ] as const\n return html`<span class=\"gizmo-tools\" role=\"group\" aria-label=${i18next.t('figure.label.gizmo-tools')}>\n ${tools.map(\n tool => html`<button\n tool\n aria-pressed=${String(this.gizmoMode === tool.mode)}\n ?disabled=${!tool.can}\n aria-label=${i18next.t('figure.button.gizmo-' + tool.mode)}\n title=${`${i18next.t('figure.button.gizmo-' + tool.mode)} (${tool.key})${tool.can || !this.selected ? '' : ' · ' + i18next.t('figure.text.gizmo-not-own')}`}\n @click=${() => this.useGizmo(tool.mode)}\n >\n <md-icon>${tool.icon}</md-icon>\n </button>`\n )}\n </span>`\n }\n /** The modeller's keys (`v3-keys.ts`): undo, redo, duplicate, remove, back to the whole figure, the gizmo's modes. */\n private onKey = (e: KeyboardEvent) => {\n const view = this.session?.read()\n if (!view || view.loading || view.saving || !view.context || !this.isConnected) return\n const canvas = this.renderRoot.querySelector<FigureV3Canvas>('figure-v3-canvas')\n const path = e.composedPath()\n const action = keyActionOf(\n { key: e.key, ctrlKey: e.ctrlKey, metaKey: e.metaKey, shiftKey: e.shiftKey, altKey: e.altKey, target: path[0] as HTMLElement, inScene: !!canvas && path.includes(canvas) },\n this.selected\n )\n if (!action) return\n e.preventDefault()\n /*\n The session's history is the only one. With the canvas focused the scene took Ctrl+Z as well, undoing on its own\n board the last value the canvas had written -- which the canvas then told as a drag: an undo of a drag on a\n part placed by a rule wrote the drag again (2026-09-25). Heard first (capture) and kept from the scene.\n */\n e.stopPropagation()\n if (action === 'translate' || action === 'rotate' || action === 'scale') canvas && this.useGizmo(action)\n else if (action === 'undo') view.canUndo && this.run(() => this.session!.undo())\n else if (action === 'redo') view.canRedo && this.run(() => this.session!.redo())\n else if (action === 'duplicate') this.duplicatePart(this.selected)\n else if (action === 'remove') this.removePart(this.selected)\n else this.selected = ''\n }\n connectedCallback() {\n super.connectedCallback()\n window.addEventListener('keydown', this.onKey, true)\n }\n disconnectedCallback() {\n window.removeEventListener('keydown', this.onKey, true)\n super.disconnectedCallback()\n }\n protected willUpdate(_changed: PropertyValues) {\n const view = this.session?.read()\n if (view?.context !== this.lastContext) {\n this.lastContext = view?.context ?? null\n this.selected = ''\n this.error = ''\n this.hiddenParts = new Set()\n }\n if (view && !view.geometry.some(g => ownerOf(g.id) === this.selected)) this.selected = ''\n if (_changed.has('selected')) this.gizmoMode = undefined\n }\n /** The scene toggles: the mode already shown takes the gizmo away. */\n private useGizmo(mode: 'translate' | 'rotate' | 'scale') {\n this.renderRoot.querySelector<FigureV3Canvas>('figure-v3-canvas')?.gizmo(mode)\n this.gizmoMode = this.gizmoMode === mode ? undefined : mode\n }\n /**\n * A refusal no particular sentence knows: figure-model's code said as a refusal, never its English; any other error\n * (the network, the server) as it came.\n */\n private said(error: unknown): string {\n return (error as { code?: string })?.code ? editRefusalOf(error, (key, params) => i18next.t(key, params)) : error instanceof Error ? error.message : String(error)\n }\n private run(action: () => unknown) {\n try {\n action()\n this.error = ''\n /* The next step stands on its own: what the last removal let go of is no longer the news. */\n this.notice = ''\n this.changed()\n } catch (error) {\n const say = (key: string, params: Record<string, string>) => i18next.t(key, params)\n this.error = sizeRangeRefusalOf(error, say) ?? inputRangeRefusalOf(error, say) ?? this.said(error)\n } finally {\n /* Committed or refused, the value in hand is gone: the figure as it stands is drawn again. */\n this.live = NOTHING_LIVE\n }\n }\n /** What the canvas draws: the figure with the value in hand when there is one, and without the parts hidden on the workbench. */\n private drawnParts(geometry: Parameters<typeof drawableV3Parts>[0] | undefined, asset: unknown) {\n const parts = (asset ? liveOverSession(asset as V3Asset, this.currentInputs(), this.live) : null) ?? drawableV3Parts(geometry ?? [])\n return parts.filter(body => !this.hiddenParts.has(ownerOf((body as { id: string }).id)))\n }\n /**\n * Where the selected part turns and how far, with the pose as it is drawn now -- a value in hand included, so the\n * fan follows the arm while a control is dragged. Its size comes from what the joint turns (`v3-joint-fan`).\n */\n private fanOf(asset: V3Asset | undefined) {\n if (!asset || !this.selected || this.hiddenParts.has(this.selected)) return null\n try {\n return jointFanOf(asset, this.selected, { ...this.currentInputs(), ...this.live.values })\n } catch {\n return null\n }\n }\n /**\n * Every input as the session holds it now -- the pose the author has set with the controls, and design values. The\n * asset's source carries only the saved defaults, so drawing a value in hand over it put every other joint back to its\n * saved angle while one slider moved, and the arm jumped when released (user, 2026-09-24).\n */\n private currentInputs(): Record<string, number> {\n const view = this.session?.read()\n return view ? Object.fromEntries(view.fields.map(field => [field.id, field.value as number])) : {}\n }\n /** A value in hand: an input's value (design or pose) or a part edit. Nothing is recorded. */\n private hold(values: Record<string, number>, edit?: V3PartEdit) {\n this.live = { values: { ...this.live.values, ...values }, ...(edit ? { edit } : this.live.edit ? { edit: this.live.edit } : {}) }\n }\n private changed() {\n this.requestUpdate()\n this.dispatchEvent(new CustomEvent('v3-changed', { bubbles: true, composed: true }))\n }\n private async save() {\n if (!this.session) return\n try {\n /*\n The card's picture is taken before the save starts, from a canvas of its own at the card's size —\n not from the one on screen, which stands wherever the author left it turned. A picture that cannot\n be taken is not an error: the save goes on without it (see `v3-thumbnail.ts`).\n */\n let type: string | undefined\n if (!this.session.read().id && this.firstSave) {\n const answer = await this.firstSave(this.session.read().name ?? '')\n if (!answer) return\n /* The name is the figure's own, in the asset: one step of the history, like typing it in the properties. */\n if (answer.name !== this.session.read().name) {\n this.session.command({ kind: 'rename', name: answer.name })\n this.changed()\n }\n type = answer.type\n }\n const view = this.session.read()\n const thumbnail = await captureV3Thumbnail(drawableV3Parts(view.geometry ?? []), view.palette ?? {})\n const promise = this.session.save({ thumbnail, type })\n this.changed()\n await promise\n this.error = ''\n } catch (error) {\n this.error = this.said(error)\n } finally {\n this.changed()\n }\n }\n private add(kind: V3PaletteKind) {\n if (!this.session) return\n this.run(() => {\n const ids = new Set(this.session!.read().geometry.map(g => g.id))\n let n = 1\n while (ids.has(`${kind}-${n}`)) n++\n const part = paletteRecipe(kind, `${kind}-${n}`)\n this.session!.add(part)\n this.selected = part.id\n })\n }\n /**\n * The list's own operations, as V3 part edits — each one step of the session's history. The copy and the moved\n * part stay selected.\n */\n private duplicatePart(id: string) {\n this.run(() => {\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n this.selected = this.session!.read().geometry.find(g => !before.has(g.id))?.id ?? id\n })\n }\n private movePart(id: string, to: number) {\n this.run(() => this.session!.edit({ kind: 'move-part', target: id, to }))\n }\n private removePart(id: string, refitRoom = false) {\n this.retry = undefined\n try {\n const view = this.session!.edit({ kind: 'remove-part', target: id, ...(refitRoom ? { refitRoom: true } : {}) }) as { removal?: Parameters<typeof removalNoticeOf>[0] }\n this.error = ''\n /* What else the removal let go of, named (chief architect, 2026-09-27); undo brings it back. */\n this.notice = removalNoticeOf(view.removal, (key, params) => i18next.t(key, params)) ?? ''\n if (this.selected === id) this.selected = ''\n this.changed()\n } catch (error) {\n /* The refusal a person meets most: another part stands on this one or follows its size. Said in their words. */\n this.error = partRefusalOf(error, id, (key, params) => i18next.t(key, params)) ?? this.said(error)\n /* In the declared room only: the way on is to delete it and fit the room to the parts left, in one step. */\n if (!refitRoom && inDeclaredRoom(error)) this.retry = { label: i18next.t('figure.button.remove-and-refit-room', { part: id }), run: () => this.removePart(id, true) }\n }\n }\n private toggleHiddenPart(id: string) {\n const next = new Set(this.hiddenParts)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n this.hiddenParts = next\n }\n /** Whether the figure declares its size (the three size inputs). */\n private hasSize(): boolean {\n const values = this.designValues()\n return ['x', 'y', 'z'].every(axis => typeof values[`size.${axis}`] === 'number')\n }\n /**\n * A recipe put in (ADR-0095): resolved on the figure as it stands -- its parts take the next free name, onto the part\n * chosen -- and applied as one step. Refused, the kernel's sentence goes to the form as it is (condition 3).\n */\n private insertRecipe(recipe: V3Recipe, values: Record<string, V3RecipeValue>) {\n try {\n const asset = JSON.parse(this.session!.source()) as V3Asset\n const checked = parseV3Recipe(recipe)\n const id = v3RecipeIdFor(asset, checked)\n const steps = resolveV3Recipe(checked, { id, ...(checked.target === 'part' ? { target: this.selected } : {}), values })\n this.session!.applyRecipe(steps)\n this.recipeError = ''\n this.catalogOpen = false\n this.error = ''\n this.changed()\n } catch (error) {\n this.recipeError = recipeRefusalOf(error, (key, params) => i18next.t(key, params)) ?? this.said(error)\n }\n }\n /** The design values of the asset being edited. */\n private designValues(): Record<string, number> {\n try {\n return this.session ? (JSON.parse(this.session.source()).designInputs ?? {}) : {}\n } catch {\n return {}\n }\n }\n /** What the gizmo may write for the selected part — read off the asset being edited. */\n private reachOf(id: string): GizmoReach {\n const none = { translate: false, rotate: false, scale: false }\n /* A repeat is moved and sized through its row, not by a gizmo on one copy. */\n if (!id || !this.session || !this.session.read().geometry.some(g => g.id === id)) return none\n try {\n return gizmoReachOf(JSON.parse(this.session.source()), id)\n } catch {\n return none\n }\n }\n /** A drag, written back as the part's own inputs — one step of the history, like typing the numbers. */\n private transformed(id: string, result: GizmoResult) {\n const view = this.session!.read()\n /* A part hanging from a joint: the drag edits the joint -- its value, or where it sits (ADR-0093). */\n const asset = JSON.parse(this.session!.source()) as V3Asset\n const drawn = view.geometry.find(g => g.id === id) as unknown as V3RenderPart | undefined\n const drag = drawn ? jointDragOf(asset, ownerOf(id), drawn, result, this.currentInputs()) : null\n if (drag) {\n if (drag.kind === 'value') this.run(() => this.session!.apply([{ kind: 'set-state', input: drag.input, unit: drag.unit, value: drag.value }]))\n else if (drag.kind === 'joint') this.run(() => this.session!.command({ kind: 'set-joint', joint: drag.joint }))\n else {\n this.error = i18next.t(`figure.text.gizmo-joint-${drag.reason}`, { joint: drag.joint, leader: drag.leader ?? '', axis: drag.axis ?? '' })\n this.requestUpdate()\n }\n return\n }\n const sizes = Object.fromEntries(view.fields.map(field => [field.id, field.value as number]))\n /*\n A part a joint places, scaled: only its measures change. The shift of its centre that an anchored scale makes is\n the joint's to give -- the face on the joint stays there by itself (user, 2026-09-25: 「'R'모드에서 크기가 변하지 않는다」;\n the shift had been taken for a move of the joint, and the size was dropped).\n */\n const jointed = !!asset.joints?.some(j => j.body1.part === ownerOf(id))\n const changes = gizmoChanges(id, this.reachOf(id), jointed && result.scale ? { scale: result.scale } : result, sizes)\n if (changes.length) {\n this.run(() => this.session!.apply(changes))\n return\n }\n if (jointed && result.scale) {\n /* Only measures that follow another were pulled: the relation says their size, and it is not broken here. */\n const axes = (['x', 'y', 'z'] as const).filter((_, i) => Math.abs(result.scale![i]! - 1) > 1e-4)\n this.error = i18next.t('figure.text.gizmo-size-follows', { part: partLabelOf(id), axis: axes.join(', ').toUpperCase() })\n return this.requestUpdate()\n }\n /*\n A part whose place is worked out has no numbers for the gizmo to write: the drag is added beside\n its rule (`nudge-part`). A part a joint or a fastening places, or a size that is worked out, is refused -- said in\n words, not by the part silently springing back (user, 2026-09-24: 「기즈모 컨트롤도 전혀 작동이 안되는군」).\n */\n const body = view.geometry.find(g => g.id === id) as unknown as V3RenderPart | undefined\n if (!body) return this.requestUpdate()\n const { by, turn } = nudgeOf(body, result)\n /* A size worked out from the figure's: the drag's factor beside its rule, so it still follows. */\n const grow: Partial<Record<'x' | 'y' | 'z', number>> = {}\n if (result.scale) (['x', 'y', 'z'] as const).forEach((axis, i) => Math.abs(result.scale![i]! - 1) > 1e-6 && (grow[axis] = Math.round(result.scale![i]! * 1e6) / 1e6))\n if (!Object.keys(by).length && !Object.keys(turn).length && !Object.keys(grow).length) return this.requestUpdate()\n try {\n this.session!.command({\n kind: 'nudge-part',\n part: id,\n ...(Object.keys(by).length ? { by } : {}),\n ...(Object.keys(turn).length ? { turn } : {}),\n ...(Object.keys(grow).length ? { grow } : {})\n })\n this.error = ''\n this.changed()\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n this.error = /carried by a joint/.test(message)\n ? i18next.t('figure.text.gizmo-joint-places', { part: partLabelOf(id) })\n : /is fastened to/.test(message)\n ? i18next.t('figure.text.gizmo-fastening-places', { part: partLabelOf(id) })\n : this.said(error)\n this.requestUpdate()\n }\n }\n /** 맞추기 — one tool, one step of the history, through the same inputs as the gizmo. */\n private align(tool: AlignTool) {\n this.run(() => {\n const asset = JSON.parse(this.session!.source())\n const changes = alignChanges(asset, this.selected, this.reachOf(this.selected), tool)\n if (changes.length) this.session!.apply(changes)\n })\n }\n /** A mirrored copy: duplicate, then place the copy on the other side — two steps. */\n private mirror(axis: 'x' | 'z') {\n this.run(() => {\n const id = this.selected\n const before = new Set(this.session!.read().geometry.map(g => g.id))\n this.session!.edit({ kind: 'duplicate-part', target: id })\n const copy = this.session!.read().geometry.find(g => !before.has(g.id))?.id\n if (!copy) return\n this.session!.apply(mirrorChanges(JSON.parse(this.session!.source()), id, copy, axis))\n this.selected = copy\n })\n }\n private renderTools(unavailable: boolean) {\n const reach = this.reachOf(this.selected)\n if (!this.selected || !reach.translate) return null\n let asset: unknown\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n const tool = (name: AlignTool, icon: string, label: string, title: string) =>\n html`<button ?disabled=${unavailable} aria-label=${i18next.t(label)} title=${i18next.t(title)} @click=${() => this.align(name)}>\n <md-icon>${icon}</md-icon>\n </button>`\n return html`<div tools title=${i18next.t('figure.text.tools-explained')}>\n ${tool('centre-x', 'horizontal_distribute', 'figure.button.center-x', 'figure.text.center-on-x')}\n ${tool('centre-z', 'vertical_align_center', 'figure.button.center-z', 'figure.text.center-on-z')}\n ${tool('floor', 'vertical_align_bottom', 'figure.button.to-floor', 'figure.text.put-on-floor')}\n ${(['x', 'z'] as const).map(axis => {\n const able = canMirror(asset as never, this.selected, axis, reach)\n return html`<button\n ?disabled=${unavailable || !able}\n aria-label=${i18next.t('figure.button.mirror-' + axis)}\n title=${i18next.t(able ? 'figure.text.mirror-explained' : 'figure.text.mirror-would-overlap')}\n @click=${() => this.mirror(axis)}\n >\n <md-icon>${axis === 'x' ? 'flip' : 'flip_camera_android'}</md-icon>\n </button>`\n })}\n ${tool('snap', 'grid_on', 'figure.button.snap', 'figure.text.snap-explained')}\n </div>`\n }\n /**\n * A part's name. It renames every value the part owns, and what refers to them follows\n * (figure-model's rename-part), as one step of the history.\n */\n /**\n * A repeated body is one of its repeat's copies and is named after it -- the list and this field read `roller 15`, not\n * its path through the repeat (user, 2026-09-24: 「부품 이름 ???」). A copy has no name of its own to change.\n */\n private renderRepeatNote(geometry: readonly unknown[] | undefined) {\n const repeat = repeatOf(this.selected, geometry)\n return repeat?.index ? html`<p hint>${i18next.t('figure.text.repeat-member', { name: repeat.name, count: repeat.count, index: repeat.index })}</p>` : nothing\n }\n private renamePart(input: HTMLInputElement) {\n const name = input.value.trim()\n const from = this.selected\n if (!name || name === from) {\n input.value = from\n return\n }\n try {\n this.session!.edit({ kind: 'rename-part', target: from, name })\n this.selected = name\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = from\n const code = (error as { code?: string })?.code\n this.error =\n code === 'PART_ID'\n ? i18next.t(/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(name) ? 'figure.text.part-name-taken' : 'figure.text.part-name-invalid', { name })\n : error instanceof Error\n ? error.message\n : String(error)\n }\n }\n /** Size response, fastening and motion for the selected part, as authoring commands. */\n private renderLinks(unavailable: boolean, section: 'shape' | 'places' | 'motion') {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n let dims: [number, number, number] | undefined\n try {\n dims = boxOf(asset, this.selected)?.dims\n } catch {\n dims = undefined\n }\n return html`<figure-v3-links\n .asset=${asset}\n .section=${section}\n .partId=${this.selected}\n .dims=${dims}\n ?locked=${unavailable}\n @v3-command=${(e: CustomEvent) => this.linkCommand(e.detail.action)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-links>`\n }\n /** The figure's controls: try a value, name it, set its range and travel time, keep the pose. */\n private renderControls(view: { fields: Array<{ id: string; role?: string; value: number }> }, unavailable: boolean) {\n let asset\n try {\n asset = JSON.parse(this.session!.source())\n } catch {\n return null\n }\n const values = Object.fromEntries(view.fields.filter(f => f.role === 'state').map(f => [f.id, f.value]))\n return html`<figure-v3-controls\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-state=${(e: CustomEvent) => this.run(() => this.session!.apply([{ kind: 'set-state', input: e.detail.input, unit: e.detail.unit, value: e.detail.value }]))}\n @v3-state-live=${(e: CustomEvent) => this.hold({ [e.detail.input]: e.detail.value })}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-controls>\n <figure-v3-clips\n .asset=${asset}\n .values=${values}\n ?locked=${unavailable}\n @v3-states=${(e: CustomEvent) => this.run(() => this.session!.apply(e.detail.changes))}\n @v3-states-live=${(e: CustomEvent) => this.hold(e.detail.values)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-clips>`\n }\n /** One command, one step of the history. A refusal a person can meet here is said in their words. */\n private linkCommand(action: V3AuthoringAction) {\n this.retry = undefined\n this.notice = ''\n const hadSize = this.hasSize()\n try {\n this.session!.command(action)\n this.error = ''\n /* What the command did besides what was asked, in one line: the figure's size declared to follow (ADR ruling Q1). */\n if (action.kind === 'follow-size' && !hadSize) {\n const size = this.designValues()\n this.notice = i18next.t('figure.text.size-declared-to-follow', {\n x: Math.round(size['size.x'] ?? 0).toLocaleString(),\n y: Math.round(size['size.y'] ?? 0).toLocaleString(),\n z: Math.round(size['size.z'] ?? 0).toLocaleString()\n })\n }\n this.changed()\n } catch (error) {\n const code = (error as { code?: string })?.code\n const narrowing = narrowingRetryOf(action, error, (key, params) => i18next.t(key, params))\n if (narrowing) {\n this.error = narrowing.message\n this.retry = { label: narrowing.label, action: narrowing.retry as V3AuthoringAction }\n return\n }\n this.error =\n code === 'DIMENSION_CYCLE'\n ? i18next.t('figure.text.follow-would-loop')\n : code === 'FASTEN_CYCLE' || code === 'ATTACH_CYCLE'\n ? i18next.t('figure.text.fasten-would-loop')\n : sizeRangeRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n placementRefusalOf(error, (key, params) => i18next.t(key, params)) ??\n this.said(error)\n }\n }\n private changeField(field: { id: string; unit: V3InputChange['unit']; role?: string }, event: Event) {\n const input = event.target as HTMLInputElement,\n value = input.valueAsNumber\n /* A height typed in keeps the part's bottom where it is, as the scale gizmo does. */\n const part = this.selected\n const kept = field.role !== 'state' && part ? keepBottomChanges(part, this.reachOf(part), field.id, value, this.designValues()) : []\n this.run(() =>\n this.session!.apply([\n { kind: field.role === 'state' ? 'set-state' : 'set-design', input: field.id, unit: field.unit, value },\n ...kept\n ])\n )\n // Rejected edits must also restore the displayed numeric value.\n input.value = String(this.session!.read().fields.find(i => i.id === field.id)!.value)\n }\n /** Typing or a held spinner: each number on the way is drawn; the field's change records it. */\n private typing(field: { id: string }, event: Event) {\n const value = (event.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(value)) this.hold({ [field.id]: value })\n }\n /**\n * Drag a field's label (or an axis letter) sideways to scrub its value, as vector tools do: the figure follows the\n * pointer, and the release records one step. The field's number follows too, so the value in hand is always read.\n */\n private scrub(field: { id: string; unit: V3InputChange['unit']; role?: string; value: number }, down: PointerEvent, unavailable: boolean) {\n if (unavailable || down.button !== 0) return\n const label = down.currentTarget as HTMLElement\n const input = (label.closest('div[cell]')?.querySelector('input') ?? label.nextElementSibling) as HTMLInputElement | null\n if (!input) return\n down.preventDefault()\n label.setPointerCapture(down.pointerId)\n const start = field.value\n let value = start\n const move = (e: PointerEvent) => {\n value = scrubbed(start, e.clientX - down.clientX, scrubStep(field.unit, start, e.shiftKey))\n input.value = String(value)\n this.hold({ [field.id]: value })\n }\n const up = (e: PointerEvent) => {\n label.removeEventListener('pointermove', move)\n label.removeEventListener('pointerup', up)\n label.removeEventListener('pointercancel', up)\n /* A drag the system took away is not the author's value: the field goes back to where it was. */\n if (e.type === 'pointercancel') value = start\n if (value === start) {\n input.value = String(start)\n this.live = NOTHING_LIVE\n return\n }\n input.value = String(value)\n this.changeField(field, { target: input } as unknown as Event)\n }\n label.addEventListener('pointermove', move)\n label.addEventListener('pointerup', up)\n label.addEventListener('pointercancel', up)\n }\n /** The measured range, kept for the revision it was measured at: measuring evaluates the figure at its edges. */\n private range?: { at: string; of: ReturnType<typeof instanceRangeOf>; toDeclare?: ReturnType<typeof instanceRangeToDeclare> }\n /** The sizes a board may give the figure, and the way to measure them again after its parts changed. */\n private renderInstanceRange(asset: V3Asset | undefined, unavailable: boolean) {\n if (!asset) return nothing\n /* Another figure, or another step of this one, is measured again. */\n const at = `${this.session?.read().context ?? ''}:${this.revision}`\n if (this.range?.at !== at) {\n let of: ReturnType<typeof instanceRangeOf>\n let toDeclare: ReturnType<typeof instanceRangeToDeclare>\n try {\n of = instanceRangeOf(asset)\n } catch {\n of = undefined\n }\n try {\n toDeclare = of ? undefined : instanceRangeToDeclare(asset)\n } catch {\n toDeclare = undefined\n }\n this.range = { at, of, toDeclare }\n }\n const range = this.range.of\n /* No size yet: the figure is declared its size from its parts, so a board can resize it and parts can follow it. */\n const toDeclare = this.range.toDeclare\n if (!range && toDeclare)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n <p hint>${i18next.t('figure.text.instance-size-undeclared')}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: toDeclare.range, at: toDeclare.at })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.declare-instance-size')}\n </button>\n </section>`\n if (!range) return nothing\n const mm = (v: number) => Math.round(v).toLocaleString()\n const differs = rangeDiffers(range.declared, range.measured)\n return html`<section>\n <h3>${i18next.t('figure.label.instance-range')}</h3>\n ${(['x', 'y', 'z'] as const).map(\n axis => html`<div inline-field>\n <label>${axis.toUpperCase()} <span unit>mm</span></label>\n <div pair>\n ${(['min', 'max'] as const).map(\n bound => html`<input\n aria-label=${`size.${axis}.${bound}`}\n type=\"number\"\n step=\"any\"\n .value=${live(String(Math.round(range.declared[axis][bound])))}\n ?disabled=${unavailable}\n @change=${(e: Event) => {\n const next = rangeWith(range.declared, axis, bound, (e.target as HTMLInputElement).valueAsNumber)\n if (next) this.linkCommand({ kind: 'declare-instance-size', range: next, replace: true })\n }}\n />`\n )}\n </div>\n </div>`\n )}\n ${differs\n ? html`<p hint>\n ${i18next.t('figure.text.instance-range-can-widen', {\n ranges: (['x', 'y', 'z'] as const)\n .filter(axis => rangeDiffers(range.declared, { ...range.declared, [axis]: range.measured[axis] }))\n .map(axis => `${axis.toUpperCase()} ${mm(range.measured[axis].min)} – ${mm(range.measured[axis].max)}`)\n .join(' · ')\n })}\n </p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'declare-instance-size', range: range.measured, replace: true })}>\n <md-icon>straighten</md-icon>${i18next.t('figure.button.remeasure-range')}\n </button>`\n : nothing}\n ${this.renderSizingRule(asset, unavailable)}\n </section>`\n }\n /**\n * How the figure grows. One ratio (`sizing: 'uniform'`) is said as it is; a figure with joints that has not declared\n * it is offered it -- a mechanism does not shear -- and the author decides (chief architect's ruling 2026-09-24).\n */\n private renderSizingRule(asset: V3Asset, unavailable: boolean) {\n if (asset.sizing === 'uniform') {\n /* One ratio reaches only what reads the size: every other length is offered to follow it, in one step. */\n const follow = proportionToFollow(asset)\n return html`<div inline-field><label>${i18next.t('figure.label.sizing-rule')}</label><span>${i18next.t('figure.label.sizing-uniform')}</span></div>\n ${follow?.count\n ? html`<p hint>${i18next.t('figure.text.proportion-to-follow', { count: follow.count })}</p>\n <button act ?disabled=${unavailable} @click=${() => this.linkCommand({ kind: 'follow-size-in-proportion' })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size-in-proportion')}\n </button>`\n : nothing}\n ${follow?.kept.length ? html`<p hint>${i18next.t('figure.text.proportion-kept', { what: follow.kept.join(', ') })}</p>` : nothing}`\n }\n return html`${turnsAboutAJoint(asset) ? html`<p hint>${i18next.t('figure.text.sizing-uniform-proposed')}</p>` : nothing}\n <button act ?disabled=${unavailable} title=${i18next.t('figure.text.sizing-uniform-explained')} @click=${() => this.linkCommand({ kind: 'scale-uniformly' })}>\n <md-icon>aspect_ratio</md-icon>${i18next.t('figure.button.scale-uniformly')}\n </button>`\n }\n /**\n * The parts list, one row per part the author made: a repeat is one row with how many copies it makes now\n * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\n private partRows(geometry: readonly { id: string }[]): V3PartRow[] {\n const rows = new Map<string, V3PartRow>()\n for (const g of geometry) {\n const id = ownerOf(g.id)\n const row = rows.get(id)\n if (row) {\n row.copies = (row.copies ?? 1) + 1\n continue\n }\n rows.set(id, {\n id,\n provider: (g as { shape?: { provider?: string } }).shape?.provider ?? '',\n hidden: this.hiddenParts.has(id),\n invisible: (g as { visible?: boolean }).visible === false,\n ...(id !== g.id ? { copies: 1 } : {})\n })\n }\n return [...rows.values()]\n }\n /** The detail level's part budget for the list's head, from figure-model's count (a repeat once). */\n private partBudgetOf(asset: V3Asset | undefined) {\n if (!asset) return undefined\n try {\n return { level: asset.detailLevel ?? null, used: v3PartCountOf(asset), limit: asset.detailLevel ? PART_LIMIT[asset.detailLevel] : null }\n } catch {\n return undefined\n }\n }\n /**\n * A repeat: which way its copies run, how many there are now, and how far apart.\n * The pitch of a row that fills its length is edited as a number (`set-repeat` makes it the part's own the first\n * time); a row of a fixed count says its pitch cannot be set yet (figure-model refuses it the same way).\n */\n private renderRepeat(asset: V3Asset | undefined, geometry: readonly { id: string }[], unavailable: boolean) {\n const repeat = repeatOf(this.selected, geometry)\n if (!asset || !repeat || repeat.index) return nothing\n /* The row is set on its part; what hangs from that part is copied with it and has no row of its own. */\n if (!asset.document.model.nodes.some(n => n.id === `${this.selected}.repeat`)) return nothing\n const model = asset.document.model as unknown as {\n nodes: { id: string; op: string; args: string[]; params?: Record<string, string> }[]\n constants: { id: string; value: number }[]\n inputs: { id: string; max?: number }[]\n }\n const layout = model.nodes.find(n => n.id === `${this.selected}.layout`)\n const axis = model.nodes.find(n => n.id === `${this.selected}.repeat`)?.params?.axis ?? '?'\n const own = `${this.selected}.repeat.pitch`\n /* The pitch as it stands: the part's own number, a constant, or what a pitch that follows a length comes to. */\n const pitch = asset.designInputs[own] ?? model.constants.find(c => c.id === layout?.args[4])?.value ?? valueNow(asset, layout?.args[4])\n const fits = layout?.op === 'fit-pitch@1'\n /* What the pitch gives, in numbers: this many copies at the length it is authored, and how long it may be placed. */\n const lengthRef = layout?.args[0] ?? ''\n const length = asset.designInputs[lengthRef]\n const longest = model.inputs.find(i => i.id === lengthRef)?.max\n const limit = model.constants.find(c => c.id === layout?.args[6])?.value\n const field = { id: own, unit: 'mm' as const, role: 'design', value: pitch ?? 0 }\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div inline-field><label>${i18next.t('figure.label.repeat-axis')}</label><span value>${axis.toUpperCase()}</span></div>\n <div inline-field><label>${i18next.t('figure.label.repeat-count')}</label><span value>${repeat.count}</span></div>\n <div inline-field>\n <label>${i18next.t('figure.label.repeat-gap')} <span unit>mm</span></label>\n <input\n type=\"number\"\n step=\"any\"\n aria-label=${own}\n .value=${String(pitch ?? '')}\n ?disabled=${unavailable || !fits}\n @change=${(e: Event) => this.setPitch(field, e)}\n />\n </div>\n <p hint>\n ${fits && length !== undefined && longest !== undefined && limit !== undefined\n ? i18next.t('figure.text.repeat-what-pitch-gives', {\n length: length.toLocaleString(),\n count: repeat.count,\n longest: longest.toLocaleString(),\n limit\n })\n : i18next.t(fits ? 'figure.text.repeat-fits-length' : 'figure.text.repeat-fixed-count')}\n </p>\n ${this.renderPublicPitch(asset, pitch ?? 0, unavailable)}\n ${asset.joints?.some(j => j.body1.part === this.selected && j.repeat)\n ? html`<button act ?disabled=${unavailable} @click=${() => this.run(() => this.session!.command({ kind: 'remove-repeat', part: this.selected }))}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-repeat')}\n </button>`\n : nothing}\n </section>`\n }\n /** The design input a row's pitch is read from, when it is read from one (ADR-0096). */\n private pitchInputOf(asset: V3Asset, part: string): string | undefined {\n const pitch = asset.joints?.find(j => j.body1.part === part && j.repeat)?.repeat?.pitch as { from?: { of?: string; input?: string } } | number | undefined\n return typeof pitch === 'object' && pitch?.from?.of === 'input' ? pitch.from.input : undefined\n }\n /**\n * 「보드에서 바꿀 수 있음」 (ADR-0096): the row's pitch made a design input the figure publishes -- a name on the board and\n * a range the board's value is held to -- in one step; changed or withdrawn the same way. Only a row with a record.\n */\n private renderPublicPitch(asset: V3Asset, pitch: number, unavailable: boolean) {\n const part = this.selected\n if (!asset.joints?.some(j => j.body1.part === part && j.repeat)) return nothing\n const from = this.pitchInputOf(asset, part)\n const listed = from ? asset.publicInputs?.find(p => p.input === from) : undefined\n const input = from ? asset.document.model.inputs.find(i => i.id === from) : undefined\n const form =\n this.publishing?.part === part\n ? this.publishing\n : listed && input\n ? { part, label: listed.label, min: input.min, max: input.max }\n : undefined\n const open = !!form\n const edit = (key: 'label' | 'min' | 'max') => (e: Event) => {\n const target = e.target as HTMLInputElement\n const base = form ?? { part, label: '', min: 0, max: 0 }\n this.publishing = { ...base, [key]: key === 'label' ? target.value : target.valueAsNumber }\n }\n const steps = (): V3ProposalStep[] => {\n const f = form!\n const id = from ?? `${part}.pitch`\n if (listed) return [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }, { kind: 'publish-input', input: id, label: f.label }] as V3ProposalStep[]\n const exists = asset.document.model.inputs.some(i => i.id === id)\n return [\n ...(exists ? [{ kind: 'set-input-range', input: id, min: f.min, max: f.max }] : [{ kind: 'add-design-input', id, unit: 'mm', min: f.min, max: f.max, value: pitch }]),\n ...(from ? [] : [{ kind: 'set-repeat', part, pitch: { from: { of: 'input', input: id } } }]),\n { kind: 'publish-input', input: id, label: f.label }\n ] as V3ProposalStep[]\n }\n const run = (list: V3ProposalStep[]) => {\n try {\n this.session!.applyRecipe(list)\n this.publishing = undefined\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = this.said(error)\n }\n }\n return html`<div public-pitch>\n <label toggle>\n <input\n type=\"checkbox\"\n aria-label=\"figure.label.board-sets\"\n .checked=${open}\n ?disabled=${unavailable}\n @change=${(e: Event) =>\n (e.target as HTMLInputElement).checked\n ? (this.publishing = { part, label: i18next.t('figure.label.repeat-gap'), min: Math.max(1, Math.round(pitch / 2)), max: Math.round(pitch * 2) })\n : listed\n ? run([{ kind: 'unpublish-input', input: from }, { kind: 'set-repeat', part, pitch }] as V3ProposalStep[])\n : (this.publishing = undefined)}\n />\n ${i18next.t('figure.label.board-sets')}\n </label>\n ${open\n ? html`<div inline-field><label>${i18next.t('figure.label.board-name')}</label><input aria-label=\"figure.label.board-name\" .value=${form!.label} @change=${edit('label')} /></div>\n <div inline-field><label>${i18next.t('figure.label.least')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.least\" .value=${String(form!.min)} @change=${edit('min')} /></div>\n <div inline-field><label>${i18next.t('figure.label.most')} <span unit>mm</span></label><input type=\"number\" step=\"any\" aria-label=\"figure.label.most\" .value=${String(form!.max)} @change=${edit('max')} /></div>\n <button act publish-pitch ?disabled=${unavailable || !form!.label.trim()} @click=${() => run(steps())}>\n <md-icon>${listed ? 'check' : 'ios_share'}</md-icon>${i18next.t(listed ? 'figure.button.apply' : 'figure.button.publish-input')}\n </button>`\n : nothing}\n </div>`\n }\n /**\n * A pitch always goes through `set-repeat`: the command moves the longest length with it (at most `limit` copies),\n * which a plain input edit would not. Refused only when the authored length would already hold more copies than\n * that -- said with the numbers.\n */\n private setPitch(field: { id: string; value: number }, event: Event) {\n const input = event.target as HTMLInputElement\n const pitch = input.valueAsNumber\n if (!Number.isFinite(pitch) || pitch === field.value) return\n /* Read from a design input the board may set: the input's value changes, the row keeps reading it (ADR-0096). */\n const from = this.pitchInputOf(JSON.parse(this.session!.source()) as V3Asset, this.selected)\n if (from) {\n this.run(() => this.session!.apply([{ kind: 'set-design', input: from, unit: 'mm', value: pitch }]))\n input.value = String(this.session!.read().fields.find(i => i.id === from)?.value ?? field.value)\n return\n }\n try {\n this.session!.command({ kind: 'set-repeat', part: this.selected, pitch })\n this.error = ''\n this.changed()\n } catch (error) {\n input.value = String(field.value)\n const code = (error as { code?: string })?.code\n const message = error instanceof Error ? error.message : String(error)\n const found = /\\((\\d[\\d.]*) mm\\) a pitch under ([\\d.]+) mm makes more than (\\d+)/.exec(message)\n this.error =\n code === 'INPUT_RANGE' && found\n ? i18next.t('figure.text.repeat-pitch-too-small', { length: Number(found[1]).toLocaleString(), min: found[2], limit: found[3] })\n : this.said(error)\n }\n }\n /** Choose a part, from the list, the canvas or a place row. A figure-level tab gives way to the part's properties. */\n private choose(id: string) {\n /* A copy on the canvas selects its repeat: the part the author made. */\n this.selected = id ? ownerOf(id) : id\n if (id && (this.tab === 'verdict' || this.tab === 'view' || this.tab === 'history')) this.tab = 'properties'\n }\n private asset(): unknown {\n try {\n return JSON.parse(this.session!.source())\n } catch {\n return undefined\n }\n }\n private renderTab(tab: SideTab, icon: string, label: string, badge?: number) {\n return html`<button tab ?on=${this.tab === tab} title=${label} aria-label=${label} @click=${() => (this.tab = tab)}>\n <md-icon>${icon}</md-icon>${badge == null ? '' : html`<span badge>${badge.toLocaleString()}</span>`}\n </button>`\n }\n updated(changed: PropertyValues<this>) {\n super.updated?.(changed)\n const panes = this.renderRoot.querySelector<OxThreePane>('ox-three-pane') ?? undefined\n if (panes !== this.panes) this.panes = panes\n }\n /** Which part the panel speaks of, with the way back to the whole figure. */\n private renderSubject() {\n if (!this.selected) return null\n return html`<div subject>\n <button chip title=${i18next.t('figure.button.whole-figure')} @click=${() => (this.selected = '')}>\n <md-icon>arrow_back</md-icon>${i18next.t('figure.button.whole-figure')}\n </button>\n </div>`\n }\n render() {\n const view = this.session?.read()\n if (!view) return html`<p>${i18next.t('figure.text.opening-model')}</p>`\n const unavailable = view.loading || !!view.error || view.saving || !view.context\n const part = view.geometry.find(g => ownerOf(g.id) === this.selected)\n /* The controls (state inputs) have their own place in the motion tab; these are the design values. */\n const design = view.fields.filter(i => i.role !== 'state')\n /* A repeat's own row values (its pitch) have their own section, not the shape's. */\n const own = design.filter(i => this.selected && i.id.startsWith(this.selected + '.') && !i.id.startsWith(this.selected + '.repeat.'))\n const common = design.filter(i => !view.geometry.some(g => i.id.startsWith(ownerOf(g.id) + '.')))\n const status = view.loading\n ? 'figure.text.loading-figure'\n : view.saving\n ? 'figure.text.saving-figure'\n : view.dirty || !view.id\n ? 'figure.text.unsaved-changes'\n : 'figure.text.saved'\n const asset = this.asset()\n const tab = this.tab\n return html`<ox-canvas-bar\n history\n fit\n undo-shortcut=\"Ctrl+Z\"\n redo-shortcut=\"Ctrl+Y\"\n ?can-undo=${!unavailable && view.canUndo}\n ?can-redo=${!unavailable && view.canRedo}\n .pane=${this.panes}\n @canvas-undo=${() => this.run(() => this.session!.undo())}\n @canvas-redo=${() => this.run(() => this.session!.redo())}\n @canvas-fit=${() => this.renderRoot.querySelector<FigureV3Canvas>('figure-v3-canvas')?.fit()}\n >\n ${this.renderGizmoTools(!unavailable && this.middle === 'edit')}\n ${(['edit', 'preview'] as const).map(\n mode => html`<button slot=\"mode\" mode aria-pressed=${String(this.middle === mode)} title=${i18next.t('figure.text.mode-' + mode + '-explained')} @click=${() => (this.middle = mode)}>\n ${i18next.t('figure.label.mode-' + mode)}\n </button>`\n )}\n <span slot=\"status\" class=\"status\" role=\"status\" ?dirty=${status === 'figure.text.unsaved-changes'}>${i18next.t(status)}</span>\n <button slot=\"commit\" save ?disabled=${unavailable || (!view.dirty && !!view.id)} @click=${this.save}>${i18next.t('figure.button.save')}</button>\n </ox-canvas-bar>\n ${this.error || view.error\n ? html`<div role=\"alert\" class=\"error\">\n ${this.error || view.error}\n ${this.retry && this.error\n ? html`<button act @click=${() => (this.retry!.run ? this.retry!.run() : this.linkCommand(this.retry!.action!))}><md-icon>straighten</md-icon>${this.retry.label}</button>`\n : null}\n </div>`\n : null}\n ${this.notice ? html`<div role=\"status\" class=\"notice\">${this.notice}</div>` : null}\n ${this.catalogOpen\n ? html`<figure-v3-recipe-catalog\n .templates=${this.templates}\n .selected=${this.selected}\n .error=${this.recipeError}\n .guideOf=${this.guideOf}\n .thumbnailOf=${this.thumbnailOf}\n ?locked=${unavailable}\n @insert-recipe=${(e: CustomEvent) => this.insertRecipe(e.detail.recipe, e.detail.values)}\n @close-catalog=${() => (this.catalogOpen = false)}\n ></figure-v3-recipe-catalog>`\n : null}\n <ox-three-pane>\n <figure-v3-parts\n slot=\"start\"\n .budget=${this.budget}\n @show-maturity=${() => (this.tab = 'verdict')}\n .parts=${this.partRows(view.geometry)}\n .partBudget=${this.partBudgetOf(asset as V3Asset | undefined)}\n @set-detail-level=${(e: CustomEvent) => this.linkCommand({ kind: 'set-detail-level', level: e.detail.level })}\n .selected=${this.selected}\n ?locked=${unavailable}\n @add-part=${(e: CustomEvent) => this.add(e.detail.kind)}\n .recipeCount=${this.templates.length}\n @open-recipe-catalog=${() => ((this.catalogOpen = true), (this.recipeError = ''))}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @toggle-part-hidden=${(e: CustomEvent) => this.toggleHiddenPart(e.detail.id)}\n @set-all-parts-hidden=${(e: CustomEvent) =>\n (this.hiddenParts = e.detail.hidden ? new Set(view.geometry.map(g => ownerOf(g.id))) : new Set())}\n @move-part-up=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @move-part-down=${(e: CustomEvent) => this.movePart(e.detail.id, e.detail.to)}\n @duplicate-part=${(e: CustomEvent) => this.duplicatePart(e.detail.id)}\n @remove-part=${(e: CustomEvent) => this.removePart(e.detail.id)}\n ></figure-v3-parts>\n ${this.middle === 'preview'\n ? html`<figure-v3-preview\n .asset=${asset}\n .context=${view.context ?? ''}\n .view=${this.view}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-preview>`\n : html`<figure-v3-canvas\n .view=${this.view}\n .parts=${this.drawnParts(view.geometry, asset)}\n .fan=${this.fanOf(asset as V3Asset | undefined)}\n .palette=${view.palette ?? {}}\n .context=${view.context ?? ''}\n .selected=${this.selected}\n .reach=${unavailable ? { translate: false, rotate: false, scale: false } : this.reachOf(this.selected)}\n @part-transformed=${(e: CustomEvent) => this.transformed(e.detail.id, e.detail.result)}\n @part-selected=${(e: CustomEvent<string>) => this.choose(e.detail)}\n @render-error=${(e: CustomEvent<Error>) => {\n this.error = e.detail.message\n }}\n ></figure-v3-canvas>`}\n <aside slot=\"end\">\n <div tabs>\n ${this.renderTab('properties', 'tune', i18next.t('figure.label.properties'))}\n ${this.renderTab('capability', 'conveyor_belt', i18next.t('figure.label.tab-capability'))}\n ${this.renderTab('motion', 'animation', i18next.t('figure.label.motion'))}\n ${this.renderTab('verdict', 'insights', i18next.t('figure.label.maturity'), this.instances)}\n ${this.renderTab('view', 'wb_sunny', i18next.t('figure.label.tab-environment'))}\n ${this.renderTab('history', 'history', i18next.t('figure.label.history'))}\n </div>\n <slot name=\"notice\"></slot>\n <div panel ?off=${tab !== 'properties'}>\n ${this.selected && part\n ? html`${this.renderSubject()}\n <section>\n <h3>${i18next.t('figure.label.group-part')}</h3>\n <div inline-field>\n <label>${i18next.t('figure.label.name')}</label>\n <input\n name-field\n aria-label=${i18next.t('figure.label.name')}\n .value=${partLabelOf(this.selected)}\n ?disabled=${unavailable || !!repeatOf(this.selected, view.geometry)?.index}\n @change=${(e: Event) => this.renamePart(e.target as HTMLInputElement)}\n />\n </div>\n ${this.renderRepeatNote(view.geometry)}\n </section>\n ${this.renderRepeat(asset as V3Asset | undefined, view.geometry, unavailable)}\n ${this.renderGroups(groupFields(own, this.selected), 'figure.label.group-placement-size', 'figure.label.group-shape', unavailable, this.renderTools(unavailable))}\n ${this.renderLinks(unavailable, 'shape')}\n <figure-v3-material\n .body=${{ ...part, id: this.selected }}\n .palette=${view.palette ?? {}}\n ?locked=${unavailable}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n @v3-part-live=${(e: CustomEvent) => this.hold({}, e.detail.edit)}\n ></figure-v3-material>`\n : html`<slot name=\"figure\"></slot>\n ${this.renderGroups(groupFields(common), 'figure.label.group-figure-size', 'figure.label.design-inputs', unavailable)}\n ${this.renderInstanceRange(asset as V3Asset | undefined, unavailable)}`}\n </div>\n <div panel ?off=${tab !== 'capability'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'places') : null}\n <figure-v3-capability\n .asset=${asset}\n .selected=${this.selected}\n ?locked=${unavailable}\n @select-part=${(e: CustomEvent) => this.choose(e.detail.id)}\n @v3-part-edit=${(e: CustomEvent) => this.run(() => this.session!.edit(e.detail.edit))}\n ></figure-v3-capability>\n </div>\n <div panel ?off=${tab !== 'motion'}>\n ${this.renderSubject()}\n ${this.selected && part ? this.renderLinks(unavailable, 'motion') : html`<section><p hint>${i18next.t('figure.text.choose-a-part-to-move')}</p></section>`}\n ${this.renderControls(view, unavailable)}\n </div>\n <div panel flush ?off=${tab !== 'verdict'}><slot name=\"verdict\"></slot></div>\n <div panel flush ?off=${tab !== 'view'}>\n <figure-settings .view=${this.view} @update-view=${(e: CustomEvent) => this.setView(e.detail.view)}></figure-settings>\n </div>\n <div panel flush ?off=${tab !== 'history'}><slot name=\"history\"></slot></div>\n </aside>\n </ox-three-pane>`\n }\n /** Position, rotation and size as rows of three cells; the shape's own measures one to a line, under their title. */\n private renderGroups(\n groups: { vectors: FieldGroup[]; singles: FieldGroup[] },\n vectorTitle: string,\n singleTitle: string,\n unavailable: boolean,\n tools: unknown = null\n ) {\n return html`${groups.vectors.length || tools\n ? html`<section>\n <h3>${i18next.t(vectorTitle)}</h3>\n ${groups.vectors.map(g => this.renderVector(g, unavailable))}\n ${tools ? html`<div vector-row><label>${i18next.t('figure.label.tools')}</label>${tools}</div>` : nothing}\n </section>`\n : nothing}\n ${groups.singles.length\n ? html`<section>\n <h3>${i18next.t(singleTitle)}</h3>\n <div form>${groups.singles.map(g => (g.kind === 'single' ? this.renderSingle(g.name, g.field, unavailable) : nothing))}</div>\n </section>`\n : nothing}`\n }\n private renderVector(group: FieldGroup, unavailable: boolean) {\n if (group.kind !== 'vector') return nothing\n const unit = group.cells.x.unit === 'deg' ? '°' : group.cells.x.unit\n return html`<div vector-row>\n <label>${i18next.t('figure.label.group-' + group.name)}${group.name === 'rotation' ? '' : html` <span unit>${unit}</span>`}</label>\n <div triple>\n ${(['x', 'y', 'z'] as const).map(\n axis => html`<div cell>\n <span axis ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(group.cells[axis] as never, e, unavailable)}>${axis.toUpperCase()}</span>\n <input\n aria-label=${group.cells[axis].id}\n type=\"number\"\n step=\"any\"\n .value=${String(group.cells[axis].value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(group.cells[axis] as never, e)}\n @change=${(e: Event) => this.changeField(group.cells[axis] as never, e)}\n />\n </div>`\n )}\n </div>\n </div>`\n }\n private renderSingle(name: string, field: FieldLike, unavailable: boolean) {\n const words = name.split('.').map(part => i18next.t('figure.label.field-' + part, { defaultValue: part }))\n return html`<span ?scrub=${!unavailable} @pointerdown=${(e: PointerEvent) => this.scrub(field as never, e, unavailable)}>${words.join(' · ')} (${field.unit})</span\n ><input\n aria-label=${field.id}\n type=\"number\"\n step=\"any\"\n .value=${String(field.value)}\n ?disabled=${unavailable}\n @input=${(e: Event) => this.typing(field as never, e)}\n @change=${(e: Event) => this.changeField(field as never, e)}\n />`\n }\n}\n"]}
@@ -1,45 +0,0 @@
1
- export interface FieldLike {
2
- id: string;
3
- unit: string;
4
- role?: string;
5
- value: number;
6
- }
7
- export type Axis3 = 'x' | 'y' | 'z';
8
- export type FieldGroup = {
9
- kind: 'vector';
10
- name: 'position' | 'rotation' | 'size';
11
- cells: Record<Axis3, FieldLike>;
12
- } | {
13
- kind: 'single';
14
- name: string;
15
- field: FieldLike;
16
- };
17
- /**
18
- * The part's own values (`<part>.…`), or with no part the figure's (`size.x` …). Position, rotation and size come
19
- * first, each only when all three of its axes are there; the rest follow in the order they are declared.
20
- */
21
- export declare function groupFields(fields: readonly FieldLike[], part?: string): {
22
- vectors: FieldGroup[];
23
- singles: FieldGroup[];
24
- };
25
- /**
26
- * The name a person reads for a body. A repeated body's id is its path through the repeats (`["roller.repeat",0,
27
- * "roller.placed"]`), which the list showed as it was; it reads as the part it copies and its place counted from 1 --
28
- * `roller 1`, and `mark 1` for the mark the first roller carries. Any other id is its own name.
29
- */
30
- export declare function partLabelOf(id: string): string;
31
- /**
32
- * The repeat a body is a copy of: its name, how many copies it makes, and which copy this is (counted from 1). Nothing
33
- * for a body that is not a copy.
34
- */
35
- export declare function repeatOf(id: string, geometry: readonly unknown[] | undefined): {
36
- name: string;
37
- count: number;
38
- index: number;
39
- } | null;
40
- /**
41
- * The authored part a body belongs to: a repeat's copy belongs to its repeat (`roller`), any other body is its own. The
42
- * editor selects, lists, hides and names parts by this -- what the author made, not every body the kernel draws
43
- * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).
44
- */
45
- export declare function ownerOf(id: string): string;
@@ -1,83 +0,0 @@
1
- const AXES = ['x', 'y', 'z'];
2
- /** The name a single value goes by: its id without the part, `dimension.` and corner numbers read as words. */
3
- function nameOf(rest) {
4
- return rest.replace(/^dimension\./, '');
5
- }
6
- /**
7
- * The part's own values (`<part>.…`), or with no part the figure's (`size.x` …). Position, rotation and size come
8
- * first, each only when all three of its axes are there; the rest follow in the order they are declared.
9
- */
10
- export function groupFields(fields, part) {
11
- const prefix = part ? `${part}.` : '';
12
- const own = fields.filter(f => (part ? f.id.startsWith(prefix) : !f.id.includes('.') || /^size\.[xyz]$/.test(f.id)));
13
- const byId = new Map(own.map(f => [f.id, f]));
14
- const used = new Set();
15
- const vectors = [];
16
- for (const name of ['position', 'rotation', 'size']) {
17
- const ids = AXES.map(axis => `${prefix}${name}.${axis}`);
18
- if (!ids.every(id => byId.has(id)))
19
- continue;
20
- ids.forEach(id => used.add(id));
21
- vectors.push({ kind: 'vector', name, cells: { x: byId.get(ids[0]), y: byId.get(ids[1]), z: byId.get(ids[2]) } });
22
- }
23
- const singles = own.filter(f => !used.has(f.id)).map(field => ({ kind: 'single', name: nameOf(field.id.slice(prefix.length)), field }));
24
- return { vectors, singles };
25
- }
26
- /**
27
- * The part a copy copies: the member at the end of its path. A row repeats its part and what is fastened to it
28
- * (ADR-0093, 2026-09-26), so the copies of one row are of several parts -- a roller's and the mark on it.
29
- */
30
- const memberOf = (path) => {
31
- const last = [...path].reverse().find((step) => typeof step === 'string');
32
- return last.replace(/\.(placed|value)$/, '').replace(/\.repeat$/, '');
33
- };
34
- /**
35
- * The name a person reads for a body. A repeated body's id is its path through the repeats (`["roller.repeat",0,
36
- * "roller.placed"]`), which the list showed as it was; it reads as the part it copies and its place counted from 1 --
37
- * `roller 1`, and `mark 1` for the mark the first roller carries. Any other id is its own name.
38
- */
39
- export function partLabelOf(id) {
40
- const path = pathOf(id);
41
- if (!path)
42
- return id;
43
- const places = path.filter((step) => typeof step === 'number').map(n => n + 1);
44
- return places.length ? `${memberOf(path)} ${places.join('·')}` : id;
45
- }
46
- /**
47
- * The repeat a body is a copy of: its name, how many copies it makes, and which copy this is (counted from 1). Nothing
48
- * for a body that is not a copy.
49
- */
50
- export function repeatOf(id, geometry) {
51
- const path = pathOf(id);
52
- const paths = (geometry ?? []).map(g => pathOf(g.id ?? '')).filter((p) => !!p);
53
- if (!path) {
54
- /* The part itself, by its name: how many copies of it the row makes now. */
55
- const copies = paths.filter(p => memberOf(p) === id).length;
56
- return copies ? { name: id, count: copies, index: 0 } : null;
57
- }
58
- const name = memberOf(path);
59
- const count = paths.filter(p => p[0] === path[0] && memberOf(p) === name).length;
60
- const index = path.find((step) => typeof step === 'number');
61
- return { name, count, index: (index ?? 0) + 1 };
62
- }
63
- function pathOf(id) {
64
- if (!id.startsWith('['))
65
- return null;
66
- try {
67
- const path = JSON.parse(id);
68
- return Array.isArray(path) && typeof path[0] === 'string' ? path : null;
69
- }
70
- catch {
71
- return null;
72
- }
73
- }
74
- /**
75
- * The authored part a body belongs to: a repeat's copy belongs to its repeat (`roller`), any other body is its own. The
76
- * editor selects, lists, hides and names parts by this -- what the author made, not every body the kernel draws
77
- * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).
78
- */
79
- export function ownerOf(id) {
80
- const path = pathOf(id);
81
- return path ? memberOf(path) : id;
82
- }
83
- //# sourceMappingURL=v3-fields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v3-fields.js","sourceRoot":"","sources":["../../client/modeller/v3-fields.ts"],"names":[],"mappings":"AAaA,MAAM,IAAI,GAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAM9C,+GAA+G;AAC/G,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAA;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAA4B,EAAE,IAAa;IACrE,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;IACrC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACpH,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAA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ACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,EAAU;IAChC,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAA;IACvB,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AACnC,CAAC","sourcesContent":["/*\n * The values a part or the figure is edited by, grouped: position, rotation and size\n * as one row of three cells each (X · Y · Z read together), and the shape's own measures one to a line under their\n * own title. Kept apart from the editor so the grouping is tested without a browser.\n */\nexport interface FieldLike {\n id: string\n unit: string\n role?: string\n value: number\n}\n\nexport type Axis3 = 'x' | 'y' | 'z'\nconst AXES: readonly Axis3[] = ['x', 'y', 'z']\n\nexport type FieldGroup =\n | { kind: 'vector'; name: 'position' | 'rotation' | 'size'; cells: Record<Axis3, FieldLike> }\n | { kind: 'single'; name: string; field: FieldLike }\n\n/** The name a single value goes by: its id without the part, `dimension.` and corner numbers read as words. */\nfunction nameOf(rest: string): string {\n return rest.replace(/^dimension\\./, '')\n}\n\n/**\n * The part's own values (`<part>.…`), or with no part the figure's (`size.x` …). Position, rotation and size come\n * first, each only when all three of its axes are there; the rest follow in the order they are declared.\n */\nexport function groupFields(fields: readonly FieldLike[], part?: string): { vectors: FieldGroup[]; singles: FieldGroup[] } {\n const prefix = part ? `${part}.` : ''\n const own = fields.filter(f => (part ? f.id.startsWith(prefix) : !f.id.includes('.') || /^size\\.[xyz]$/.test(f.id)))\n const byId = new Map(own.map(f => [f.id, f]))\n const used = new Set<string>()\n const vectors: FieldGroup[] = []\n for (const name of ['position', 'rotation', 'size'] as const) {\n const ids = AXES.map(axis => `${prefix}${name}.${axis}`)\n if (!ids.every(id => byId.has(id))) continue\n ids.forEach(id => used.add(id))\n vectors.push({ kind: 'vector', name, cells: { x: byId.get(ids[0]!)!, y: byId.get(ids[1]!)!, z: byId.get(ids[2]!)! } })\n }\n const singles: FieldGroup[] = own.filter(f => !used.has(f.id)).map(field => ({ kind: 'single', name: nameOf(field.id.slice(prefix.length)), field }))\n return { vectors, singles }\n}\n\n/**\n * The part a copy copies: the member at the end of its path. A row repeats its part and what is fastened to it\n * (ADR-0093, 2026-09-26), so the copies of one row are of several parts -- a roller's and the mark on it.\n */\nconst memberOf = (path: unknown[]): string => {\n const last = [...path].reverse().find((step): step is string => typeof step === 'string')!\n return last.replace(/\\.(placed|value)$/, '').replace(/\\.repeat$/, '')\n}\n\n/**\n * The name a person reads for a body. A repeated body's id is its path through the repeats (`[\"roller.repeat\",0,\n * \"roller.placed\"]`), which the list showed as it was; it reads as the part it copies and its place counted from 1 --\n * `roller 1`, and `mark 1` for the mark the first roller carries. Any other id is its own name.\n */\nexport function partLabelOf(id: string): string {\n const path = pathOf(id)\n if (!path) return id\n const places = path.filter((step): step is number => typeof step === 'number').map(n => n + 1)\n return places.length ? `${memberOf(path)} ${places.join('·')}` : id\n}\n\n/**\n * The repeat a body is a copy of: its name, how many copies it makes, and which copy this is (counted from 1). Nothing\n * for a body that is not a copy.\n */\nexport function repeatOf(id: string, geometry: readonly unknown[] | undefined): { name: string; count: number; index: number } | null {\n const path = pathOf(id)\n const paths = (geometry ?? []).map(g => pathOf((g as { id?: string }).id ?? '')).filter((p): p is unknown[] => !!p)\n if (!path) {\n /* The part itself, by its name: how many copies of it the row makes now. */\n const copies = paths.filter(p => memberOf(p) === id).length\n return copies ? { name: id, count: copies, index: 0 } : null\n }\n const name = memberOf(path)\n const count = paths.filter(p => p[0] === path[0] && memberOf(p) === name).length\n const index = path.find((step): step is number => typeof step === 'number')\n return { name, count, index: (index ?? 0) + 1 }\n}\n\nfunction pathOf(id: string): unknown[] | null {\n if (!id.startsWith('[')) return null\n try {\n const path = JSON.parse(id)\n return Array.isArray(path) && typeof path[0] === 'string' ? path : null\n } catch {\n return null\n }\n}\n\n/**\n * The authored part a body belongs to: a repeat's copy belongs to its repeat (`roller`), any other body is its own. The\n * editor selects, lists, hides and names parts by this -- what the author made, not every body the kernel draws\n * (user, 2026-09-24: the conveyor's sixteen rollers were sixteen rows).\n */\nexport function ownerOf(id: string): string {\n const path = pathOf(id)\n return path ? memberOf(path) : id\n}\n\n"]}
@@ -1,35 +0,0 @@
1
- import type { V3Face } from '@hatiolab/figure-model';
2
- export type Placement = 'floor' | 'ceiling' | 'center' | 'wall';
3
- /** What the properties tab reads off the asset. Absent parts of the asset read as absent, never as a default. */
4
- export interface V3FigureFacts {
5
- name: string;
6
- parts: string[];
7
- declared: boolean;
8
- placement?: Placement;
9
- mounting?: {
10
- part: string;
11
- face: V3Face;
12
- };
13
- /**
14
- * Where the figure meets its plane, as its parts stand: the part whose bottom is lowest for a floor, whose top is
15
- * highest for a ceiling, whose back is furthest back for a wall. What the mounting face is offered as before one is
16
- * chosen -- the first part in the list offered a conveyor's bed, 700 mm up on its legs (walk 1, 2026-09-26).
17
- */
18
- suggested?: {
19
- part: string;
20
- face: V3Face;
21
- };
22
- }
23
- /**
24
- * The asset's own facts, as the properties tab shows them.
25
- *
26
- * The mounting face is read back from the feature `set-mounting-face` writes (`<part>.mount.<face>`): the asset
27
- * records the face only as that node, so this is where the screen learns which one is chosen. Parts are the placed
28
- * bodies (`place@1`), in the order the model lists them.
29
- */
30
- export declare function v3FigureFacts(source: string): V3FigureFacts;
31
- /**
32
- * A tag line as a list: split on commas, drop a leading `#`, keep each once. An empty
33
- * line is an empty list, so an author can clear every tag.
34
- */
35
- export declare function tagsOf(raw: string): string[];
@@ -1,55 +0,0 @@
1
- import { compileV3Asset, parseV3Asset, v3OccupiedBoxesOf, v3WritersOf } from '@hatiolab/figure-model';
2
- /**
3
- * The asset's own facts, as the properties tab shows them.
4
- *
5
- * The mounting face is read back from the feature `set-mounting-face` writes (`<part>.mount.<face>`): the asset
6
- * records the face only as that node, so this is where the screen learns which one is chosen. Parts are the placed
7
- * bodies (`place@1`), in the order the model lists them.
8
- */
9
- export function v3FigureFacts(source) {
10
- const asset = parseV3Asset(source);
11
- const parts = asset.document.model.nodes.filter(node => node.op === 'place@1').map(node => node.id);
12
- const feature = asset.occupancy?.contact?.surface?.feature;
13
- const found = feature?.match(/^(.+)\.mount\.(left|right|bottom|top|back|front)\.value$/);
14
- return {
15
- name: asset.name,
16
- parts,
17
- declared: !!asset.occupancy,
18
- placement: asset.occupancy?.placement,
19
- mounting: found ? { part: found[1], face: found[2] } : undefined,
20
- suggested: suggestedMountOf(asset, parts)
21
- };
22
- }
23
- function suggestedMountOf(asset, parts) {
24
- const placement = (asset.occupancy?.placement ?? 'floor');
25
- if (placement === 'center' || !parts.length)
26
- return undefined;
27
- let boxes;
28
- try {
29
- boxes = v3OccupiedBoxesOf(compileV3Asset(asset).evaluate().geometry, v3WritersOf(asset)).filter(b => parts.includes(b.part));
30
- }
31
- catch {
32
- return undefined;
33
- }
34
- const [axis, face, sign] = placement === 'wall' ? ['z', 'back', -1] : placement === 'ceiling' ? ['y', 'top', 1] : ['y', 'bottom', -1];
35
- /* The side of each box that faces the plane; the one furthest toward it, the first in the list among equals. */
36
- const reach = (b) => sign * (b.centre[axis] + (sign * b.extent[axis]) / 2);
37
- let best;
38
- for (const b of boxes)
39
- if (!best || reach(b) > reach(best) + 1e-6)
40
- best = b;
41
- return best ? { part: best.part, face } : undefined;
42
- }
43
- /**
44
- * A tag line as a list: split on commas, drop a leading `#`, keep each once. An empty
45
- * line is an empty list, so an author can clear every tag.
46
- */
47
- export function tagsOf(raw) {
48
- return [
49
- ...new Set(raw
50
- .split(',')
51
- .map(one => one.trim().replace(/^#+/, '').trim())
52
- .filter(one => one.length > 0))
53
- ];
54
- }
55
- //# sourceMappingURL=v3-figure-facts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v3-figure-facts.js","sourceRoot":"","sources":["../../client/modeller/v3-figure-facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAwBrG;;;;;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AO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;aAChD,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CACjC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { compileV3Asset, parseV3Asset, v3OccupiedBoxesOf, v3WritersOf } from '@hatiolab/figure-model'\nimport type { V3Asset, V3Face } from '@hatiolab/figure-model'\n\n/*\n * What the V3 properties tab reads, kept apart from the element so it can be tested without a browser.\n */\n\nexport type Placement = 'floor' | 'ceiling' | 'center' | 'wall'\n\n/** What the properties tab reads off the asset. Absent parts of the asset read as absent, never as a default. */\nexport interface V3FigureFacts {\n name: string\n parts: string[]\n declared: boolean\n placement?: Placement\n mounting?: { part: string; face: V3Face }\n /**\n * Where the figure meets its plane, as its parts stand: the part whose bottom is lowest for a floor, whose top is\n * highest for a ceiling, whose back is furthest back for a wall. What the mounting face is offered as before one is\n * chosen -- the first part in the list offered a conveyor's bed, 700 mm up on its legs (walk 1, 2026-09-26).\n */\n suggested?: { part: string; face: V3Face }\n}\n\n/**\n * The asset's own facts, as the properties tab shows them.\n *\n * The mounting face is read back from the feature `set-mounting-face` writes (`<part>.mount.<face>`): the asset\n * records the face only as that node, so this is where the screen learns which one is chosen. Parts are the placed\n * bodies (`place@1`), in the order the model lists them.\n */\nexport function v3FigureFacts(source: string): V3FigureFacts {\n const asset = parseV3Asset(source) as V3Asset & { document: { model: { nodes: Array<{ id: string; op: string }> } } }\n const parts = asset.document.model.nodes.filter(node => node.op === 'place@1').map(node => node.id)\n const feature = (asset.occupancy?.contact as { surface?: { feature?: string } } | undefined)?.surface?.feature\n const found = feature?.match(/^(.+)\\.mount\\.(left|right|bottom|top|back|front)\\.value$/)\n return {\n name: asset.name,\n parts,\n declared: !!asset.occupancy,\n placement: asset.occupancy?.placement as Placement | undefined,\n mounting: found ? { part: found[1], face: found[2] as V3Face } : undefined,\n suggested: suggestedMountOf(asset, parts)\n }\n}\n\nfunction suggestedMountOf(asset: V3Asset, parts: string[]): { part: string; face: V3Face } | undefined {\n const placement = (asset.occupancy?.placement ?? 'floor') as Placement\n if (placement === 'center' || !parts.length) return undefined\n let boxes\n try {\n boxes = v3OccupiedBoxesOf(compileV3Asset(asset).evaluate().geometry, v3WritersOf(asset)).filter(b => parts.includes(b.part))\n } catch {\n return undefined\n }\n const [axis, face, sign] = placement === 'wall' ? (['z', 'back', -1] as const) : placement === 'ceiling' ? (['y', 'top', 1] as const) : (['y', 'bottom', -1] as const)\n /* The side of each box that faces the plane; the one furthest toward it, the first in the list among equals. */\n const reach = (b: (typeof boxes)[number]) => sign * (b.centre[axis] + (sign * b.extent[axis]) / 2)\n let best: (typeof boxes)[number] | undefined\n for (const b of boxes) if (!best || reach(b) > reach(best) + 1e-6) best = b\n return best ? { part: best.part, face } : undefined\n}\n\n/**\n * A tag line as a list: split on commas, drop a leading `#`, keep each once. An empty\n * line is an empty list, so an author can clear every tag.\n */\nexport function tagsOf(raw: string): string[] {\n return [\n ...new Set(\n raw\n .split(',')\n .map(one => one.trim().replace(/^#+/, '').trim())\n .filter(one => one.length > 0)\n )\n ]\n}\n"]}
@@ -1,17 +0,0 @@
1
- /** A type as typed, made into the shape a type has: letters, digits and underscores, upper case. */
2
- export declare function typeOf(raw: string): string;
3
- /**
4
- * Whether this name could be released, by the format's own rules (`type-not-identifier`, `type-is-placeholder`).
5
- * Saving under it is not blocked -- it can still change before release -- but the author hears it now.
6
- */
7
- export declare function releasableType(type: string): boolean;
8
- /** Why the first save cannot go on with this type, as an i18n key, or null when it can. */
9
- export declare function firstSaveRefusalOf(type: string, taken: readonly string[]): {
10
- key: string;
11
- type?: string;
12
- } | null;
13
- /** What the first save asks for. */
14
- export interface FirstSave {
15
- type: string;
16
- name: string;
17
- }
@@ -1,26 +0,0 @@
1
- import { isPlaceholderType, TYPE_LENGTH, TYPE_PATTERN } from '@hatiolab/figure-model';
2
- /*
3
- * The first save of a new figure asks for its type and name. The type is the name a board places
4
- * the figure by; it freezes when the figure is released (ADR-0063 decision 4). The modeller once saved a new figure
5
- * under a temporary machine name and asked nothing -- the author had to find the field afterwards (user, 2026-09-25).
6
- */
7
- /** A type as typed, made into the shape a type has: letters, digits and underscores, upper case. */
8
- export function typeOf(raw) {
9
- return raw.trim().replace(/[^A-Za-z0-9_]/g, '_').toUpperCase();
10
- }
11
- /**
12
- * Whether this name could be released, by the format's own rules (`type-not-identifier`, `type-is-placeholder`).
13
- * Saving under it is not blocked -- it can still change before release -- but the author hears it now.
14
- */
15
- export function releasableType(type) {
16
- return !isPlaceholderType(type) && TYPE_PATTERN.test(type) && type.length >= TYPE_LENGTH.min && type.length <= TYPE_LENGTH.max;
17
- }
18
- /** Why the first save cannot go on with this type, as an i18n key, or null when it can. */
19
- export function firstSaveRefusalOf(type, taken) {
20
- if (!type)
21
- return { key: 'figure.text.enter-a-type-name' };
22
- if (taken.includes(type))
23
- return { key: 'figure.text.type-name-already-taken', type };
24
- return null;
25
- }
26
- //# sourceMappingURL=v3-first-save.js.map