@things-factory/figure-ui 10.1.94 → 10.1.96

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 (38) hide show
  1. package/client/modeller/editor.ts +30 -11
  2. package/client/modeller/figure-fasten-drawing.ts +0 -2
  3. package/client/modeller/figure-links.ts +22 -25
  4. package/client/modeller/figure-material-panel.ts +18 -11
  5. package/client/modeller/figure-properties.ts +2 -2
  6. package/client/modeller/figure-section-panel.ts +12 -11
  7. package/client/modeller/links.ts +49 -23
  8. package/client/modeller/side-panel-styles.ts +67 -32
  9. package/dist-client/modeller/editor.d.ts +7 -2
  10. package/dist-client/modeller/editor.js +31 -10
  11. package/dist-client/modeller/editor.js.map +1 -1
  12. package/dist-client/modeller/figure-fasten-drawing.js +0 -2
  13. package/dist-client/modeller/figure-fasten-drawing.js.map +1 -1
  14. package/dist-client/modeller/figure-links.js +24 -25
  15. package/dist-client/modeller/figure-links.js.map +1 -1
  16. package/dist-client/modeller/figure-material-panel.js +18 -11
  17. package/dist-client/modeller/figure-material-panel.js.map +1 -1
  18. package/dist-client/modeller/figure-properties.js +2 -2
  19. package/dist-client/modeller/figure-properties.js.map +1 -1
  20. package/dist-client/modeller/figure-section-panel.d.ts +1 -0
  21. package/dist-client/modeller/figure-section-panel.js +12 -11
  22. package/dist-client/modeller/figure-section-panel.js.map +1 -1
  23. package/dist-client/modeller/links.d.ts +14 -4
  24. package/dist-client/modeller/links.js +51 -23
  25. package/dist-client/modeller/links.js.map +1 -1
  26. package/dist-client/modeller/side-panel-styles.d.ts +5 -1
  27. package/dist-client/modeller/side-panel-styles.js +67 -32
  28. package/dist-client/modeller/side-panel-styles.js.map +1 -1
  29. package/dist-client/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +2 -2
  31. package/test/command-preview.test.ts +3 -3
  32. package/test/first-minute.test.ts +16 -7
  33. package/test/section-panel.test.ts +2 -2
  34. package/translations/en.json +18 -10
  35. package/translations/ja.json +18 -10
  36. package/translations/ko.json +18 -10
  37. package/translations/ms.json +18 -10
  38. package/translations/zh.json +18 -10
@@ -1 +1 @@
1
- {"version":3,"file":"links.js","sourceRoot":"","sources":["../../client/modeller/links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAGhV,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAOzD,MAAM,CAAC,MAAM,IAAI,GAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAQpD,MAAM,OAAO,GAAG,CAAC,KAAkB,EAAE,EAAE,CACrC,KAAK,CAAC,QAAQ,CAAC,KAA+K,CAAA;AAKhM;;;;GAIG;AACH,iHAAiH;AACjH,MAAM,UAAU,QAAQ,CAAC,KAAkB,EAAE,IAAY,EAAE,IAAU;IACnE,OAAO,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC;AAED,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAkB,EAAE,IAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;AAElJ,oHAAoH;AACpH,MAAM,UAAU,UAAU,CAAC,KAAkB,EAAE,IAAY;IACzD,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,U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AM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnC,CAAA;AAClB,CAAC","sourcesContent":["import { FIGURE_FACES, figureShapeFaces, figurePartsExtentOf, compileFigureAsset, compileFigureGraph, figureFollowOf, proposeFigureProportion, defaultInstanceSizeRange, foldInstanceSizeRange, figureAttachmentsOf, figureBindingsOf, figureInstanceSizeLimitsOf, figureFollowableAxesOf, figureShapeProviderOf } from '@hatiolab/figure-model'\nimport type { FigureFollow, FigureSizeRange } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureBindingPlace, FigureFace, FigureJoint } from '@hatiolab/figure-model'\nimport { startingShapeKindOf } from './starting-shape.js'\n\n/*\n * What a part is tied to — the readers behind the parts' size response, fastening and motion sections. Kept apart from the element so they can be tested without a browser.\n */\n\nexport type Axis = 'x' | 'y' | 'z'\nexport const AXES: readonly Axis[] = ['x', 'y', 'z']\n\ninterface Node {\n id: string\n op: string\n args: string[]\n outputs: Record<string, string>\n}\nconst modelOf = (asset: FigureAsset) =>\n asset.document.model as unknown as { nodes: Node[]; inputs: Array<{ id: string; role?: string; unit?: string; min?: number; max?: number }>; constants: Array<{ id: string; value: number }> }\n\n/** What one dimension of a part is worked out from (figure-model's `FigureFollow`). */\nexport type Follow = FigureFollow\n\n/**\n * `link-dimension` routes a part's dimension through `<part>.dimension.<axis>` and points its first argument at the\n * source, directly or through the nodes that scale it. Walking back through those nodes finds the source: the\n * instance size (`size.<axis>`), another part's dimension (`<part>.dimension.<axis>.value`) or a declared input.\n */\n/** What one measure of a part is worked out from, read back from the graph (figure-model's reader, one copy). */\nexport function followOf(asset: FigureAsset, part: string, axis: Axis): Follow {\n return figureFollowOf(asset, part, axis)\n}\n\n/** Whether the asset declares an instance size on an axis — only then can a dimension follow it. */\nexport const hasInstanceSize = (asset: FigureAsset, axis: Axis) => modelOf(asset).inputs.some(i => i.id === `size.${axis}` && i.role === 'design')\n\n/** The part this one is fastened to, or `null`. The mounting plane counts as fastened (the model names no part). */\nexport function fastenedTo(asset: FigureAsset, part: string): string | null {\n return figureAttachmentsOf(asset)[part] ?? null\n}\n\n/**\n * What holds a part: the part it is fastened to, the plane the figure is mounted on, or nothing. The joint record says\n * it; a part standing on the plane had read as fastened to nothing, so the form offered no way to move it and sent\n * no replace -- the fastening was refused as already made (the door's post, 2026-09-25).\n */\nexport function heldBy(asset: FigureAsset, part: string): { part: string } | { plane: true } | null {\n const record = asset.joints?.find(j => j.body1.part === part)\n if (record) return 'plane' in record.body0 ? { plane: true } : { part: record.body0.part }\n const to = fastenedTo(asset, part)\n return to ? { part: to } : null\n}\n\n/** Whether a dimension of this part can follow something — box-shaped, whose three sizes are X, Y and Z. */\nexport function canFollow(asset: FigureAsset, part: string): boolean {\n return followableAxes(asset, part).length > 0\n}\n\n/**\n * The axes whose size can follow something: figure-model's one list (`figureFollowableAxesOf`), which follow-size and\n * the resize plan ask too -- the screen does not keep a list of its own (designer 2026-09-27).\n */\nexport function followableAxes(asset: FigureAsset, part: string): Axis[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return shape ? figureFollowableAxesOf(shape as never) : []\n}\n\n/**\n * The directions \"follow the size, attached\" passes to figure-model (designer 2026-09-27):\n * - `chosen`: what the author ticked, and the ones already following, which stay;\n * - `suggested`: a part the author has not chosen for yet and that follows nothing -- every direction, said as\n * \"all three\" on the button, never as a choice the author made;\n * - `none`: the author set every direction back to fixed, or unticked them all -- nothing is taken for all.\n * `pending` is the author's ticks for this part in this screen, when they have ticked or fixed anything.\n */\nexport function resizeAxesOf(asset: FigureAsset, part: string, pending?: readonly Axis[]): { axes: Axis[]; basis: 'chosen' | 'suggested' | 'none' } {\n const editable = followableAxes(asset, part)\n const following = editable.filter(axis => {\n const now = followOf(asset, part, axis)\n return now.of === 'instance' && now.axis === axis\n })\n if (pending) {\n const axes = editable.filter(axis => pending.includes(axis) || following.includes(axis))\n return { axes, basis: axes.length ? 'chosen' : 'none' }\n }\n if (following.length) return { axes: following, basis: 'chosen' }\n return { axes: editable, basis: editable.length ? 'suggested' : 'none' }\n}\n\n/**\n * The selected part in three short lines, for the head of its panel (designer 2026-09-27, B): what it is, how its\n * size answers the figure's, and what holds it -- 「box · 상자 / 너비는 도형을 따라감 / 아랫면을 바닥에 유지 중」.\n */\nexport function partSummaryOf(asset: FigureAsset, part: string, say: (key: string, params?: Record<string, string>) => string): { kind: string; size: string; relation: string } {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const named = startingShapeKindOf(shape as never)\n const kind = named ? say(`figure.label.primitive-${named}`) : ''\n const editable = followableAxes(asset, part)\n const round = editable.length === 2\n const word = (axis: Axis) => say(round && axis === 'x' ? 'figure.label.resize-diameter' : `figure.label.resize-${axis}`)\n const following = editable.filter(axis => {\n const now = followOf(asset, part, axis)\n return now.of === 'instance' && now.axis === axis\n })\n const ruled = editable.filter(axis => followOf(asset, part, axis).of !== 'own' && !following.includes(axis))\n const size = [\n following.length ? say('figure.text.summary-follows', { axes: following.map(word).join(' · ') }) : '',\n ruled.length ? say('figure.text.summary-ruled', { axes: ruled.map(word).join(' · ') }) : ''\n ].filter(Boolean).join(' / ') || say('figure.text.summary-size-fixed')\n const joint = asset.joints?.find(j => j.body1.part === part)\n let relation = say('figure.text.summary-free')\n if (joint) {\n const face = say(`figure.label.face-${joint.body1.face}`)\n const gap = typeof joint.origin?.gap === 'number' ? joint.origin.gap : 0\n relation =\n 'plane' in joint.body0\n ? say('figure.text.held-on-plane', { face, place: say(`figure.label.resize-place-${asset.placement ?? 'floor'}`), gap: String(gap) })\n : say('figure.text.held-on-part', { face, other: joint.body0.part, otherFace: say(`figure.label.face-${joint.body0.face}`) })\n }\n return { kind, size, relation }\n}\n\n/**\n * A part's own field in the words its row uses -- 「위치 Y」, 「크기 X」, and the turn as one 「회전」 -- so a field the plan\n * replaces, or one only the room reads, is named as the author knows it, not by its id.\n */\nexport function fieldWordsOf(id: string, say: (key: string) => string): string {\n const own = /\\.(position|rotation|size)\\.([xyz])$/.exec(id)\n if (!own) return id\n return own[1] === 'rotation' ? say('figure.label.group-rotation') : `${say(`figure.label.group-${own[1]}`)} ${own[2]!.toUpperCase()}`\n}\n\n/** What a part's own measure on an axis is now (a box's side, a cylinder's radius or length), at the design as it stands. */\nexport function dimensionNow(asset: FigureAsset, part: string, axis: Axis): number | undefined {\n const m = modelOf(asset)\n /* The argument the shape names for this axis (figure-model's provider), not its place among the arguments. */\n const shape = m.nodes.find(n => n.id === `${part}.shape`)\n const edit = shape && figureShapeProviderOf(shape as never)?.edit[axis]\n const ref = edit && !('refused' in edit) ? shape!.args[edit.arg] : undefined\n if (!ref) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[ref]\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * How long a part is along one axis now, as it is drawn: the shape's own measure through figure-model's provider (a\n * cylinder's width is twice its radius), read after any rule it follows -- so a linked measure still says its size.\n */\nexport function measureNow(asset: FigureAsset, part: string, axis: Axis): number | undefined {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const edit = shape && figureShapeProviderOf(shape as never)?.edit[axis]\n if (!shape || !edit || 'refused' in edit) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[shape.args[edit.arg]!]\n return typeof value === 'number' && Number.isFinite(value) ? value * edit.k : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * The flat faces a part's shape declares, by name -- figure-model's shape definitions are the one place they are\n * written (a portal's opening sides as well as its outer faces). A sphere has none.\n */\nexport function facesOf(asset: FigureAsset, part: string): string[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return inScreenOrder(Object.keys((shape && figureShapeFaces(shape as never)) ?? {}))\n}\n\n/** Faces in the order the screen lists them: the six outer ones left to front, then the rest as the shape gives them. */\nconst SCREEN_ORDER = ['left', 'right', 'bottom', 'top', 'back', 'front']\nfunction inScreenOrder(names: string[]): string[] {\n const rank = (n: string) => (SCREEN_ORDER.includes(n) ? SCREEN_ORDER.indexOf(n) : SCREEN_ORDER.length)\n return names.map((n, i) => [n, i] as const).sort((a, b) => rank(a[0]) - rank(b[0]) || a[1] - b[1]).map(([n]) => n)\n}\n\n/** The axis a face of a part faces along, from the same definitions. */\nexport function faceAxisOf(asset: FigureAsset, part: string, face: string): Axis | undefined {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return (shape && figureShapeFaces(shape as never)?.[face]?.axis) as Axis | undefined\n}\n\n/** Whether `attach` can take this part: any part whose shape has a flat face. */\nexport function canFasten(asset: FigureAsset, part: string): boolean {\n return facesOf(asset, part).length > 0\n}\n\nconst OUTER: Record<Axis, [string, string]> = { x: ['left', 'right'], y: ['bottom', 'top'], z: ['back', 'front'] }\n\n/**\n * The axes a part can be made a row along (r3 §8, figure-model `make-repeat`): across the face it is fastened by, when\n * it is fastened fixed to another part and holds nothing. None for a part that is loose, moves, stands on the floor or\n * already repeats -- the command would refuse those, so they are not offered.\n */\nexport function rowAxesOf(asset: FigureAsset, part: string): Axis[] {\n const joints = asset.joints ?? []\n const j = joints.find(o => o.body1.part === part)\n /* A part that moves may be a row too: every copy on the one control, from its own place (designer 2026-09-27). */\n if (!j || j.repeat || !('part' in j.body0)) return []\n if (joints.some(o => 'part' in o.body0 && o.body0.part === part)) return []\n return AXES.filter(axis => axis !== FIGURE_FACES[j.body1.face])\n}\n\n/**\n * Why a part cannot be made into a row here, in the terms `rowAxesOf` refuses it: said, not hidden (ADR-0097 §5.5).\n * Nothing when it can, or when it already is a row (that row is shown where it stands).\n */\nexport function rowBlockOf(asset: FigureAsset, part: string): 'unfastened' | 'on-plane' | 'holds-parts' | undefined {\n const joints = asset.joints ?? []\n const j = joints.find(o => o.body1.part === part)\n if (!j) return 'unfastened'\n if (j.repeat) return undefined\n if (!('part' in j.body0)) return 'on-plane'\n if (joints.some(o => 'part' in o.body0 && o.body0.part === part)) return 'holds-parts'\n return undefined\n}\n\n/** The row a part is made into, as its fastening's record keeps it. */\nexport const rowOf = (asset: FigureAsset, part: string) => asset.joints?.find(o => o.body1.part === part)?.repeat\n\n/** Where a part sits across the face it is fastened to, on one axis: centred, level with an edge, or a distance off centre. */\n/** `share`: the distance as a share of the figure's size on that axis, so it keeps its place when the figure is resized. */\n/** `input`: the place across the face follows one of the part's position fields -- as \"follow size, attached\" keeps it (ADR-0097). */\nexport type Alignment = 'centre' | 'min' | 'max' | 'mm' | 'share' | 'input'\n\n/**\n * The axes across the face a part is fastened to — the two a fastening does not set by itself. Edges to line up with\n * are offered where both parts have their two outer faces on that axis; the plane the figure is mounted on has none,\n * so on it (X and Z) only centred or a distance is offered.\n */\n/**\n * The mounting plane of this figure, by its placement (ADR-0093): the floor or the ceiling is Y = 0 and a part stands\n * on it by its bottom or hangs from it by its top; a wall is Z = 0 and a part is fastened to it by its back.\n */\nexport function mountingPlaneOf(asset: FigureAsset): { normal: Axis; faces: FigureFace[] } {\n return asset.placement === 'wall' ? { normal: 'z', faces: ['back'] } : { normal: 'y', faces: ['bottom', 'top'] }\n}\n\nexport function alignAxesOf(asset: FigureAsset, part: string, target: { part: string; face: string } | 'plane', twisted = false): { axis: Axis; edges: boolean }[] {\n /* The plane has no edges, but a figure that declares its size has sides on it (figure-model 0.1.64). */\n if (target === 'plane') {\n const { normal } = mountingPlaneOf(asset)\n return AXES.filter(axis => axis !== normal).map(axis => ({ axis, edges: !twisted && hasInstanceSize(asset, axis) }))\n }\n const along = faceAxisOf(asset, target.part, target.face)\n if (!along) return []\n const theirs = new Set(facesOf(asset, target.part)),\n mine = new Set(facesOf(asset, part))\n /* A part twisted about the face's normal has no side level with the target's edges. */\n return AXES.filter(axis => axis !== along).map(axis => ({ axis, edges: !twisted && OUTER[axis].every(f => theirs.has(f) && mine.has(f)) }))\n}\n\n/** The controls a part's showing can follow: the figure's state inputs, with their range and label. */\nexport function visibilityControlsOf(asset: FigureAsset): Array<{ id: string; unit: string; min: number; max: number; label: string }> {\n const labels = (asset as unknown as { stateInputs?: Record<string, { label?: string }> }).stateInputs ?? {}\n return modelOf(asset)\n .inputs.filter(input => input.role === 'state')\n .map(input => ({ id: input.id, unit: input.unit ?? '', min: input.min ?? 0, max: input.max ?? 1, label: labels[input.id]?.label || input.id }))\n}\n\n/** When the part is drawn (figure-model `set-visibility`): always (null), or while a control is at least a value. */\nexport function shownWhenOf(asset: FigureAsset, part: string): { input: string; atLeast: number } | null {\n const look = asset.appearance.find(one => one.target === part) as { visibility?: string } | undefined\n if (!look?.visibility) return null\n const m = modelOf(asset)\n const node = m.nodes.find(n => n.op === 'at-least@1' && Object.values(n.outputs).includes(look.visibility!))\n const at = node && m.constants.find(c => c.id === node.args[1])\n return node && at ? { input: node.args[0]!, atLeast: at.value } : null\n}\n\n/** Whether `part` hangs from `from`, through any number of fastenings. */\nexport function hangsFrom(asset: FigureAsset, part: string, from: string): boolean {\n const seen = new Set<string>()\n for (let at: string | undefined = part; at && !seen.has(at); ) {\n seen.add(at)\n const j = ((asset.joints ?? []) as FigureJoint[]).find(o => o.body1.part === at)\n at = j && 'part' in j.body0 ? (j.body0 as { part: string }).part : undefined\n if (at === from) return true\n }\n return false\n}\n\n/**\n * The fastening a part has, as the fastening form holds it -- so the form opens on what is there (the face, including\n * \\`centre\\`, the target and its face, the gap, the twist and where across the face) and a change is a change to that.\n * Opening it on the defaults showed a roller fastened by its centre as fastened by its bottom, and fastening again\n * from there broke its turning in place (walk 1, 2026-09-26). Null for a part fastened to nothing.\n */\nexport function fasteningOf(\n asset: FigureAsset,\n part: string\n): {\n face: string\n toPlane: boolean\n target: string\n targetFace: string\n facing: 'meet' | 'flush'\n gap: number\n twist: number\n align: Partial<Record<Axis, Alignment>>\n alignMm: Partial<Record<Axis, number>>\n} | null {\n const record = asset.joints?.find(j => j.body1.part === part)\n if (!record) return null\n const toPlane = 'plane' in record.body0\n const target = 'part' in record.body0 ? record.body0.part : ''\n const targetFace = 'part' in record.body0 ? record.body0.face : 'top'\n const twist = record.origin?.twist ?? 0\n /* Where across the face: as the record says it, and where it says nothing, where the part stands now. */\n const kept = placeKeptOf(asset, part, toPlane ? 'plane' : { part: target, face: targetFace }, !!twist)\n for (const [axis, how] of Object.entries(record.origin?.align ?? {}) as Array<[Axis, unknown]>) {\n if (how === 'min' || how === 'max' || how === 'centre') {\n kept.align[axis] = how\n delete kept.alignMm[axis]\n } else if (how && typeof how === 'object' && typeof (how as { mm?: unknown }).mm === 'number') {\n kept.align[axis] = 'mm'\n kept.alignMm[axis] = (how as { mm: number }).mm\n } else if ((how as { mm?: { from?: { of?: string; input?: string } } })?.mm?.from?.of === 'input') {\n /* Following a position field: read as that, so fastening again keeps the field and does not fix its number. */\n kept.align[axis] = 'input'\n kept.alignInput[axis] = (how as { mm: { from: { input: string } } }).mm.from.input\n delete kept.alignMm[axis]\n }\n }\n const gap = record.origin?.gap\n return {\n face: record.body1.face,\n toPlane,\n target,\n targetFace,\n facing: record.origin?.facing ?? 'meet',\n gap: typeof gap === 'number' ? gap : 0,\n twist,\n ...kept\n }\n}\n\n/**\n * The alignment that keeps the part where it stands when it is fastened: on each axis across the face, its distance\n * from the target's centre (the plane's is the origin). Fastening used to centre it -- a door set 100 mm in front of\n * its frame slid into it (2026-09-26). Left centred where it already is, and where the target stands turned.\n */\nexport function placeKeptOf(\n asset: FigureAsset,\n part: string,\n target: { part: string; face: string } | 'plane',\n twisted = false\n): { align: Partial<Record<Axis, Alignment>>; alignMm: Partial<Record<Axis, number>>; alignInput: Partial<Record<Axis, string>> } {\n const kept = { align: {} as Partial<Record<Axis, Alignment>>, alignMm: {} as Partial<Record<Axis, number>>, alignInput: {} as Partial<Record<Axis, string>> }\n let geometry\n try {\n geometry = compileFigureAsset(asset).evaluate().geometry as unknown as Array<{ id: string; pose?: { r: number[][]; t: number[] } }>\n } catch {\n return kept\n }\n const poseOf = (id: string) => geometry.find(g => g.id === id)?.pose\n const mine = poseOf(part)\n if (!mine) return kept\n let centre = [0, 0, 0]\n if (target !== 'plane') {\n const theirs = poseOf(target.part)\n const upright = theirs?.r.every((row, i) => row.every((v, j) => Math.abs(v - (i === j ? 1 : 0)) < 1e-9))\n if (!theirs || !upright) return kept\n centre = theirs.t\n }\n for (const { axis } of alignAxesOf(asset, part, target, twisted)) {\n const k = AXES.indexOf(axis)\n const off = Math.round((mine.t[k]! - centre[k]!) * 10) / 10\n if (Math.abs(off) < 0.5) continue\n kept.align[axis] = 'mm'\n kept.alignMm[axis] = off\n }\n return kept\n}\n\n/** The `align` of an attach command from the form's choices: only the axes across that face, and centred ones left out. */\nexport function alignOf(\n asset: FigureAsset,\n part: string,\n target: { part: string; face: string } | 'plane',\n how: Partial<Record<Axis, Alignment>>,\n mm: Partial<Record<Axis, number>>,\n twisted = false,\n inputs: Partial<Record<Axis, string>> = {}\n) {\n const align: Partial<Record<Axis, 'min' | 'max' | { mm: number | { from: { of: 'instance'; axis: Axis }; times: number } | { from: { of: 'input'; input: string } } }>> = {}\n for (const { axis, edges } of alignAxesOf(asset, part, target, twisted)) {\n const one = how[axis] ?? 'centre'\n const size = asset.designInputs[`size.${axis}`]\n if (one === 'share' && mm[axis] && hasInstanceSize(asset, axis) && size)\n align[axis] = { mm: { from: { of: 'instance', axis }, times: Math.round((mm[axis]! / size) * 1e6) / 1e6 } }\n else if (one === 'mm' && mm[axis]) align[axis] = { mm: mm[axis]! }\n else if ((one === 'min' || one === 'max') && edges) align[axis] = one\n else if (one === 'input' && inputs[axis]) align[axis] = { mm: { from: { of: 'input', input: inputs[axis]! } } }\n }\n return Object.keys(align).length ? align : undefined\n}\n\n/**\n * The axes on which the part's position is worked out from other values rather than being its own number. `fix-position` makes one its own number where it is now.\n */\nexport function positionsWorkedOut(asset: FigureAsset, part: string): Axis[] {\n const m = modelOf(asset)\n const pose = m.nodes.find(n => n.id === `${part}.pose`)\n if (!pose || pose.op !== 'rigid@1' || fastenedTo(asset, part)) return []\n const own = (ref: string) => ref.startsWith(`${part}.`) && m.inputs.some(i => i.id === ref && i.role === 'design')\n const constant = (ref: string) => m.constants.some(c => c.id === ref)\n return AXES.filter((_axis, i) => !own(pose.args[i]!) && !constant(pose.args[i]!))\n}\n\n/**\n * Whether the part's position on an axis is a share of the instance size (`scale-position`): `size.<axis> × share`.\n * Such a position is worked out too, but it already grows with the figure, so it is not offered again.\n */\nexport function positionIsShare(asset: FigureAsset, part: string, axis: Axis): boolean {\n const m = modelOf(asset)\n const ref = m.nodes.find(n => n.id === `${part}.pose`)?.args[AXES.indexOf(axis)]\n const writer = ref ? m.nodes.find(n => Object.values(n.outputs).includes(ref)) : undefined\n return !!writer && writer.op === 'mul@1' && writer.args[0] === `size.${axis}` && m.constants.some(c => c.id === writer.args[1])\n}\n\n/** How a part moves, if it does: slide or turn, along which axis, driven by which control. */\nexport interface Motion {\n kind: 'slide' | 'turn' | 'continuous'\n axis: Axis | '?'\n control?: { id: string; unit?: string; min?: number; max?: number }\n /** A joint that moves with another (URDF's mimic): the leader's value times `multiplier`, plus `offset`. */\n follows?: { joint: string; multiplier: number; offset?: number }\n /** A slide whose distance is a part's length (plus a difference): the control is its share. */\n travel?: { part: string; axis: string; plus?: number }\n}\n\nexport function motionOf(asset: FigureAsset, part: string): Motion | undefined {\n const m = modelOf(asset)\n const node = m.nodes.find(n => n.id === `${part}.motion`)\n if (!node) return undefined\n const record = asset.joints?.find(j => j.body1.part === part)\n const endless = record?.type === 'revolute' && record.lowerLimit === undefined && record.upperLimit === undefined\n const kind = endless ? 'continuous' : node.op === 'axis-turn@1' ? 'turn' : 'slide'\n const unit = node.args.slice(0, 3).map(ref => m.constants.find(c => c.id === ref)?.value)\n const axis = AXES[unit.findIndex(v => v !== undefined && v !== 0)] ?? '?'\n /* The quantity is the fourth argument, a state input directly or through the nodes that scale it. */\n const quantity = node.args[3]\n const seen = new Set<string>()\n const control = (ref?: string): Motion['control'] => {\n if (!ref || seen.has(ref)) return undefined\n seen.add(ref)\n const input = m.inputs.find(i => i.id === ref && i.role === 'state')\n if (input) return { id: input.id, unit: input.unit, min: input.min, max: input.max }\n const writer = m.nodes.find(n => Object.values(n.outputs).includes(ref))\n for (const arg of writer?.args ?? []) {\n const found = control(arg)\n if (found) return found\n }\n return undefined\n }\n const travel = record?.travel?.source && 'part' in record.travel.source ? { part: record.travel.source.part, axis: record.travel.source.axis, ...(record.travel.plus ? { plus: record.travel.plus } : {}) } : undefined\n return { kind, axis, control: control(quantity), ...(record?.mimic ? { follows: record.mimic } : {}), ...(travel ? { travel } : {}) }\n}\n\n/** What the motion form holds: how the part moves, and either its own control or the joint it moves with. */\nexport interface MotionForm {\n kind: 'slide' | 'turn' | 'continuous'\n axis: Axis\n id: string\n min: number\n max: number\n /** The joint this one moves with; empty for a joint with its own control. */\n follow: string\n multiplier: number\n offset: number\n /**\n * A slide whose distance follows a part's length (figure-model `travel`): `<part>:<axis>`, empty for a distance in\n * millimetres. The control is then the share of that length, 0..1, and the stroke grows when the part does.\n */\n travel?: string\n travelPlus?: number\n}\n\n/**\n * The motion form filled from a joint as it is, so a motion can be changed where it is -- its range, the length it\n * travels by, what it follows -- rather than taken away and made again. Taking it away is refused while another joint\n * follows it, which left a leader's stroke fixed for good (the telescopic conveyor, 2026-09-25).\n */\nexport function motionFormOf(joint: FigureJoint): MotionForm {\n const kind: MotionForm['kind'] = joint.type === 'prismatic' ? 'slide' : joint.lowerLimit === undefined && joint.upperLimit === undefined && !joint.mimic ? 'continuous' : 'turn'\n const travel = joint.travel?.source && 'part' in joint.travel.source ? `${joint.travel.source.part}:${joint.travel.source.axis}` : ''\n return {\n kind,\n axis: (joint.axis ?? 'X').toLowerCase() as Axis,\n id: joint.state?.id ?? '',\n min: travel ? 0 : (joint.lowerLimit ?? (kind === 'slide' ? 0 : -90)),\n max: travel ? 500 : (joint.upperLimit ?? (kind === 'slide' ? 500 : 90)),\n follow: joint.mimic?.joint ?? '',\n multiplier: joint.mimic?.multiplier ?? 1,\n offset: joint.mimic?.offset ?? 0,\n travel,\n travelPlus: joint.travel?.plus ?? 0\n }\n}\n\n/**\n * The joints a part's joint can move with (URDF's mimic): a joint that moves the same way — a slide follows a slide, a\n * turn a turn — and has a control of its own, since a follower follows the joint that is driven.\n */\nexport function leadersFor(asset: FigureAsset, part: string, kind: MotionForm['kind']): FigureJoint[] {\n return (asset.joints ?? []).filter(j => j.body1.part !== part && j.type !== 'fixed' && !j.mimic && (j.type === 'prismatic') === (kind === 'slide'))\n}\n\n/**\n * The joint record the motion form writes for a part fastened by `joint`. A joint of its own gets its limits (none for\n * a turn without end, as in USD) and a control; a follower gets the leader, the multiplier and the offset, and no\n * control or limits of its own — its range is the leader's times the multiplier.\n */\nexport function motionJoint(joint: FigureJoint, m: MotionForm, part: string): FigureJoint {\n const moving = {\n id: joint.id,\n body0: joint.body0,\n body1: joint.body1,\n ...(joint.origin ? { origin: joint.origin } : {}),\n /* A row keeps being a row when it is given a motion: dropped here, the row went with it (designer 2026-09-27). */\n ...(joint.repeat ? { repeat: joint.repeat } : {}),\n type: m.kind === 'slide' ? ('prismatic' as const) : ('revolute' as const),\n axis: m.axis.toUpperCase() as 'X' | 'Y' | 'Z'\n }\n if (m.follow) return { ...moving, mimic: { joint: m.follow, multiplier: m.multiplier, ...(m.offset ? { offset: m.offset } : {}) } }\n if (m.kind === 'slide' && m.travel) {\n const [of, axis] = m.travel.split(':')\n return { ...moving, travel: { source: { of: 'part', part: of!, axis: axis as Axis }, ...(m.travelPlus ? { plus: m.travelPlus } : {}) }, state: { id: m.id || `${part}-${m.kind}` } }\n }\n return { ...moving, ...(m.kind === 'continuous' ? {} : { lowerLimit: m.min, upperLimit: m.max }), state: { id: m.id || `${part}-${m.kind}` } }\n}\n\n/** The select's value for what a dimension follows now. */\nexport function choiceOf(follow: Follow): string {\n switch (follow.of) {\n case 'own':\n return 'own'\n case 'instance':\n return follow.times === 1 ? `instance:${follow.axis}` : `share:${follow.axis}`\n case 'part':\n return `part:${follow.part}:${follow.axis}`\n case 'input':\n return `input:${follow.input}`\n case 'expression':\n return 'expression'\n }\n}\n\n/**\n * The faces a place can sit on for this part: its flat faces, but not a plane that only touches a curved side along a\n * line (a cylinder's side, Q3) -- nothing is held on a line. A sphere has none.\n */\nexport function placeFacesOf(asset: FigureAsset, part: string): FigureFace[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const faces = (shape && figureShapeFaces(shape as never)) ?? {}\n return inScreenOrder(Object.entries(faces).filter(([, f]) => !(f as { contact?: string }).contact).map(([name]) => name)) as FigureFace[]\n}\n\n/** The places things are held that sit on this part. */\nexport function placesOn(asset: FigureAsset, part: string): FigureBindingPlace[] {\n return figureBindingsOf(asset).filter(one => one.part === part)\n}\n\n/** An id for a new place on this part, not yet taken: `<part>-<role>`, then `-2`, `-3`. */\nexport function placeIdFor(asset: FigureAsset, part: string, role: 'seat' | 'grip'): string {\n const taken = new Set(asset.document.capabilities.bindings.map(b => b.id))\n const base = `${part}-${role}`\n if (!taken.has(base)) return base\n let n = 2\n while (taken.has(`${base}-${n}`)) n++\n return `${base}-${n}`\n}\n\n/**\n * Whether a board will hand this figure anything: a place is a slot only on a figure that declares it holds things\n * (`Capacity`, or `FlowNode`, which includes it). Without it the places are declared and nothing arrives.\n */\nexport const holdsThings = (asset: FigureAsset) => (asset.document.capabilities.names ?? []).some(n => n === 'Capacity' || n === 'FlowNode')\n\n/** What `accepts` a person typed: names split on commas, trimmed, blanks and repeats dropped. */\nexport const acceptsOf = (typed: string) => [...new Set(typed.split(',').map(one => one.trim()).filter(Boolean))]\n\n/**\n * The sizes a board may give this figure: the range it declares now, and the range measured afresh -- the default\n * (1 mm to ten times the authored size) narrowed only where the figure cannot follow, by figure-model's own functions.\n * A range measured when a part filled what the others left (ROBOT_ARM: Y from 1,854 mm) stays narrow after the part is\n * made to grow with the figure; measuring again gives the figure its whole range back. Nothing when no size is declared.\n */\nexport function instanceRangeOf(asset: FigureAsset): { declared: FigureSizeRange; measured: FigureSizeRange } | undefined {\n const inputs = modelOf(asset).inputs\n const declared = {} as FigureSizeRange\n const authored = {} as Record<Axis, number>\n for (const axis of AXES) {\n const input = inputs.find(i => i.id === `size.${axis}` && i.role === 'design')\n const at = asset.designInputs[`size.${axis}`]\n if (!input || typeof at !== 'number') return undefined\n declared[axis] = { min: input.min ?? 0, max: input.max ?? Infinity }\n authored[axis] = at\n }\n const start = defaultInstanceSizeRange(authored)\n const measured = foldInstanceSizeRange(start, figureInstanceSizeLimitsOf(asset, start)).range\n return { declared, measured }\n}\n\n/**\n * The size range to declare for a figure that has none yet: its parts' extent now as the size it is authored at, and\n * as wide as its parts allow around it (the same measure 「다시 재기」 uses). Undefined when the figure already has a\n * size or has nothing to measure. Without a declared size a board cannot resize the figure, and no part is offered\n * to follow its size -- every figure made in the modeller was left there (user, 2026-09-25).\n */\nexport function instanceRangeToDeclare(asset: FigureAsset): { range: FigureSizeRange; at: Record<Axis, number> } | undefined {\n if (instanceRangeOf(asset) || !asset.appearance.length) return undefined\n /* The parts as they rest -- not the room their joints swing them through, which declared a door 8208 mm every way. */\n const at = figurePartsExtentOf(asset) as Record<Axis, number>\n if (AXES.some(axis => !(at[axis] > 0))) return undefined\n const start = defaultInstanceSizeRange(at)\n return { range: foldInstanceSizeRange(start, figureInstanceSizeLimitsOf(asset, start)).range, at }\n}\n\n/** Whether measuring again would change the declared range (to a micrometre). */\n/**\n * The declared range with one end typed by the author: the sizes a figure may be placed at are a claim about the\n * product (a gantry spans metres, not 30 cm to 29 m), and measuring only ever widens them. Nothing when the typed\n * value is not a number; whether the figure holds there is the command's to say.\n */\nexport function rangeWith(declared: FigureSizeRange, axis: Axis, bound: 'min' | 'max', value: number): FigureSizeRange | undefined {\n if (!Number.isFinite(value)) return undefined\n const next = structuredClone(declared)\n next[axis][bound] = value\n return next\n}\n\n/**\n * For a figure that grows by one ratio: how many of its lengths would follow the ratio, and which it leaves with their\n * own number (not those that follow another length -- they grow with it). Nothing for a figure of another sizing.\n */\nexport function proportionToFollow(asset: FigureAsset): { count: number; kept: string[] } | undefined {\n if (asset.sizing !== 'uniform') return undefined\n try {\n const plan = proposeFigureProportion(asset)\n return { count: plan.dimensions.length + plan.lengths.length, kept: plan.skipped.filter(s => !s.follows).map(s => s.what) }\n } catch {\n return undefined\n }\n}\n\n/** A value of the figure as it stands, by its graph reference. */\nexport function valueNow(asset: FigureAsset, ref: string | undefined): number | undefined {\n if (!ref) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[ref]\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n } catch {\n return undefined\n }\n}\n\nexport function rangeDiffers(a: FigureSizeRange, b: FigureSizeRange): boolean {\n return AXES.some(axis => Math.abs(a[axis].min - b[axis].min) > 1e-3 || Math.abs(a[axis].max - b[axis].max) > 1e-3)\n}\n\n/**\n * Whether the figure is a mechanism -- a part turns about a joint. Such a figure should grow by one ratio (chief\n * architect's ruling 2026-09-24); the modeller proposes it, the author declares it.\n */\nexport function turnsAboutAJoint(asset: FigureAsset): boolean {\n return modelOf(asset).nodes.some(n => n.op === 'axis-turn@1')\n}\n\n/** The joint made still: its fastening, its place and its row kept, its motion gone. */\nexport function fixedJointOf(joint: FigureJoint): FigureJoint {\n return {\n id: joint.id,\n type: 'fixed',\n body0: joint.body0,\n body1: joint.body1,\n ...(joint.origin ? { origin: joint.origin } : {}),\n ...(joint.repeat ? { repeat: joint.repeat } : {})\n } as FigureJoint\n}\n"]}
1
+ {"version":3,"file":"links.js","sourceRoot":"","sources":["../../client/modeller/links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,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C;AAED,MAAM,UAAU,YAAY,CAAC,CAAkB,EAAE,CAAkB;IACjE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;AACpH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAkB;IACjD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,aAAa,CAAC,CAAA;AAC/D,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnC,CAAA;AAClB,CAAC","sourcesContent":["import { FIGURE_FACES, figureShapeFaces, figurePartsExtentOf, compileFigureAsset, compileFigureGraph, figureFollowOf, proposeFigureProportion, defaultInstanceSizeRange, foldInstanceSizeRange, figureAttachmentsOf, figureBindingsOf, figureInstanceSizeLimitsOf, figureFollowableAxesOf, figureShapeProviderOf } from '@hatiolab/figure-model'\nimport type { FigureFollow, FigureSizeRange } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureBindingPlace, FigureFace, FigureJoint } from '@hatiolab/figure-model'\nimport { startingShapeKindOf } from './starting-shape.js'\n\n/*\n * What a part is tied to — the readers behind the parts' size response, fastening and motion sections. Kept apart from the element so they can be tested without a browser.\n */\n\nexport type Axis = 'x' | 'y' | 'z'\nexport const AXES: readonly Axis[] = ['x', 'y', 'z']\n\ninterface Node {\n id: string\n op: string\n args: string[]\n outputs: Record<string, string>\n}\nconst modelOf = (asset: FigureAsset) =>\n asset.document.model as unknown as { nodes: Node[]; inputs: Array<{ id: string; role?: string; unit?: string; min?: number; max?: number }>; constants: Array<{ id: string; value: number }> }\n\n/** What one dimension of a part is worked out from (figure-model's `FigureFollow`). */\nexport type Follow = FigureFollow\n\n/**\n * `link-dimension` routes a part's dimension through `<part>.dimension.<axis>` and points its first argument at the\n * source, directly or through the nodes that scale it. Walking back through those nodes finds the source: the\n * instance size (`size.<axis>`), another part's dimension (`<part>.dimension.<axis>.value`) or a declared input.\n */\n/** What one measure of a part is worked out from, read back from the graph (figure-model's reader, one copy). */\nexport function followOf(asset: FigureAsset, part: string, axis: Axis): Follow {\n return figureFollowOf(asset, part, axis)\n}\n\n/** Whether the asset declares an instance size on an axis — only then can a dimension follow it. */\nexport const hasInstanceSize = (asset: FigureAsset, axis: Axis) => modelOf(asset).inputs.some(i => i.id === `size.${axis}` && i.role === 'design')\n\n/** The part this one is fastened to, or `null`. The mounting plane counts as fastened (the model names no part). */\nexport function fastenedTo(asset: FigureAsset, part: string): string | null {\n return figureAttachmentsOf(asset)[part] ?? null\n}\n\n/**\n * What holds a part: the part it is fastened to, the plane the figure is mounted on, or nothing. The joint record says\n * it; a part standing on the plane had read as fastened to nothing, so the form offered no way to move it and sent\n * no replace -- the fastening was refused as already made (the door's post, 2026-09-25).\n */\nexport function heldBy(asset: FigureAsset, part: string): { part: string } | { plane: true } | null {\n const record = asset.joints?.find(j => j.body1.part === part)\n if (record) return 'plane' in record.body0 ? { plane: true } : { part: record.body0.part }\n const to = fastenedTo(asset, part)\n return to ? { part: to } : null\n}\n\n/** Whether a dimension of this part can follow something — box-shaped, whose three sizes are X, Y and Z. */\nexport function canFollow(asset: FigureAsset, part: string): boolean {\n return followableAxes(asset, part).length > 0\n}\n\n/**\n * The axes whose size can follow something: figure-model's one list (`figureFollowableAxesOf`), which follow-size and\n * the resize plan ask too -- the screen does not keep a list of its own (designer 2026-09-27).\n */\nexport function followableAxes(asset: FigureAsset, part: string): Axis[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return shape ? figureFollowableAxesOf(shape as never) : []\n}\n\n/**\n * The directions \"follow the size, attached\" passes to figure-model (designer 2026-09-27):\n * - `chosen`: what the author ticked, and the ones already following, which stay;\n * - `suggested`: a part the author has not chosen for yet and that follows nothing -- every direction, said as\n * \"all three\" on the button, never as a choice the author made;\n * - `none`: the author set every direction back to fixed, or unticked them all -- nothing is taken for all.\n * `pending` is the author's ticks for this part in this screen, when they have ticked or fixed anything.\n */\nexport function resizeAxesOf(asset: FigureAsset, part: string, pending?: readonly Axis[]): { axes: Axis[]; basis: 'chosen' | 'suggested' | 'none' } {\n const editable = followableAxes(asset, part)\n const following = editable.filter(axis => {\n const now = followOf(asset, part, axis)\n return now.of === 'instance' && now.axis === axis\n })\n if (pending) {\n const axes = editable.filter(axis => pending.includes(axis) || following.includes(axis))\n return { axes, basis: axes.length ? 'chosen' : 'none' }\n }\n if (following.length) return { axes: following, basis: 'chosen' }\n return { axes: editable, basis: editable.length ? 'suggested' : 'none' }\n}\n\n/**\n * Korean particles for a word the sentence is built around: the topic (은/는) and \"and/with\" (과/와), by whether the\n * word's last syllable ends in a consonant. Other languages need none.\n */\nexport function particlesOf(word: string, lang: string): { topic: string; with: string } {\n if (!lang.startsWith('ko')) return { topic: word, with: word }\n const last = word.trim().slice(-1).charCodeAt(0)\n const closed = last >= 0xac00 && last <= 0xd7a3 && (last - 0xac00) % 28 !== 0\n return { topic: word + (closed ? '은' : '는'), with: word + (closed ? '과' : '와') }\n}\n\n/**\n * The selected part at the head of its panel: what it is, and -- only when a measure changes by itself -- what it\n * follows, as a sentence a person reads without knowing the model's words: the model's size, a share of it, another\n * part's measure, a field, a calculation (`figureFollowOf`). A size of its own and a part fastened or not say nothing\n * here; the fastening is drawn in its own section (user 2026-10-01: 「규칙을 따름: 높이 (Y)」 -- \"who would know what that\n * means?\", and \"why say anything when all is as usual?\").\n */\nexport function partSummaryOf(\n asset: FigureAsset,\n part: string,\n say: (key: string, params?: Record<string, string>) => string,\n lang = 'ko'\n): { kind: string; size: string } {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const named = startingShapeKindOf(shape as never)\n const kind = named ? say(`figure.label.primitive-${named}`) : ''\n const editable = followableAxes(asset, part)\n const round = editable.length === 2\n const word = (axis: Axis) => say(round && axis === 'x' ? 'figure.label.measure-diameter' : `figure.label.measure-${axis}`)\n const pct = (times: number) => String(Math.round(times * 1000) / 10)\n /* One sentence per way of following; the measures that follow the same way are said together. */\n const lines = new Map<string, { key: string; params: Record<string, string>; axes: Axis[] }>()\n for (const axis of editable) {\n const f = followOf(asset, part, axis)\n let key: string\n let params: Record<string, string> = {}\n if (f.of === 'own') continue\n if (f.of === 'instance') {\n key = f.times === 1 ? 'figure.text.summary-size-follows' : 'figure.text.summary-size-share'\n params = { pct: pct(f.times), whole: say(`figure.label.measure-${f.axis}`) }\n if (f.plus) (key = key + '-plus'), (params.plus = String(f.plus))\n } else if (f.of === 'part') {\n const other = say(`figure.label.measure-${f.axis}`)\n key = (f.times ?? 1) === 1 ? 'figure.text.summary-size-part' : 'figure.text.summary-size-part-share'\n params = { other: f.part, measure: particlesOf(other, lang).with, measureWord: other, pct: pct(f.times ?? 1) }\n if (f.plus) (key = key + '-plus'), (params.plus = String(f.plus))\n } else if (f.of === 'input') {\n key = 'figure.text.summary-size-input'\n params = { field: fieldWordsOf(f.input, k => say(k)) }\n } else key = 'figure.text.summary-size-worked-out'\n const id = key + JSON.stringify(params)\n lines.set(id, { key, params, axes: [...(lines.get(id)?.axes ?? []), axis] })\n }\n /* Nothing to say when the size is its own: only a measure that changes by itself is news (user 2026-10-01). */\n const size = [...lines.values()].map(l => say(l.key, { ...l.params, axes: particlesOf(l.axes.map(word).join(' · '), lang).topic })).join(' ')\n return { kind, size }\n}\n\n/**\n * A part's own field in the words its row uses -- 「위치 Y」, 「크기 X」, and the turn as one 「회전」 -- so a field the plan\n * replaces, or one only the room reads, is named as the author knows it, not by its id.\n */\nexport function fieldWordsOf(id: string, say: (key: string) => string): string {\n const own = /\\.(position|rotation|size)\\.([xyz])$/.exec(id)\n if (!own) return id\n return own[1] === 'rotation' ? say('figure.label.group-rotation') : `${say(`figure.label.group-${own[1]}`)} ${own[2]!.toUpperCase()}`\n}\n\n/** What a part's own measure on an axis is now (a box's side, a cylinder's radius or length), at the design as it stands. */\nexport function dimensionNow(asset: FigureAsset, part: string, axis: Axis): number | undefined {\n const m = modelOf(asset)\n /* The argument the shape names for this axis (figure-model's provider), not its place among the arguments. */\n const shape = m.nodes.find(n => n.id === `${part}.shape`)\n const edit = shape && figureShapeProviderOf(shape as never)?.edit[axis]\n const ref = edit && !('refused' in edit) ? shape!.args[edit.arg] : undefined\n if (!ref) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[ref]\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * How long a part is along one axis now, as it is drawn: the shape's own measure through figure-model's provider (a\n * cylinder's width is twice its radius), read after any rule it follows -- so a linked measure still says its size.\n */\nexport function measureNow(asset: FigureAsset, part: string, axis: Axis): number | undefined {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const edit = shape && figureShapeProviderOf(shape as never)?.edit[axis]\n if (!shape || !edit || 'refused' in edit) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[shape.args[edit.arg]!]\n return typeof value === 'number' && Number.isFinite(value) ? value * edit.k : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * The flat faces a part's shape declares, by name -- figure-model's shape definitions are the one place they are\n * written (a portal's opening sides as well as its outer faces). A sphere has none.\n */\nexport function facesOf(asset: FigureAsset, part: string): string[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return inScreenOrder(Object.keys((shape && figureShapeFaces(shape as never)) ?? {}))\n}\n\n/** Faces in the order the screen lists them: the six outer ones left to front, then the rest as the shape gives them. */\nconst SCREEN_ORDER = ['left', 'right', 'bottom', 'top', 'back', 'front']\nfunction inScreenOrder(names: string[]): string[] {\n const rank = (n: string) => (SCREEN_ORDER.includes(n) ? SCREEN_ORDER.indexOf(n) : SCREEN_ORDER.length)\n return names.map((n, i) => [n, i] as const).sort((a, b) => rank(a[0]) - rank(b[0]) || a[1] - b[1]).map(([n]) => n)\n}\n\n/** The axis a face of a part faces along, from the same definitions. */\nexport function faceAxisOf(asset: FigureAsset, part: string, face: string): Axis | undefined {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n return (shape && figureShapeFaces(shape as never)?.[face]?.axis) as Axis | undefined\n}\n\n/** Whether `attach` can take this part: any part whose shape has a flat face. */\nexport function canFasten(asset: FigureAsset, part: string): boolean {\n return facesOf(asset, part).length > 0\n}\n\nconst OUTER: Record<Axis, [string, string]> = { x: ['left', 'right'], y: ['bottom', 'top'], z: ['back', 'front'] }\n\n/**\n * The axes a part can be made a row along (r3 §8, figure-model `make-repeat`): across the face it is fastened by, when\n * it is fastened fixed to another part and holds nothing. None for a part that is loose, moves, stands on the floor or\n * already repeats -- the command would refuse those, so they are not offered.\n */\nexport function rowAxesOf(asset: FigureAsset, part: string): Axis[] {\n const joints = asset.joints ?? []\n const j = joints.find(o => o.body1.part === part)\n /* A part that moves may be a row too: every copy on the one control, from its own place (designer 2026-09-27). */\n if (!j || j.repeat || !('part' in j.body0)) return []\n if (joints.some(o => 'part' in o.body0 && o.body0.part === part)) return []\n return AXES.filter(axis => axis !== FIGURE_FACES[j.body1.face])\n}\n\n/**\n * Why a part cannot be made into a row here, in the terms `rowAxesOf` refuses it: said, not hidden (ADR-0097 §5.5).\n * Nothing when it can, or when it already is a row (that row is shown where it stands).\n */\nexport function rowBlockOf(asset: FigureAsset, part: string): 'unfastened' | 'on-plane' | 'holds-parts' | undefined {\n const joints = asset.joints ?? []\n const j = joints.find(o => o.body1.part === part)\n if (!j) return 'unfastened'\n if (j.repeat) return undefined\n if (!('part' in j.body0)) return 'on-plane'\n if (joints.some(o => 'part' in o.body0 && o.body0.part === part)) return 'holds-parts'\n return undefined\n}\n\n/** The row a part is made into, as its fastening's record keeps it. */\nexport const rowOf = (asset: FigureAsset, part: string) => asset.joints?.find(o => o.body1.part === part)?.repeat\n\n/** Where a part sits across the face it is fastened to, on one axis: centred, level with an edge, or a distance off centre. */\n/** `share`: the distance as a share of the figure's size on that axis, so it keeps its place when the figure is resized. */\n/** `input`: the place across the face follows one of the part's position fields -- as \"follow size, attached\" keeps it (ADR-0097). */\nexport type Alignment = 'centre' | 'min' | 'max' | 'mm' | 'share' | 'input'\n\n/**\n * The axes across the face a part is fastened to — the two a fastening does not set by itself. Edges to line up with\n * are offered where both parts have their two outer faces on that axis; the plane the figure is mounted on has none,\n * so on it (X and Z) only centred or a distance is offered.\n */\n/**\n * The mounting plane of this figure, by its placement (ADR-0093): the floor or the ceiling is Y = 0 and a part stands\n * on it by its bottom or hangs from it by its top; a wall is Z = 0 and a part is fastened to it by its back.\n */\nexport function mountingPlaneOf(asset: FigureAsset): { normal: Axis; faces: FigureFace[] } {\n return asset.placement === 'wall' ? { normal: 'z', faces: ['back'] } : { normal: 'y', faces: ['bottom', 'top'] }\n}\n\nexport function alignAxesOf(asset: FigureAsset, part: string, target: { part: string; face: string } | 'plane', twisted = false): { axis: Axis; edges: boolean }[] {\n /* The plane has no edges, but a figure that declares its size has sides on it (figure-model 0.1.64). */\n if (target === 'plane') {\n const { normal } = mountingPlaneOf(asset)\n return AXES.filter(axis => axis !== normal).map(axis => ({ axis, edges: !twisted && hasInstanceSize(asset, axis) }))\n }\n const along = faceAxisOf(asset, target.part, target.face)\n if (!along) return []\n const theirs = new Set(facesOf(asset, target.part)),\n mine = new Set(facesOf(asset, part))\n /* A part twisted about the face's normal has no side level with the target's edges. */\n return AXES.filter(axis => axis !== along).map(axis => ({ axis, edges: !twisted && OUTER[axis].every(f => theirs.has(f) && mine.has(f)) }))\n}\n\n/** The controls a part's showing can follow: the figure's state inputs, with their range and label. */\nexport function visibilityControlsOf(asset: FigureAsset): Array<{ id: string; unit: string; min: number; max: number; label: string }> {\n const labels = (asset as unknown as { stateInputs?: Record<string, { label?: string }> }).stateInputs ?? {}\n return modelOf(asset)\n .inputs.filter(input => input.role === 'state')\n .map(input => ({ id: input.id, unit: input.unit ?? '', min: input.min ?? 0, max: input.max ?? 1, label: labels[input.id]?.label || input.id }))\n}\n\n/** When the part is drawn (figure-model `set-visibility`): always (null), or while a control is at least a value. */\nexport function shownWhenOf(asset: FigureAsset, part: string): { input: string; atLeast: number } | null {\n const look = asset.appearance.find(one => one.target === part) as { visibility?: string } | undefined\n if (!look?.visibility) return null\n const m = modelOf(asset)\n const node = m.nodes.find(n => n.op === 'at-least@1' && Object.values(n.outputs).includes(look.visibility!))\n const at = node && m.constants.find(c => c.id === node.args[1])\n return node && at ? { input: node.args[0]!, atLeast: at.value } : null\n}\n\n/** Whether `part` hangs from `from`, through any number of fastenings. */\nexport function hangsFrom(asset: FigureAsset, part: string, from: string): boolean {\n const seen = new Set<string>()\n for (let at: string | undefined = part; at && !seen.has(at); ) {\n seen.add(at)\n const j = ((asset.joints ?? []) as FigureJoint[]).find(o => o.body1.part === at)\n at = j && 'part' in j.body0 ? (j.body0 as { part: string }).part : undefined\n if (at === from) return true\n }\n return false\n}\n\n/**\n * The fastening a part has, as the fastening form holds it -- so the form opens on what is there (the face, including\n * \\`centre\\`, the target and its face, the gap, the twist and where across the face) and a change is a change to that.\n * Opening it on the defaults showed a roller fastened by its centre as fastened by its bottom, and fastening again\n * from there broke its turning in place (walk 1, 2026-09-26). Null for a part fastened to nothing.\n */\nexport function fasteningOf(\n asset: FigureAsset,\n part: string\n): {\n face: string\n toPlane: boolean\n target: string\n targetFace: string\n facing: 'meet' | 'flush'\n gap: number\n twist: number\n align: Partial<Record<Axis, Alignment>>\n alignMm: Partial<Record<Axis, number>>\n} | null {\n const record = asset.joints?.find(j => j.body1.part === part)\n if (!record) return null\n const toPlane = 'plane' in record.body0\n const target = 'part' in record.body0 ? record.body0.part : ''\n const targetFace = 'part' in record.body0 ? record.body0.face : 'top'\n const twist = record.origin?.twist ?? 0\n /* Where across the face: as the record says it, and where it says nothing, where the part stands now. */\n const kept = placeKeptOf(asset, part, toPlane ? 'plane' : { part: target, face: targetFace }, !!twist)\n for (const [axis, how] of Object.entries(record.origin?.align ?? {}) as Array<[Axis, unknown]>) {\n if (how === 'min' || how === 'max' || how === 'centre') {\n kept.align[axis] = how\n delete kept.alignMm[axis]\n } else if (how && typeof how === 'object' && typeof (how as { mm?: unknown }).mm === 'number') {\n kept.align[axis] = 'mm'\n kept.alignMm[axis] = (how as { mm: number }).mm\n } else if ((how as { mm?: { from?: { of?: string; input?: string } } })?.mm?.from?.of === 'input') {\n /* Following a position field: read as that, so fastening again keeps the field and does not fix its number. */\n kept.align[axis] = 'input'\n kept.alignInput[axis] = (how as { mm: { from: { input: string } } }).mm.from.input\n delete kept.alignMm[axis]\n }\n }\n const gap = record.origin?.gap\n return {\n face: record.body1.face,\n toPlane,\n target,\n targetFace,\n facing: record.origin?.facing ?? 'meet',\n gap: typeof gap === 'number' ? gap : 0,\n twist,\n ...kept\n }\n}\n\n/**\n * The alignment that keeps the part where it stands when it is fastened: on each axis across the face, its distance\n * from the target's centre (the plane's is the origin). Fastening used to centre it -- a door set 100 mm in front of\n * its frame slid into it (2026-09-26). Left centred where it already is, and where the target stands turned.\n */\nexport function placeKeptOf(\n asset: FigureAsset,\n part: string,\n target: { part: string; face: string } | 'plane',\n twisted = false\n): { align: Partial<Record<Axis, Alignment>>; alignMm: Partial<Record<Axis, number>>; alignInput: Partial<Record<Axis, string>> } {\n const kept = { align: {} as Partial<Record<Axis, Alignment>>, alignMm: {} as Partial<Record<Axis, number>>, alignInput: {} as Partial<Record<Axis, string>> }\n let geometry\n try {\n geometry = compileFigureAsset(asset).evaluate().geometry as unknown as Array<{ id: string; pose?: { r: number[][]; t: number[] } }>\n } catch {\n return kept\n }\n const poseOf = (id: string) => geometry.find(g => g.id === id)?.pose\n const mine = poseOf(part)\n if (!mine) return kept\n let centre = [0, 0, 0]\n if (target !== 'plane') {\n const theirs = poseOf(target.part)\n const upright = theirs?.r.every((row, i) => row.every((v, j) => Math.abs(v - (i === j ? 1 : 0)) < 1e-9))\n if (!theirs || !upright) return kept\n centre = theirs.t\n }\n for (const { axis } of alignAxesOf(asset, part, target, twisted)) {\n const k = AXES.indexOf(axis)\n const off = Math.round((mine.t[k]! - centre[k]!) * 10) / 10\n if (Math.abs(off) < 0.5) continue\n kept.align[axis] = 'mm'\n kept.alignMm[axis] = off\n }\n return kept\n}\n\n/** The `align` of an attach command from the form's choices: only the axes across that face, and centred ones left out. */\nexport function alignOf(\n asset: FigureAsset,\n part: string,\n target: { part: string; face: string } | 'plane',\n how: Partial<Record<Axis, Alignment>>,\n mm: Partial<Record<Axis, number>>,\n twisted = false,\n inputs: Partial<Record<Axis, string>> = {}\n) {\n const align: Partial<Record<Axis, 'min' | 'max' | { mm: number | { from: { of: 'instance'; axis: Axis }; times: number } | { from: { of: 'input'; input: string } } }>> = {}\n for (const { axis, edges } of alignAxesOf(asset, part, target, twisted)) {\n const one = how[axis] ?? 'centre'\n const size = asset.designInputs[`size.${axis}`]\n if (one === 'share' && mm[axis] && hasInstanceSize(asset, axis) && size)\n align[axis] = { mm: { from: { of: 'instance', axis }, times: Math.round((mm[axis]! / size) * 1e6) / 1e6 } }\n else if (one === 'mm' && mm[axis]) align[axis] = { mm: mm[axis]! }\n else if ((one === 'min' || one === 'max') && edges) align[axis] = one\n else if (one === 'input' && inputs[axis]) align[axis] = { mm: { from: { of: 'input', input: inputs[axis]! } } }\n }\n return Object.keys(align).length ? align : undefined\n}\n\n/**\n * The axes on which the part's position is worked out from other values rather than being its own number. `fix-position` makes one its own number where it is now.\n */\nexport function positionsWorkedOut(asset: FigureAsset, part: string): Axis[] {\n const m = modelOf(asset)\n const pose = m.nodes.find(n => n.id === `${part}.pose`)\n if (!pose || pose.op !== 'rigid@1' || fastenedTo(asset, part)) return []\n const own = (ref: string) => ref.startsWith(`${part}.`) && m.inputs.some(i => i.id === ref && i.role === 'design')\n const constant = (ref: string) => m.constants.some(c => c.id === ref)\n return AXES.filter((_axis, i) => !own(pose.args[i]!) && !constant(pose.args[i]!))\n}\n\n/**\n * Whether the part's position on an axis is a share of the instance size (`scale-position`): `size.<axis> × share`.\n * Such a position is worked out too, but it already grows with the figure, so it is not offered again.\n */\nexport function positionIsShare(asset: FigureAsset, part: string, axis: Axis): boolean {\n const m = modelOf(asset)\n const ref = m.nodes.find(n => n.id === `${part}.pose`)?.args[AXES.indexOf(axis)]\n const writer = ref ? m.nodes.find(n => Object.values(n.outputs).includes(ref)) : undefined\n return !!writer && writer.op === 'mul@1' && writer.args[0] === `size.${axis}` && m.constants.some(c => c.id === writer.args[1])\n}\n\n/** How a part moves, if it does: slide or turn, along which axis, driven by which control. */\nexport interface Motion {\n kind: 'slide' | 'turn' | 'continuous'\n axis: Axis | '?'\n control?: { id: string; unit?: string; min?: number; max?: number }\n /** A joint that moves with another (URDF's mimic): the leader's value times `multiplier`, plus `offset`. */\n follows?: { joint: string; multiplier: number; offset?: number }\n /** A slide whose distance is a part's length (plus a difference): the control is its share. */\n travel?: { part: string; axis: string; plus?: number }\n}\n\nexport function motionOf(asset: FigureAsset, part: string): Motion | undefined {\n const m = modelOf(asset)\n const node = m.nodes.find(n => n.id === `${part}.motion`)\n if (!node) return undefined\n const record = asset.joints?.find(j => j.body1.part === part)\n const endless = record?.type === 'revolute' && record.lowerLimit === undefined && record.upperLimit === undefined\n const kind = endless ? 'continuous' : node.op === 'axis-turn@1' ? 'turn' : 'slide'\n const unit = node.args.slice(0, 3).map(ref => m.constants.find(c => c.id === ref)?.value)\n const axis = AXES[unit.findIndex(v => v !== undefined && v !== 0)] ?? '?'\n /* The quantity is the fourth argument, a state input directly or through the nodes that scale it. */\n const quantity = node.args[3]\n const seen = new Set<string>()\n const control = (ref?: string): Motion['control'] => {\n if (!ref || seen.has(ref)) return undefined\n seen.add(ref)\n const input = m.inputs.find(i => i.id === ref && i.role === 'state')\n if (input) return { id: input.id, unit: input.unit, min: input.min, max: input.max }\n const writer = m.nodes.find(n => Object.values(n.outputs).includes(ref))\n for (const arg of writer?.args ?? []) {\n const found = control(arg)\n if (found) return found\n }\n return undefined\n }\n const travel = record?.travel?.source && 'part' in record.travel.source ? { part: record.travel.source.part, axis: record.travel.source.axis, ...(record.travel.plus ? { plus: record.travel.plus } : {}) } : undefined\n return { kind, axis, control: control(quantity), ...(record?.mimic ? { follows: record.mimic } : {}), ...(travel ? { travel } : {}) }\n}\n\n/** What the motion form holds: how the part moves, and either its own control or the joint it moves with. */\nexport interface MotionForm {\n kind: 'slide' | 'turn' | 'continuous'\n axis: Axis\n id: string\n min: number\n max: number\n /** The joint this one moves with; empty for a joint with its own control. */\n follow: string\n multiplier: number\n offset: number\n /**\n * A slide whose distance follows a part's length (figure-model `travel`): `<part>:<axis>`, empty for a distance in\n * millimetres. The control is then the share of that length, 0..1, and the stroke grows when the part does.\n */\n travel?: string\n travelPlus?: number\n}\n\n/**\n * The motion form filled from a joint as it is, so a motion can be changed where it is -- its range, the length it\n * travels by, what it follows -- rather than taken away and made again. Taking it away is refused while another joint\n * follows it, which left a leader's stroke fixed for good (the telescopic conveyor, 2026-09-25).\n */\nexport function motionFormOf(joint: FigureJoint): MotionForm {\n const kind: MotionForm['kind'] = joint.type === 'prismatic' ? 'slide' : joint.lowerLimit === undefined && joint.upperLimit === undefined && !joint.mimic ? 'continuous' : 'turn'\n const travel = joint.travel?.source && 'part' in joint.travel.source ? `${joint.travel.source.part}:${joint.travel.source.axis}` : ''\n return {\n kind,\n axis: (joint.axis ?? 'X').toLowerCase() as Axis,\n id: joint.state?.id ?? '',\n min: travel ? 0 : (joint.lowerLimit ?? (kind === 'slide' ? 0 : -90)),\n max: travel ? 500 : (joint.upperLimit ?? (kind === 'slide' ? 500 : 90)),\n follow: joint.mimic?.joint ?? '',\n multiplier: joint.mimic?.multiplier ?? 1,\n offset: joint.mimic?.offset ?? 0,\n travel,\n travelPlus: joint.travel?.plus ?? 0\n }\n}\n\n/**\n * The joints a part's joint can move with (URDF's mimic): a joint that moves the same way — a slide follows a slide, a\n * turn a turn — and has a control of its own, since a follower follows the joint that is driven.\n */\nexport function leadersFor(asset: FigureAsset, part: string, kind: MotionForm['kind']): FigureJoint[] {\n return (asset.joints ?? []).filter(j => j.body1.part !== part && j.type !== 'fixed' && !j.mimic && (j.type === 'prismatic') === (kind === 'slide'))\n}\n\n/**\n * The joint record the motion form writes for a part fastened by `joint`. A joint of its own gets its limits (none for\n * a turn without end, as in USD) and a control; a follower gets the leader, the multiplier and the offset, and no\n * control or limits of its own — its range is the leader's times the multiplier.\n */\nexport function motionJoint(joint: FigureJoint, m: MotionForm, part: string): FigureJoint {\n const moving = {\n id: joint.id,\n body0: joint.body0,\n body1: joint.body1,\n ...(joint.origin ? { origin: joint.origin } : {}),\n /* A row keeps being a row when it is given a motion: dropped here, the row went with it (designer 2026-09-27). */\n ...(joint.repeat ? { repeat: joint.repeat } : {}),\n type: m.kind === 'slide' ? ('prismatic' as const) : ('revolute' as const),\n axis: m.axis.toUpperCase() as 'X' | 'Y' | 'Z'\n }\n if (m.follow) return { ...moving, mimic: { joint: m.follow, multiplier: m.multiplier, ...(m.offset ? { offset: m.offset } : {}) } }\n if (m.kind === 'slide' && m.travel) {\n const [of, axis] = m.travel.split(':')\n return { ...moving, travel: { source: { of: 'part', part: of!, axis: axis as Axis }, ...(m.travelPlus ? { plus: m.travelPlus } : {}) }, state: { id: m.id || `${part}-${m.kind}` } }\n }\n return { ...moving, ...(m.kind === 'continuous' ? {} : { lowerLimit: m.min, upperLimit: m.max }), state: { id: m.id || `${part}-${m.kind}` } }\n}\n\n/** The select's value for what a dimension follows now. */\nexport function choiceOf(follow: Follow): string {\n switch (follow.of) {\n case 'own':\n return 'own'\n case 'instance':\n return follow.times === 1 ? `instance:${follow.axis}` : `share:${follow.axis}`\n case 'part':\n return `part:${follow.part}:${follow.axis}`\n case 'input':\n return `input:${follow.input}`\n case 'expression':\n return 'expression'\n }\n}\n\n/**\n * The faces a place can sit on for this part: its flat faces, but not a plane that only touches a curved side along a\n * line (a cylinder's side, Q3) -- nothing is held on a line. A sphere has none.\n */\nexport function placeFacesOf(asset: FigureAsset, part: string): FigureFace[] {\n const shape = modelOf(asset).nodes.find(n => n.id === `${part}.shape`)\n const faces = (shape && figureShapeFaces(shape as never)) ?? {}\n return inScreenOrder(Object.entries(faces).filter(([, f]) => !(f as { contact?: string }).contact).map(([name]) => name)) as FigureFace[]\n}\n\n/** The places things are held that sit on this part. */\nexport function placesOn(asset: FigureAsset, part: string): FigureBindingPlace[] {\n return figureBindingsOf(asset).filter(one => one.part === part)\n}\n\n/** An id for a new place on this part, not yet taken: `<part>-<role>`, then `-2`, `-3`. */\nexport function placeIdFor(asset: FigureAsset, part: string, role: 'seat' | 'grip'): string {\n const taken = new Set(asset.document.capabilities.bindings.map(b => b.id))\n const base = `${part}-${role}`\n if (!taken.has(base)) return base\n let n = 2\n while (taken.has(`${base}-${n}`)) n++\n return `${base}-${n}`\n}\n\n/**\n * Whether a board will hand this figure anything: a place is a slot only on a figure that declares it holds things\n * (`Capacity`, or `FlowNode`, which includes it). Without it the places are declared and nothing arrives.\n */\nexport const holdsThings = (asset: FigureAsset) => (asset.document.capabilities.names ?? []).some(n => n === 'Capacity' || n === 'FlowNode')\n\n/** What `accepts` a person typed: names split on commas, trimmed, blanks and repeats dropped. */\nexport const acceptsOf = (typed: string) => [...new Set(typed.split(',').map(one => one.trim()).filter(Boolean))]\n\n/**\n * The sizes a board may give this figure: the range it declares now, and the range measured afresh -- the default\n * (1 mm to ten times the authored size) narrowed only where the figure cannot follow, by figure-model's own functions.\n * A range measured when a part filled what the others left (ROBOT_ARM: Y from 1,854 mm) stays narrow after the part is\n * made to grow with the figure; measuring again gives the figure its whole range back. Nothing when no size is declared.\n */\nexport function instanceRangeOf(asset: FigureAsset): { declared: FigureSizeRange; measured: FigureSizeRange } | undefined {\n const inputs = modelOf(asset).inputs\n const declared = {} as FigureSizeRange\n const authored = {} as Record<Axis, number>\n for (const axis of AXES) {\n const input = inputs.find(i => i.id === `size.${axis}` && i.role === 'design')\n const at = asset.designInputs[`size.${axis}`]\n if (!input || typeof at !== 'number') return undefined\n declared[axis] = { min: input.min ?? 0, max: input.max ?? Infinity }\n authored[axis] = at\n }\n const start = defaultInstanceSizeRange(authored)\n const measured = foldInstanceSizeRange(start, figureInstanceSizeLimitsOf(asset, start)).range\n return { declared, measured }\n}\n\n/**\n * The size range to declare for a figure that has none yet: its parts' extent now as the size it is authored at, and\n * as wide as its parts allow around it (the same measure 「다시 재기」 uses). Undefined when the figure already has a\n * size or has nothing to measure. Without a declared size a board cannot resize the figure, and no part is offered\n * to follow its size -- every figure made in the modeller was left there (user, 2026-09-25).\n */\nexport function instanceRangeToDeclare(asset: FigureAsset): { range: FigureSizeRange; at: Record<Axis, number> } | undefined {\n if (instanceRangeOf(asset) || !asset.appearance.length) return undefined\n /* The parts as they rest -- not the room their joints swing them through, which declared a door 8208 mm every way. */\n const at = figurePartsExtentOf(asset) as Record<Axis, number>\n if (AXES.some(axis => !(at[axis] > 0))) return undefined\n const start = defaultInstanceSizeRange(at)\n return { range: foldInstanceSizeRange(start, figureInstanceSizeLimitsOf(asset, start)).range, at }\n}\n\n/** Whether measuring again would change the declared range (to a micrometre). */\n/**\n * The declared range with one end typed by the author: the sizes a figure may be placed at are a claim about the\n * product (a gantry spans metres, not 30 cm to 29 m), and measuring only ever widens them. Nothing when the typed\n * value is not a number; whether the figure holds there is the command's to say.\n */\nexport function rangeWith(declared: FigureSizeRange, axis: Axis, bound: 'min' | 'max', value: number): FigureSizeRange | undefined {\n if (!Number.isFinite(value)) return undefined\n const next = structuredClone(declared)\n next[axis][bound] = value\n return next\n}\n\n/**\n * For a figure that grows by one ratio: how many of its lengths would follow the ratio, and which it leaves with their\n * own number (not those that follow another length -- they grow with it). Nothing for a figure of another sizing.\n */\nexport function proportionToFollow(asset: FigureAsset): { count: number; kept: string[] } | undefined {\n if (asset.sizing !== 'uniform') return undefined\n try {\n const plan = proposeFigureProportion(asset)\n return { count: plan.dimensions.length + plan.lengths.length, kept: plan.skipped.filter(s => !s.follows).map(s => s.what) }\n } catch {\n return undefined\n }\n}\n\n/** A value of the figure as it stands, by its graph reference. */\nexport function valueNow(asset: FigureAsset, ref: string | undefined): number | undefined {\n if (!ref) return undefined\n try {\n const values = compileFigureGraph(asset.document.model as never).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values as Record<string, number>\n const value = values[ref]\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n } catch {\n return undefined\n }\n}\n\nexport function rangeDiffers(a: FigureSizeRange, b: FigureSizeRange): boolean {\n return AXES.some(axis => Math.abs(a[axis].min - b[axis].min) > 1e-3 || Math.abs(a[axis].max - b[axis].max) > 1e-3)\n}\n\n/**\n * Whether the figure is a mechanism -- a part turns about a joint. Such a figure should grow by one ratio (chief\n * architect's ruling 2026-09-24); the modeller proposes it, the author declares it.\n */\nexport function turnsAboutAJoint(asset: FigureAsset): boolean {\n return modelOf(asset).nodes.some(n => n.op === 'axis-turn@1')\n}\n\n/** The joint made still: its fastening, its place and its row kept, its motion gone. */\nexport function fixedJointOf(joint: FigureJoint): FigureJoint {\n return {\n id: joint.id,\n type: 'fixed',\n body0: joint.body0,\n body1: joint.body1,\n ...(joint.origin ? { origin: joint.origin } : {}),\n ...(joint.repeat ? { repeat: joint.repeat } : {})\n } as FigureJoint\n}\n"]}
@@ -8,7 +8,11 @@
8
8
  *
9
9
  * The vocabulary:
10
10
  * section one titled group; the side is a stack of them
11
- * h3 a group's title -- small capitals
11
+ * h3 a group's title
12
+ *
13
+ * Three sizes and two weights (user 2026-10-01, the panel checked for balance: eight sizes, and titles smaller than
14
+ * what they titled): a title at the body token and semibold, everything else at the small token, and a hint at the
15
+ * micro one. Sections are 16 px above their title and 12 px below their last line.
12
16
  * div[inline-field] a short label and its one field on one line
13
17
  * div[field] a label above a full-width field
14
18
  * div[form] short labels beside their fields, the fields starting on one line
@@ -9,7 +9,11 @@ import { css } from 'lit';
9
9
  *
10
10
  * The vocabulary:
11
11
  * section one titled group; the side is a stack of them
12
- * h3 a group's title -- small capitals
12
+ * h3 a group's title
13
+ *
14
+ * Three sizes and two weights (user 2026-10-01, the panel checked for balance: eight sizes, and titles smaller than
15
+ * what they titled): a title at the body token and semibold, everything else at the small token, and a hint at the
16
+ * micro one. Sections are 16 px above their title and 12 px below their last line.
13
17
  * div[inline-field] a short label and its one field on one line
14
18
  * div[field] a label above a full-width field
15
19
  * div[form] short labels beside their fields, the fields starting on one line
@@ -24,14 +28,14 @@ import { css } from 'lit';
24
28
  export const SidePanelStyles = css `
25
29
  :host {
26
30
  --figure-control-height: 30px;
27
- font-size: 0.76rem;
31
+ font-size: var(--ui-t-small, 11.5px);
28
32
  color: var(--md-sys-color-on-surface);
29
33
  }
30
34
  /* The side is a stack of sections, each a titled group. */
31
35
  section {
32
36
  display: grid;
33
- gap: 6px;
34
- padding: 8px 10px;
37
+ gap: 8px;
38
+ padding: 16px 12px 12px;
35
39
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
36
40
  }
37
41
  section > h3 {
@@ -47,18 +51,21 @@ export const SidePanelStyles = css `
47
51
  align-items: center;
48
52
  gap: 4px;
49
53
  margin: 14px 0 6px;
50
- font-size: var(--ui-t-micro, 11px);
51
- font-weight: 700;
52
- letter-spacing: 0.04em;
53
- text-transform: uppercase;
54
- color: var(--md-sys-color-on-surface-variant);
54
+ font-size: var(--ui-t-body, 13px);
55
+ font-weight: 600;
56
+ color: var(--md-sys-color-on-surface);
55
57
  }
56
58
  h3:first-child {
57
59
  margin-top: 0;
58
60
  }
61
+ /* Two weights only: a bold word in a line is the title's weight, not the browser's heavier one. */
62
+ b,
63
+ strong {
64
+ font-weight: 600;
65
+ }
59
66
  label,
60
67
  div[form] > span {
61
- font-size: 0.68rem;
68
+ font-size: inherit;
62
69
  color: var(--md-sys-color-on-surface-variant);
63
70
  }
64
71
  div[field] {
@@ -89,7 +96,7 @@ export const SidePanelStyles = css `
89
96
  }
90
97
  /* A value read, not edited, beside its label: the field's size and colour, not the page's. */
91
98
  div[inline-field] > span[value] {
92
- font-size: 0.76rem;
99
+ font-size: inherit;
93
100
  color: var(--md-sys-color-on-surface);
94
101
  }
95
102
  label span[unit] {
@@ -107,10 +114,9 @@ export const SidePanelStyles = css `
107
114
  gap: 4px;
108
115
  }
109
116
  div[tools] button {
110
- height: 28px;
117
+ height: var(--figure-control-height);
111
118
  padding: 0 10px;
112
119
  font: inherit;
113
- font-size: 0.78rem;
114
120
  color: var(--md-sys-color-on-surface);
115
121
  background: var(--md-sys-color-surface-container-lowest);
116
122
  border: 1px solid var(--md-sys-color-outline-variant);
@@ -145,16 +151,45 @@ export const SidePanelStyles = css `
145
151
  box-sizing: border-box;
146
152
  padding: 4px 7px;
147
153
  font: inherit;
148
- font-size: 0.76rem;
149
154
  color: var(--md-sys-color-on-surface);
150
155
  background-color: var(--md-sys-color-surface-container-lowest);
151
156
  border: 1px solid var(--md-sys-color-outline-variant);
152
157
  border-radius: 6px;
153
158
  }
159
+ /* The browser's own box and dot, in the panel's colour. */
154
160
  input[type='checkbox'],
155
161
  input[type='radio'] {
156
162
  width: auto;
157
163
  min-height: 0;
164
+ margin: 0;
165
+ accent-color: var(--md-sys-color-primary);
166
+ }
167
+ /* A fold: the panel's chevron, not the browser's triangle. */
168
+ summary {
169
+ display: flex;
170
+ align-items: center;
171
+ gap: 6px;
172
+ padding: 6px 0;
173
+ list-style: none;
174
+ cursor: pointer;
175
+ color: var(--md-sys-color-on-surface-variant);
176
+ }
177
+ summary::-webkit-details-marker {
178
+ display: none;
179
+ }
180
+ summary::before {
181
+ content: '';
182
+ flex: none;
183
+ width: 6px;
184
+ height: 6px;
185
+ margin: 0 2px;
186
+ border-right: 1.5px solid currentColor;
187
+ border-bottom: 1.5px solid currentColor;
188
+ transform: rotate(-45deg);
189
+ transition: transform 0.15s;
190
+ }
191
+ details[open] > summary::before {
192
+ transform: rotate(45deg);
158
193
  }
159
194
  /* A thin track and a small thumb: a slider is a line to drag along, not a block (user, 2026-09-24). */
160
195
  input[type='range'] {
@@ -238,7 +273,7 @@ export const SidePanelStyles = css `
238
273
  }
239
274
  div[cell] span[axis] {
240
275
  flex: none;
241
- font-size: 0.64rem;
276
+ font-size: var(--ui-t-micro, 11px);
242
277
  letter-spacing: 0.02em;
243
278
  color: var(--md-sys-color-on-surface-variant);
244
279
  }
@@ -271,7 +306,6 @@ export const SidePanelStyles = css `
271
306
  display: flex;
272
307
  align-items: center;
273
308
  gap: 6px;
274
- font-size: 0.76rem;
275
309
  color: var(--md-sys-color-on-surface);
276
310
  }
277
311
  /* The 「?」 beside a title: no border, it says there is more rather than asking to be pressed. */
@@ -298,42 +332,43 @@ export const SidePanelStyles = css `
298
332
  small {
299
333
  display: block;
300
334
  margin: 2px 0 4px;
301
- font-size: 0.68rem;
335
+ font-size: var(--ui-t-micro, 11px);
302
336
  line-height: 1.5;
303
337
  color: var(--md-sys-color-on-surface-variant);
304
338
  }
305
- p[hint] {
306
- padding-left: 6px;
307
- border-left: 2px solid var(--md-sys-color-outline-variant);
308
- }
339
+ /*
340
+ * An action under its fields: as wide as its words, not a band across the panel -- four full-width grey bars read as
341
+ * four walls and none of them as the one to press (user 2026-10-01). Every one carries its icon.
342
+ */
309
343
  button[act] {
310
344
  display: inline-flex;
311
345
  align-items: center;
312
346
  justify-content: center;
313
- gap: 4px;
314
- width: 100%;
347
+ justify-self: start;
348
+ gap: 6px;
349
+ width: auto;
350
+ max-width: 100%;
315
351
  margin-top: 4px;
316
- padding: 3px 8px;
317
- min-height: 28px;
352
+ padding: 0 12px;
353
+ min-height: var(--figure-control-height);
318
354
  font: inherit;
319
- font-size: 0.72rem;
320
- color: var(--md-sys-color-on-surface);
321
- background-color: var(--md-sys-color-surface-container);
355
+ color: var(--md-sys-color-primary);
356
+ background-color: var(--md-sys-color-surface-container-lowest);
322
357
  border: 1px solid var(--md-sys-color-outline-variant);
323
358
  border-radius: 6px;
324
359
  cursor: pointer;
325
360
  }
326
361
  button[act]:hover:not(:disabled) {
327
- background-color: var(--md-sys-color-surface-container-high);
362
+ background-color: var(--md-sys-color-primary-container);
328
363
  }
329
364
  button[act]:disabled {
330
365
  opacity: 0.5;
331
366
  cursor: default;
332
367
  }
333
368
  button[act] md-icon {
334
- font-size: 15px;
335
- width: 15px;
336
- height: 15px;
369
+ font-size: 16px;
370
+ width: 16px;
371
+ height: 16px;
337
372
  }
338
373
  `;
339
374
  //# sourceMappingURL=side-panel-styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"side-panel-styles.js","sourceRoot":"","sources":["../../client/modeller/side-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0TjC,CAAA","sourcesContent":["import { css } from 'lit'\n\n/**\n * The side panel's one look, for every element that draws in the modeller's side.\n *\n * The side is drawn by several elements (the type field, the figure's properties, a part's values, fastening, places,\n * motion, material, controls, clips, the environment) and each had styled its own fields: three label styles and\n * three field heights in one column (user, 2026-09-24: \"why are the styles and layout all different?\"). They share\n * this sheet now and keep only what is theirs.\n *\n * The vocabulary:\n * section one titled group; the side is a stack of them\n * h3 a group's title -- small capitals\n * div[inline-field] a short label and its one field on one line\n * div[field] a label above a full-width field\n * div[form] short labels beside their fields, the fields starting on one line\n * div[vector-row] a title, then X · Y · Z in one row of cells with the axis inside (`div[triple]` of\n * `div[cell]`) -- three values read together, as vector tools lay them out\n * div[pair] two controls side by side\n * label[toggle] a checkbox and its words\n * p[hint] · small the quiet line under a field\n * button[act] an action under the fields it acts on\n * [scrub] a label dragged sideways to scrub its field\n */\nexport const SidePanelStyles = css`\n :host {\n --figure-control-height: 30px;\n font-size: 0.76rem;\n color: var(--md-sys-color-on-surface);\n }\n /* The side is a stack of sections, each a titled group. */\n section {\n display: grid;\n gap: 6px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n section > h3 {\n margin: 0;\n }\n section div[field] + div[field],\n section div[inline-field] + div[inline-field],\n section div[vector-row] + div[vector-row] {\n margin-top: 0;\n }\n h3 {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 14px 0 6px;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--md-sys-color-on-surface-variant);\n }\n h3:first-child {\n margin-top: 0;\n }\n label,\n div[form] > span {\n font-size: 0.68rem;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[field] {\n display: grid;\n gap: 2px;\n }\n div[field] + div[field],\n div[field] + div[form],\n div[form] + div[field],\n div[vector-row] + div[vector-row],\n div[vector-row] + div[field],\n div[field] + div[vector-row] {\n margin-top: 5px;\n }\n div[form],\n div[inline-field],\n div[vector-row] {\n display: grid;\n grid-template-columns: 64px minmax(0, 1fr);\n align-items: center;\n gap: 5px 7px;\n }\n div[form] > span,\n div[inline-field] > label,\n div[vector-row] > label {\n overflow-wrap: anywhere;\n white-space: normal;\n }\n /* A value read, not edited, beside its label: the field's size and colour, not the page's. */\n div[inline-field] > span[value] {\n font-size: 0.76rem;\n color: var(--md-sys-color-on-surface);\n }\n label span[unit] {\n color: var(--md-sys-color-outline);\n }\n div[inline-field] + div[inline-field],\n div[inline-field] + div[vector-row],\n div[vector-row] + div[inline-field] {\n margin-top: 5px;\n }\n /* A row of worded tools (align, snap; mirror copies). */\n div[tools] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n div[tools] button {\n height: 28px;\n padding: 0 10px;\n font: inherit;\n font-size: 0.78rem;\n color: var(--md-sys-color-on-surface);\n background: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n div[tools] button:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container);\n }\n div[tools] button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n div[pair] {\n display: flex;\n gap: 4px;\n }\n div[pair] > * {\n flex: 1;\n min-width: 0;\n }\n div[triple] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 4px;\n }\n input,\n select {\n width: 100%;\n min-width: 0;\n min-height: var(--figure-control-height);\n box-sizing: border-box;\n padding: 4px 7px;\n font: inherit;\n font-size: 0.76rem;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n input[type='checkbox'],\n input[type='radio'] {\n width: auto;\n min-height: 0;\n }\n /* A thin track and a small thumb: a slider is a line to drag along, not a block (user, 2026-09-24). */\n input[type='range'] {\n -webkit-appearance: none;\n appearance: none;\n min-height: 16px;\n height: 16px;\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n input[type='range']::-webkit-slider-runnable-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 12px;\n height: 12px;\n margin-top: -4.5px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']::-moz-range-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']:focus {\n outline: none;\n }\n input[type='range']:focus-visible::-webkit-slider-thumb {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 2px;\n }\n input[type='color'] {\n padding: 2px;\n width: 40px;\n }\n input:focus,\n select:focus {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: -1px;\n }\n input:disabled,\n select:disabled {\n opacity: 0.6;\n }\n /* A number with its axis inside the cell, on the left. */\n div[cell] {\n display: flex;\n box-sizing: border-box;\n height: var(--figure-control-height);\n align-items: center;\n gap: 2px;\n padding-left: 6px;\n background-color: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n div[cell]:focus-within {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: -1px;\n border-color: transparent;\n }\n /* A label that scrubs its field when dragged sideways (vector tools' way). */\n [scrub] {\n cursor: ew-resize;\n user-select: none;\n touch-action: none;\n }\n div[cell] span[axis] {\n flex: none;\n font-size: 0.64rem;\n letter-spacing: 0.02em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[cell] input {\n min-height: 0;\n height: calc(var(--figure-control-height) - 2px);\n padding: 4px 6px 4px 2px;\n font-family: var(--mono-font, monospace);\n text-align: right;\n background: none;\n border: none;\n border-radius: 0;\n }\n div[cell] input:focus {\n outline: none;\n }\n /* An axis a rule sets: its number, read-only, on a quieter ground (ADR-0097). */\n div[cell][held] {\n background-color: var(--md-sys-color-surface-container);\n border-style: dashed;\n }\n div[cell][held] input {\n color: var(--md-sys-color-on-surface-variant);\n font-style: italic;\n }\n p[held-axes] {\n margin: 2px 0 6px;\n }\n label[toggle] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 0.76rem;\n color: var(--md-sys-color-on-surface);\n }\n /* The 「?」 beside a title: no border, it says there is more rather than asking to be pressed. */\n button[help] {\n display: inline-flex;\n align-items: center;\n padding: 0;\n margin: 0;\n color: var(--md-sys-color-outline);\n background: none;\n border: none;\n cursor: pointer;\n }\n button[help] md-icon {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n button[help]:hover,\n button[help][aria-expanded='true'] {\n color: var(--md-sys-color-primary);\n }\n p[hint],\n small {\n display: block;\n margin: 2px 0 4px;\n font-size: 0.68rem;\n line-height: 1.5;\n color: var(--md-sys-color-on-surface-variant);\n }\n p[hint] {\n padding-left: 6px;\n border-left: 2px solid var(--md-sys-color-outline-variant);\n }\n button[act] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n width: 100%;\n margin-top: 4px;\n padding: 3px 8px;\n min-height: 28px;\n font: inherit;\n font-size: 0.72rem;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface-container);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[act]:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container-high);\n }\n button[act]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[act] md-icon {\n font-size: 15px;\n width: 15px;\n height: 15px;\n }\n`\n"]}
1
+ {"version":3,"file":"side-panel-styles.js","sourceRoot":"","sources":["../../client/modeller/side-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyVjC,CAAA","sourcesContent":["import { css } from 'lit'\n\n/**\n * The side panel's one look, for every element that draws in the modeller's side.\n *\n * The side is drawn by several elements (the type field, the figure's properties, a part's values, fastening, places,\n * motion, material, controls, clips, the environment) and each had styled its own fields: three label styles and\n * three field heights in one column (user, 2026-09-24: \"why are the styles and layout all different?\"). They share\n * this sheet now and keep only what is theirs.\n *\n * The vocabulary:\n * section one titled group; the side is a stack of them\n * h3 a group's title\n *\n * Three sizes and two weights (user 2026-10-01, the panel checked for balance: eight sizes, and titles smaller than\n * what they titled): a title at the body token and semibold, everything else at the small token, and a hint at the\n * micro one. Sections are 16 px above their title and 12 px below their last line.\n * div[inline-field] a short label and its one field on one line\n * div[field] a label above a full-width field\n * div[form] short labels beside their fields, the fields starting on one line\n * div[vector-row] a title, then X · Y · Z in one row of cells with the axis inside (`div[triple]` of\n * `div[cell]`) -- three values read together, as vector tools lay them out\n * div[pair] two controls side by side\n * label[toggle] a checkbox and its words\n * p[hint] · small the quiet line under a field\n * button[act] an action under the fields it acts on\n * [scrub] a label dragged sideways to scrub its field\n */\nexport const SidePanelStyles = css`\n :host {\n --figure-control-height: 30px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-on-surface);\n }\n /* The side is a stack of sections, each a titled group. */\n section {\n display: grid;\n gap: 8px;\n padding: 16px 12px 12px;\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n section > h3 {\n margin: 0;\n }\n section div[field] + div[field],\n section div[inline-field] + div[inline-field],\n section div[vector-row] + div[vector-row] {\n margin-top: 0;\n }\n h3 {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 14px 0 6px;\n font-size: var(--ui-t-body, 13px);\n font-weight: 600;\n color: var(--md-sys-color-on-surface);\n }\n h3:first-child {\n margin-top: 0;\n }\n /* Two weights only: a bold word in a line is the title's weight, not the browser's heavier one. */\n b,\n strong {\n font-weight: 600;\n }\n label,\n div[form] > span {\n font-size: inherit;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[field] {\n display: grid;\n gap: 2px;\n }\n div[field] + div[field],\n div[field] + div[form],\n div[form] + div[field],\n div[vector-row] + div[vector-row],\n div[vector-row] + div[field],\n div[field] + div[vector-row] {\n margin-top: 5px;\n }\n div[form],\n div[inline-field],\n div[vector-row] {\n display: grid;\n grid-template-columns: 64px minmax(0, 1fr);\n align-items: center;\n gap: 5px 7px;\n }\n div[form] > span,\n div[inline-field] > label,\n div[vector-row] > label {\n overflow-wrap: anywhere;\n white-space: normal;\n }\n /* A value read, not edited, beside its label: the field's size and colour, not the page's. */\n div[inline-field] > span[value] {\n font-size: inherit;\n color: var(--md-sys-color-on-surface);\n }\n label span[unit] {\n color: var(--md-sys-color-outline);\n }\n div[inline-field] + div[inline-field],\n div[inline-field] + div[vector-row],\n div[vector-row] + div[inline-field] {\n margin-top: 5px;\n }\n /* A row of worded tools (align, snap; mirror copies). */\n div[tools] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n div[tools] button {\n height: var(--figure-control-height);\n padding: 0 10px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n div[tools] button:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container);\n }\n div[tools] button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n div[pair] {\n display: flex;\n gap: 4px;\n }\n div[pair] > * {\n flex: 1;\n min-width: 0;\n }\n div[triple] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 4px;\n }\n input,\n select {\n width: 100%;\n min-width: 0;\n min-height: var(--figure-control-height);\n box-sizing: border-box;\n padding: 4px 7px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n /* The browser's own box and dot, in the panel's colour. */\n input[type='checkbox'],\n input[type='radio'] {\n width: auto;\n min-height: 0;\n margin: 0;\n accent-color: var(--md-sys-color-primary);\n }\n /* A fold: the panel's chevron, not the browser's triangle. */\n summary {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 0;\n list-style: none;\n cursor: pointer;\n color: var(--md-sys-color-on-surface-variant);\n }\n summary::-webkit-details-marker {\n display: none;\n }\n summary::before {\n content: '';\n flex: none;\n width: 6px;\n height: 6px;\n margin: 0 2px;\n border-right: 1.5px solid currentColor;\n border-bottom: 1.5px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 0.15s;\n }\n details[open] > summary::before {\n transform: rotate(45deg);\n }\n /* A thin track and a small thumb: a slider is a line to drag along, not a block (user, 2026-09-24). */\n input[type='range'] {\n -webkit-appearance: none;\n appearance: none;\n min-height: 16px;\n height: 16px;\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n input[type='range']::-webkit-slider-runnable-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 12px;\n height: 12px;\n margin-top: -4.5px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']::-moz-range-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']:focus {\n outline: none;\n }\n input[type='range']:focus-visible::-webkit-slider-thumb {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 2px;\n }\n input[type='color'] {\n padding: 2px;\n width: 40px;\n }\n input:focus,\n select:focus {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: -1px;\n }\n input:disabled,\n select:disabled {\n opacity: 0.6;\n }\n /* A number with its axis inside the cell, on the left. */\n div[cell] {\n display: flex;\n box-sizing: border-box;\n height: var(--figure-control-height);\n align-items: center;\n gap: 2px;\n padding-left: 6px;\n background-color: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n div[cell]:focus-within {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: -1px;\n border-color: transparent;\n }\n /* A label that scrubs its field when dragged sideways (vector tools' way). */\n [scrub] {\n cursor: ew-resize;\n user-select: none;\n touch-action: none;\n }\n div[cell] span[axis] {\n flex: none;\n font-size: var(--ui-t-micro, 11px);\n letter-spacing: 0.02em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[cell] input {\n min-height: 0;\n height: calc(var(--figure-control-height) - 2px);\n padding: 4px 6px 4px 2px;\n font-family: var(--mono-font, monospace);\n text-align: right;\n background: none;\n border: none;\n border-radius: 0;\n }\n div[cell] input:focus {\n outline: none;\n }\n /* An axis a rule sets: its number, read-only, on a quieter ground (ADR-0097). */\n div[cell][held] {\n background-color: var(--md-sys-color-surface-container);\n border-style: dashed;\n }\n div[cell][held] input {\n color: var(--md-sys-color-on-surface-variant);\n font-style: italic;\n }\n p[held-axes] {\n margin: 2px 0 6px;\n }\n label[toggle] {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--md-sys-color-on-surface);\n }\n /* The 「?」 beside a title: no border, it says there is more rather than asking to be pressed. */\n button[help] {\n display: inline-flex;\n align-items: center;\n padding: 0;\n margin: 0;\n color: var(--md-sys-color-outline);\n background: none;\n border: none;\n cursor: pointer;\n }\n button[help] md-icon {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n button[help]:hover,\n button[help][aria-expanded='true'] {\n color: var(--md-sys-color-primary);\n }\n p[hint],\n small {\n display: block;\n margin: 2px 0 4px;\n font-size: var(--ui-t-micro, 11px);\n line-height: 1.5;\n color: var(--md-sys-color-on-surface-variant);\n }\n /*\n * An action under its fields: as wide as its words, not a band across the panel -- four full-width grey bars read as\n * four walls and none of them as the one to press (user 2026-10-01). Every one carries its icon.\n */\n button[act] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n justify-self: start;\n gap: 6px;\n width: auto;\n max-width: 100%;\n margin-top: 4px;\n padding: 0 12px;\n min-height: var(--figure-control-height);\n font: inherit;\n color: var(--md-sys-color-primary);\n background-color: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[act]:hover:not(:disabled) {\n background-color: var(--md-sys-color-primary-container);\n }\n button[act]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[act] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n`\n"]}