@things-factory/figure-ui 10.1.206 → 10.1.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/client/modeller/editor.ts +11 -97
  2. package/client/modeller/figure-facts.ts +1 -1
  3. package/client/modeller/figure-history-panel.ts +1 -29
  4. package/client/modeller/figure-preview.ts +5 -7
  5. package/client/modeller/figure-verdict.ts +2 -17
  6. package/client/modeller/maturity.ts +11 -27
  7. package/client/modeller/refusals.ts +1 -7
  8. package/client/pages/figure-modeller-page.ts +7 -22
  9. package/dist-client/modeller/editor.d.ts +1 -8
  10. package/dist-client/modeller/editor.js +12 -98
  11. package/dist-client/modeller/editor.js.map +1 -1
  12. package/dist-client/modeller/figure-facts.js +1 -1
  13. package/dist-client/modeller/figure-facts.js.map +1 -1
  14. package/dist-client/modeller/figure-fasten-dialog.d.ts +1 -1
  15. package/dist-client/modeller/figure-history-panel.d.ts +0 -16
  16. package/dist-client/modeller/figure-history-panel.js +1 -27
  17. package/dist-client/modeller/figure-history-panel.js.map +1 -1
  18. package/dist-client/modeller/figure-links.d.ts +1 -1
  19. package/dist-client/modeller/figure-preview.js +5 -8
  20. package/dist-client/modeller/figure-preview.js.map +1 -1
  21. package/dist-client/modeller/figure-verdict.d.ts +0 -5
  22. package/dist-client/modeller/figure-verdict.js +2 -21
  23. package/dist-client/modeller/figure-verdict.js.map +1 -1
  24. package/dist-client/modeller/maturity.d.ts +2 -4
  25. package/dist-client/modeller/maturity.js +12 -26
  26. package/dist-client/modeller/maturity.js.map +1 -1
  27. package/dist-client/modeller/refusals.d.ts +1 -3
  28. package/dist-client/modeller/refusals.js +1 -7
  29. package/dist-client/modeller/refusals.js.map +1 -1
  30. package/dist-client/pages/figure-modeller-page.d.ts +1 -3
  31. package/dist-client/pages/figure-modeller-page.js +7 -23
  32. package/dist-client/pages/figure-modeller-page.js.map +1 -1
  33. package/dist-client/route.d.ts +1 -1
  34. package/dist-client/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +6 -6
  36. package/test/browser/acceptance-page.js +3 -3
  37. package/test/browser/detail-page.js +1 -3
  38. package/test/browser/detail-tabs-page.js +1 -2
  39. package/test/browser/links.check.mjs +2 -37
  40. package/test/browser/modeller.check.mjs +1 -3
  41. package/test/browser/parts-page.js +2 -2
  42. package/test/browser/parts.check.mjs +2 -12
  43. package/test/browser/product-page.check.mjs +6 -9
  44. package/test/browser/product-page.js +1 -2
  45. package/test/browser/screen-page.js +2 -6
  46. package/test/browser/screen.check.mjs +8 -65
  47. package/test/first-minute.test.ts +2 -3
  48. package/test/fixtures/joint-column.json +1 -66
  49. package/test/fixtures/joint-roller.json +1 -66
  50. package/test/fixtures/robot-arm-6dof.json +2 -67
  51. package/test/links.test.ts +1 -1
  52. package/test/parts-wiring.test.ts +1 -1
  53. package/test/properties.test.ts +9 -12
  54. package/test/refusals.test.ts +3 -21
  55. package/test/resize-with-placement.test.ts +13 -15
  56. package/test/revision.test.ts +1 -2
  57. package/test/verdict.test.ts +1 -15
  58. package/translations/en.json +0 -19
  59. package/translations/es.json +0 -19
  60. package/translations/ja.json +0 -19
  61. package/translations/ko.json +0 -19
  62. package/translations/ms.json +0 -19
  63. package/translations/zh.json +0 -19
  64. package/client/modeller/occupancy.ts +0 -51
  65. package/dist-client/modeller/occupancy.d.ts +0 -31
  66. package/dist-client/modeller/occupancy.js +0 -36
  67. package/dist-client/modeller/occupancy.js.map +0 -1
  68. package/test/release-panel.test.ts +0 -53
@@ -1 +1 @@
1
- {"version":3,"file":"refusals.js","sourceRoot":"","sources":["../../client/modeller/refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,2BAA2B,EAA2E,MAAM,wBAAwB,CAAA;AAK7I,MAAM,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAE,KAA8C,EAAE,IAAI,CAAA;AACxF,sEAAsE;AACtE,SAAS,SAAS,CAAmB,KAAc,EAAE,MAAS;IA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,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;IAC5I,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,CAAC,CAAA;IAC5H,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,GAAG,CAAC,8BAA8B,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IACnI,OAAO,GAAG,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;AAChE,CAAC","sourcesContent":["/*\n * A command figure-model refused, in the author's words with the numbers and where to put it right -- not the kernel's\n * English (user, 2026-09-24: 「what is this warning message means?」). Kept apart from the element so it is tested\n * without a browser.\n *\n * Every sentence here is made from the refusal's `code` and `details` (ADR-0127), never from its message: the kernel's\n * English is for logs and readers of the kernel, and a screen that read it went quiet whenever a sentence changed or a\n * new one came under the same code (ADR-0054). A refusal with no details the screen knows is said with its code.\n */\nimport { FIGURE_INSTANCE_SIZE_INPUTS, type FigureClipLoss, type FigureRefusalDetails, type FigureSizeRangeFit } from '@hatiolab/figure-model'\n\ntype Say = (key: string, params: Record<string, string>) => string\ntype Reason = FigureRefusalDetails['reason']\n\nconst codeOf = (error: unknown) => (error as { code?: string } | null | undefined)?.code\n/** The refusal's details when they are of this reason, or nothing. */\nfunction detailsOf<R extends Reason>(error: unknown, reason: R): Extract<FigureRefusalDetails, { reason: R }> | undefined {\n const details = (error as { details?: FigureRefusalDetails } | null | undefined)?.details\n return details?.reason === reason ? (details as Extract<FigureRefusalDetails, { reason: R }>) : undefined\n}\nconst mmOf = (mm: number) => mm.toLocaleString(undefined, { maximumFractionDigits: 1 })\nconst numberOf = (value: number) => value.toLocaleString(undefined, { maximumFractionDigits: 3 })\n/** Bytes in KiB, rounded up: a figure a few bytes over its limit is not said to be at it. */\nconst kibOf = (bytes: number) => Math.ceil(bytes / 1024).toLocaleString()\n\n/**\n * The ends an author typed for the size on a drawing, refused: they leave out the size the figure is drawn at, or start\n * at zero. The only refusals the size range has left (ADR-0087 decision 6); nothing for any other refusal.\n */\nexport function sizeRangeRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INSTANCE_SIZE_RANGE') return null\n const outside = detailsOf(error, 'size-outside-range')\n if (outside)\n return say('figure.text.size-range-leaves-out-size', {\n axis: say(`figure.label.resize-${outside.axis}`, {}),\n range: `${mmOf(outside.min ?? 0)} – ${outside.max === undefined ? '∞' : mmOf(outside.max)}`,\n at: mmOf(outside.at)\n })\n const zero = detailsOf(error, 'size-min-not-positive')\n if (zero) return say('figure.text.size-range-from-zero', { axis: say(`figure.label.resize-${zero.axis}`, {}) })\n return null\n}\n\n/** What a command did to the ends the author typed, in one line each: what moved, from what to what. */\nexport function sizeRangeFitsOf(fits: readonly FigureSizeRangeFit[], say: Say): string {\n return fits\n .map(f => say(`figure.text.size-range-moved-${f.bound}`, { axis: say(`figure.label.resize-${f.axis}`, {}), from: mmOf(f.from), to: mmOf(f.to) }))\n .join(' ')\n}\n\n/**\n * A placement refused because a part is fastened to the mounting plane in a way the new plane does not take (standing\n * on the floor, when the figure is to hang on a wall), said in the author's words with the parts it names.\n */\nexport function placementRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'PLACEMENT_PLANE') return null\n const misfit = detailsOf(error, 'placement-face')\n if (!misfit) return null\n return say('figure.text.placement-plane-refused', { parts: misfit.parts.map(p => p.part).join(', ') })\n}\n\n/** A refusal carried on in a record (an AI proposal's outcome) in figure-model's own shape: its code and details. */\nexport interface FigureRefusalRecord {\n code?: string\n details?: FigureRefusalDetails\n}\n\n/** The record of a refusal: figure-model's code and details, copied as they are. */\nexport function refusalRecordOf(error: unknown): FigureRefusalRecord {\n const { details } = (error ?? {}) as FigureRefusalRecord\n return { code: codeOf(error), ...(details ? { details } : {}) }\n}\n\n/** The clips an edit would stop, as figure-model named them (CLIPS_DROPPED) -- the person is asked before any go; nothing for any other refusal. */\nexport function clipLossOf(error: unknown): FigureClipLoss[] | null {\n return codeOf(error) === 'CLIPS_DROPPED' ? (detailsOf(error, 'clips-dropped')?.clips ?? []) : null\n}\n\n/** A part refused because the declared room reads it -- the one refusal deleting it with the room refitted answers. */\nexport function inDeclaredRoom(error: unknown): boolean {\n return codeOf(error) === 'PART_REFERENCED' && !!detailsOf(error, 'in-declared-space')\n}\n\n/**\n * Why a part cannot be deleted, in the author's words. Since the chief architect's ruling of 2026-09-27 a part that\n * holds others, leads a motion or is followed goes, and what depended on it is let go of (`removalNoticeOf`); what is\n * left is the declared space (with a way on: fit it again) and a row -- one laid along the part, or hanging in its row.\n */\nexport function partRefusalOf(error: unknown, part: string, say: Say): string | null {\n const code = codeOf(error)\n if (code !== 'PART_REFERENCED' && code !== 'PART_ROW') return null\n if (detailsOf(error, 'in-declared-space')) return say('figure.text.part-in-declared-space', { part })\n const along = detailsOf(error, 'row-along')\n if (along) return say('figure.text.part-row-along', { part, rows: along.rows.join(', ') })\n const carried = detailsOf(error, 'hangs-in-row')\n if (carried) return say('figure.text.part-row-carries', { part, others: carried.parts.join(', ') })\n return say('figure.text.part-is-referenced', { part })\n}\n\n/** A part the gizmo cannot move because a joint or a fastening places it, named as the author knows it (`part`). */\nexport function placedRefusalOf(error: unknown, part: string, say: Say): string | null {\n if (codeOf(error) !== 'EDIT_TARGET') return null\n if (detailsOf(error, 'placed-by-joint')) return say('figure.text.gizmo-joint-places', { part })\n if (detailsOf(error, 'placed-by-fastening')) return say('figure.text.gizmo-fastening-places', { part })\n return null\n}\n\n/** A part name refused: not a name, already used, or another part is named under the part. The rule is the kernel's. */\nexport function partNameRefusalOf(error: unknown, say: Say): string | null {\n /* A new part named as one already is: the same sentence as a part renamed so. */\n const takenId = detailsOf(error, 'part-id-taken')\n if (takenId) return say('figure.text.part-name-taken', { name: takenId.part })\n if (codeOf(error) !== 'PART_ID') return null\n const invalid = detailsOf(error, 'name-invalid')\n if (invalid) return say('figure.text.part-name-invalid', { name: invalid.name })\n const taken = detailsOf(error, 'name-taken')\n if (taken) return say('figure.text.part-name-taken', { name: taken.name })\n const nested = detailsOf(error, 'name-has-nested')\n if (nested) return say('figure.text.part-name-has-nested', { nested: nested.nested })\n return null\n}\n\n/** What removing a part let go of (figure-model's `RemovalNotice`), said in one line, or nothing when it let go of nothing. */\nexport function removalNoticeOf(\n notice:\n | {\n released: Array<{ part: string; control?: string }>\n fixed: Array<{ part: string }>\n controls: Array<{ part: string; control: string; min: number; max: number }>\n mountingFace?: boolean\n bindings?: Array<{ id: string; label?: string }>\n }\n | undefined,\n say: Say\n): string | null {\n if (!notice) return null\n const lines: string[] = []\n const still = notice.released.filter(r => !r.control).map(r => r.part)\n if (still.length) lines.push(say('figure.text.removal-released', { parts: still.join(', ') }))\n for (const r of notice.released.filter(r => r.control)) lines.push(say('figure.text.removal-released-motion', { part: r.part, control: r.control! }))\n for (const c of notice.controls) lines.push(say('figure.text.removal-own-control', { part: c.part, control: c.control, min: numberOf(c.min), max: numberOf(c.max) }))\n const fixed = [...new Set(notice.fixed.map(f => f.part))]\n if (fixed.length) lines.push(say('figure.text.removal-fixed', { parts: fixed.join(', ') }))\n if (notice.bindings?.length) lines.push(say('figure.text.removal-bindings', { places: notice.bindings.map(b => b.label ?? b.id).join(', ') }))\n if (notice.mountingFace) lines.push(say('figure.text.removal-mounting-face', {}))\n return lines.length ? lines.join(' ') : null\n}\n\n/**\n * A recipe refused at one of its steps: which step, and why -- the particular sentence when there is one (a size\n * range, a value's range, a placement), otherwise the kernel's code. The step is the refusal's path, `steps[2]`: the\n * contract's path grammar, not its English (ADR-0127 decision 6).\n */\nexport function recipeRefusalOf(error: unknown, say: Say): string | null {\n const step = /^steps\\[(\\d+)\\]$/.exec((error as { path?: string })?.path ?? '')\n if (!step) return null\n const why = sizeRangeRefusalOf(error, say) ?? inputRangeRefusalOf(error, say) ?? placementRefusalOf(error, say)\n return say('figure.text.recipe-step-refused', { step: String(Number(step[1]) + 1), why: why ?? '', code: codeOf(error) ?? '' })\n}\n\n/**\n * A corner or an inside the part cannot take (ADR-0100 stage 1): what was too large or too thick, or what holds on\n * to what the edit would take away.\n */\nfunction sectionRefusalOf(error: unknown, say: Say): string | null {\n const mapping = detailsOf(error, 'faces-taken-away')\n if (mapping) return say('figure.text.section-face-in-use', { faces: mapping.lost.map(l => say('figure.label.face-' + l.face, {})).join(', ') })\n if (codeOf(error) === 'DIMENSION_LINKED') return say('figure.text.section-dimension-linked', {})\n if (detailsOf(error, 'section-invalid')?.issues.some(i => i.code === 'CORNER_TOO_LARGE')) return say('figure.text.section-corner-too-large', {})\n const inside = detailsOf(error, 'inside-invalid')?.refusal\n if (inside?.code === 'CAVITY' && inside.refused === 'NO_ROOM_INSIDE') return say('figure.text.section-wall-too-thick', {})\n if (inside?.code === 'CAVITY_NO_LENGTH') return say('figure.text.section-ends-too-thick', {})\n return null\n}\n\n/**\n * A slot layout refused (ADR-0118): the anchor, slot or value it was refused for. The layout's own findings are named\n * by where they are; the editor checks them before Apply, so they rarely reach here.\n */\nexport function slotLayoutRefusalOf(error: unknown, say: Say): string | null {\n if (detailsOf(error, 'slot-layout-label-missing')) return say('figure.text.slot-layout-label-missing', {})\n if (detailsOf(error, 'slot-anchors-missing')) return say('figure.text.slot-anchors-missing', {})\n const twice = detailsOf(error, 'slot-anchor-duplicate')\n if (twice) return say('figure.text.slot-anchor-duplicate', { anchor: twice.anchor })\n const flat = detailsOf(error, 'slot-anchor-not-flat')\n if (flat) return say('figure.text.slot-anchor-not-flat', { anchor: flat.anchor, part: flat.part })\n const gone = detailsOf(error, 'slot-anchor-no-part')\n if (gone) return say('figure.text.slot-anchor-no-part', { anchor: gone.anchor, part: gone.part })\n const issues = detailsOf(error, 'slot-layout-issues')\n if (issues) return say('figure.text.slot-layout-issues', { path: issues.issues[0]?.path ?? '' })\n const empty = detailsOf(error, 'slot-accepts-empty')\n if (empty) return say('figure.text.slot-accepts-empty', { slot: empty.slot })\n const taken = detailsOf(error, 'slot-id-taken')\n if (taken) return say('figure.text.slot-id-taken', { slot: taken.slot })\n return null\n}\n\n/** The figure's limits: its nodes, its size saved, how deep it nests. */\nfunction documentLimitRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'DOCUMENT_LIMIT') return null\n const nodes = detailsOf(error, 'node-limit')\n if (nodes) return say('figure.text.edit-refused-node-limit', { max: String(nodes.max) })\n const large = detailsOf(error, 'document-too-large')\n if (large)\n return large.at === undefined\n ? say('figure.text.document-too-large-unmeasured', { max: kibOf(large.max) })\n : say('figure.text.document-too-large', { max: kibOf(large.max), at: kibOf(large.at) })\n const deep = detailsOf(error, 'nesting-too-deep')\n if (deep) return say('figure.text.document-nesting-too-deep', { max: String(deep.max), at: String(deep.at) })\n return null\n}\n\n/**\n * A refusal in the author's words when the screen has words for it, otherwise said as a refusal with its code -- never\n * the kernel's English on the screen (the duplicate of a row's part showed 「EDIT_TARGET: … not a repeated template」,\n * 2026-09-27).\n */\n/** The modeller session's own refusals (`product-session.ts`), by their code. Nothing for any other refusal. */\nconst SESSION_REFUSALS: Record<string, string> = {\n SESSION_NOT_OPEN: 'figure.text.session-not-open',\n SESSION_SAVING: 'figure.text.session-saving',\n SESSION_VERSION_MISSING: 'figure.text.session-version-missing',\n SESSION_NEW_FIGURE_TOUCHED: 'figure.text.session-new-figure-touched',\n SESSION_PROPOSAL_KEY: 'figure.text.session-proposal-key'\n}\nexport function sessionRefusalOf(error: unknown, say: Say): string | null {\n const key = SESSION_REFUSALS[codeOf(error) ?? '']\n return key ? say(key, {}) : null\n}\n\nexport function editRefusalOf(error: unknown, say: Say): string {\n return (\n sessionRefusalOf(error, say) ??\n sizeRangeRefusalOf(error, say) ??\n inputRangeRefusalOf(error, say) ??\n repeatPitchRefusalOf(error, say) ??\n rowLimitRefusalOf(error, say) ??\n placementRefusalOf(error, say) ??\n partNameRefusalOf(error, say) ??\n documentLimitRefusalOf(error, say) ??\n sectionRefusalOf(error, say) ??\n slotLayoutRefusalOf(error, say) ??\n dataMotionRefusalOf(error, say) ??\n say('figure.text.edit-refused', { code: codeOf(error) ?? '' })\n )\n}\n\n/**\n * A data field, a binding, a status port, a motion group or a clip's tracks refused (ADR-0051 §8, §3.2), said with the ids\n * and numbers the kernel gave. Nothing for any other refusal.\n */\nexport function dataMotionRefusalOf(error: unknown, say: Say): string | null {\n const invalidId = detailsOf(error, 'data-id-invalid')\n if (invalidId) return say('figure.text.data-id-invalid', { id: invalidId.id })\n const twice = detailsOf(error, 'data-id-duplicate')\n if (twice) return say('figure.text.data-id-duplicate', { id: twice.id })\n const field = detailsOf(error, 'data-field-invalid')\n if (field) return say('figure.text.data-field-invalid-' + field.what, {})\n const fieldTwice = detailsOf(error, 'data-field-duplicate')\n if (fieldTwice) return say('figure.text.data-field-duplicate', { name: fieldTwice.name })\n const accessor = detailsOf(error, 'data-accessor-invalid')\n if (accessor) return say('figure.text.data-accessor-invalid-' + accessor.why, { accessor: accessor.accessor })\n const behavior = detailsOf(error, 'data-behavior-absent')\n if (behavior) return say('figure.text.data-behavior-absent-' + behavior.behavior, { id: behavior.id })\n const writers = detailsOf(error, 'data-behavior-duplicate')\n if (writers) return say('figure.text.data-behavior-duplicate', { a: writers.bindings[0], b: writers.bindings[1], id: writers.id })\n const domain = detailsOf(error, 'data-rule-domain')\n if (domain)\n return say('figure.text.data-rule-' + domain.why, {\n from: domain.from ?? '',\n to: domain.to ?? '',\n min: domain.min === undefined ? '' : numberOf(domain.min),\n max: domain.max === undefined ? '' : numberOf(domain.max),\n low: domain.within ? numberOf(domain.within[0]) : '',\n high: domain.within ? numberOf(domain.within[1]) : '',\n value: domain.value === undefined ? '' : String(domain.value)\n })\n const port = detailsOf(error, 'data-port-invalid')\n if (port) return say('figure.text.data-port-invalid-' + port.what, { port: port.port, id: port.id ?? '' })\n const bound = detailsOf(error, 'data-port-bound')\n if (bound) return say('figure.text.data-port-bound', { port: bound.port, bindings: bound.bindings.join(', ') })\n const clipAbsent = detailsOf(error, 'motion-clip-absent')\n if (clipAbsent) return say('figure.text.motion-clip-absent', { clip: clipAbsent.clip, group: clipAbsent.group })\n const shared = detailsOf(error, 'motion-clip-shared')\n if (shared) return say('figure.text.motion-clip-shared', { clip: shared.clip, group: shared.groups[0] })\n const many = detailsOf(error, 'driver-writers')\n if (many) return say('figure.text.driver-writers', { state: many.state, clips: many.clips.join(', ') })\n const which = detailsOf(error, 'driver-clip-required')\n if (which) return say('figure.text.driver-clip-required', { state: which.state, clips: which.clips.join(', ') })\n const setting = detailsOf(error, 'motion-setting')\n if (setting) return say('figure.text.motion-setting-' + setting.why, { group: setting.group, clip: setting.clip ?? '' })\n const key = codeOf(error) === 'MOTION_GROUP' ? detailsOf(error, 'value-outside-range') : undefined\n if (key) return say('figure.text.motion-key-outside-range', { input: key.input, value: numberOf(key.value), min: numberOf(key.min!), max: numberOf(key.max!) })\n return null\n}\n\n/**\n * A value outside the range its input declares, with the range and the value given. The figure's own size is named by\n * its axis; any other input by its range only.\n */\nexport function inputRangeRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INPUT_RANGE') return null\n const range = detailsOf(error, 'value-outside-range')\n if (!range) return null\n const axis = (Object.entries(FIGURE_INSTANCE_SIZE_INPUTS) as Array<[string, string]>).find(([, id]) => id === range.input)?.[0]\n const params = { value: numberOf(range.value), min: range.min === undefined ? '−∞' : numberOf(range.min), max: range.max === undefined ? '∞' : numberOf(range.max) }\n return axis ? say('figure.text.input-range-size', { ...params, axis: axis.toUpperCase() }) : say('figure.text.input-range', params)\n}\n\n/**\n * A row past its limits: a pitch so fine it would hold more copies than a row takes, a row that would expand to more\n * bodies than a figure draws, a number of copies outside what a row may have or more than its length holds apart, a\n * row inside a row along the same axis, or a part whose face something holds made into a row.\n */\nexport function rowLimitRefusalOf(error: unknown, say: Say): string | null {\n const copies = detailsOf(error, 'copies-over-limit')\n if (copies) return say('figure.text.row-copies-over-limit', { count: copies.count.toLocaleString(), limit: copies.limit.toLocaleString() })\n const bodies = detailsOf(error, 'geometry-over-limit')\n if (bodies) return say('figure.text.row-geometry-over-limit', { count: bodies.count.toLocaleString(), limit: bodies.limit.toLocaleString() })\n const count = detailsOf(error, 'row-copies-out-of-range')\n if (count) return say('figure.text.row-copies-out-of-range', { count: count.count.toLocaleString(), min: String(count.min), max: String(count.max) })\n const fit = detailsOf(error, 'row-does-not-fit')\n if (fit) return say('figure.text.row-does-not-fit', { count: fit.count.toLocaleString(), length: mmOf(fit.length), extent: mmOf(fit.extent) })\n const axis = detailsOf(error, 'row-same-axis')\n if (axis) return say('figure.text.row-same-axis', { part: axis.part, outer: axis.outer, axis: axis.axis.toUpperCase() })\n const held = detailsOf(error, 'surface-on-row')\n if (held) return say(`figure.text.row-face-held-${heldByOf(held.at)}`, { part: held.part })\n return null\n}\n\n/* What holds a face, from the contract path the kernel names it by: the slot layout, a place, the footprint. */\nconst heldByOf = (at: string) => (at.startsWith('slotLayout') ? 'slot-layout' : at.startsWith('bindings') ? 'place' : at.startsWith('occupancy') ? 'footprint' : 'other')\n\n/** A row's pitch under which the figure, at the length it is authored, would hold more copies than a row takes. */\nexport function repeatPitchRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INPUT_RANGE') return null\n const pitch = detailsOf(error, 'pitch-too-many-copies')\n if (!pitch) return null\n return say('figure.text.repeat-pitch-too-small', { length: pitch.length.toLocaleString(), min: String(pitch.least), limit: String(pitch.limit) })\n}\n\n/**\n * Why \"follow the size and keep where the figure is placed\" was not applied, in the author's words (ADR-0097): the plan\n * says what it would have had to overwrite, and for a part through the plane how far. A code the screen has no words\n * for is said as a refusal with its code, never in the kernel's English.\n */\nexport function resizeRefusalOf(plan: { mode: string; refusal?: { code: string; axis?: string; mm?: number } }, part: string, say: Say): string {\n const refusal = plan.refusal\n if (!refusal) return ''\n const place = say(`figure.label.resize-place-${plan.mode}`, {})\n const params = { part, place, axis: (refusal.axis ?? '').toUpperCase(), mm: refusal.mm === undefined ? '' : String(Math.round(refusal.mm)) }\n const known = ['HELD', 'TURNED', 'UNIFORM_POLICY', 'SHAPE_EDIT', 'DIMENSION_RULE', 'POSITION_RULE', 'GAP_CHOICE', 'NO_FACE']\n if (known.includes(refusal.code)) return say(`figure.text.resize-refused-${refusal.code.toLowerCase().replace(/_/g, '-')}`, params)\n return say('figure.text.edit-refused', { code: refusal.code })\n}\n"]}
1
+ {"version":3,"file":"refusals.js","sourceRoot":"","sources":["../../client/modeller/refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,2BAA2B,EAA2E,MAAM,wBAAwB,CAAA;AAK7I,MAAM,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAE,KAA8C,EAAE,IAAI,CAAA;AACxF,sEAAsE;AACtE,SAAS,SAAS,CAAmB,KAAc,EAAE,MAAS;IAC5D,MAAM,OAAO,GAAI,KAA+D,EAAE,OAAO,CAAA;IACzF,OAAO,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAE,OAAwD,CAAC,CAAC,CAAC,SAAS,CAAA;AAC3G,CAAC;AACD,MAAM,IAAI,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAA;AACvF,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAA;AACjG,6FAA6F;AAC7F,MAAM,KAAK,GAAG,CAAC,KAAa,EA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,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AACnJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAA8E,EAAE,IAAY,EAAE,GAAQ;IACpI,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IAC5B,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAA;IACvB,MAAM,KAAK,GAAG,GAAG,CAAC,6BAA6B,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IAC/D,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;IAC5I,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,CAAC,CAAA;IAC5H,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,GAAG,CAAC,8BAA8B,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IACnI,OAAO,GAAG,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;AAChE,CAAC","sourcesContent":["/*\n * A command figure-model refused, in the author's words with the numbers and where to put it right -- not the kernel's\n * English (user, 2026-09-24: 「what is this warning message means?」). Kept apart from the element so it is tested\n * without a browser.\n *\n * Every sentence here is made from the refusal's `code` and `details` (ADR-0127), never from its message: the kernel's\n * English is for logs and readers of the kernel, and a screen that read it went quiet whenever a sentence changed or a\n * new one came under the same code (ADR-0054). A refusal with no details the screen knows is said with its code.\n */\nimport { FIGURE_INSTANCE_SIZE_INPUTS, type FigureClipLoss, type FigureRefusalDetails, type FigureSizeRangeFit } from '@hatiolab/figure-model'\n\ntype Say = (key: string, params: Record<string, string>) => string\ntype Reason = FigureRefusalDetails['reason']\n\nconst codeOf = (error: unknown) => (error as { code?: string } | null | undefined)?.code\n/** The refusal's details when they are of this reason, or nothing. */\nfunction detailsOf<R extends Reason>(error: unknown, reason: R): Extract<FigureRefusalDetails, { reason: R }> | undefined {\n const details = (error as { details?: FigureRefusalDetails } | null | undefined)?.details\n return details?.reason === reason ? (details as Extract<FigureRefusalDetails, { reason: R }>) : undefined\n}\nconst mmOf = (mm: number) => mm.toLocaleString(undefined, { maximumFractionDigits: 1 })\nconst numberOf = (value: number) => value.toLocaleString(undefined, { maximumFractionDigits: 3 })\n/** Bytes in KiB, rounded up: a figure a few bytes over its limit is not said to be at it. */\nconst kibOf = (bytes: number) => Math.ceil(bytes / 1024).toLocaleString()\n\n/**\n * The ends an author typed for the size on a drawing, refused: they leave out the size the figure is drawn at, or start\n * at zero. The only refusals the size range has left (ADR-0087 decision 6); nothing for any other refusal.\n */\nexport function sizeRangeRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INSTANCE_SIZE_RANGE') return null\n const outside = detailsOf(error, 'size-outside-range')\n if (outside)\n return say('figure.text.size-range-leaves-out-size', {\n axis: say(`figure.label.resize-${outside.axis}`, {}),\n range: `${mmOf(outside.min ?? 0)} – ${outside.max === undefined ? '∞' : mmOf(outside.max)}`,\n at: mmOf(outside.at)\n })\n const zero = detailsOf(error, 'size-min-not-positive')\n if (zero) return say('figure.text.size-range-from-zero', { axis: say(`figure.label.resize-${zero.axis}`, {}) })\n return null\n}\n\n/** What a command did to the ends the author typed, in one line each: what moved, from what to what. */\nexport function sizeRangeFitsOf(fits: readonly FigureSizeRangeFit[], say: Say): string {\n return fits\n .map(f => say(`figure.text.size-range-moved-${f.bound}`, { axis: say(`figure.label.resize-${f.axis}`, {}), from: mmOf(f.from), to: mmOf(f.to) }))\n .join(' ')\n}\n\n/**\n * A placement refused because a part is fastened to the mounting plane in a way the new plane does not take (standing\n * on the floor, when the figure is to hang on a wall), said in the author's words with the parts it names.\n */\nexport function placementRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'PLACEMENT_PLANE') return null\n const misfit = detailsOf(error, 'placement-face')\n if (!misfit) return null\n return say('figure.text.placement-plane-refused', { parts: misfit.parts.map(p => p.part).join(', ') })\n}\n\n/** A refusal carried on in a record (an AI proposal's outcome) in figure-model's own shape: its code and details. */\nexport interface FigureRefusalRecord {\n code?: string\n details?: FigureRefusalDetails\n}\n\n/** The record of a refusal: figure-model's code and details, copied as they are. */\nexport function refusalRecordOf(error: unknown): FigureRefusalRecord {\n const { details } = (error ?? {}) as FigureRefusalRecord\n return { code: codeOf(error), ...(details ? { details } : {}) }\n}\n\n/** The clips an edit would stop, as figure-model named them (CLIPS_DROPPED) -- the person is asked before any go; nothing for any other refusal. */\nexport function clipLossOf(error: unknown): FigureClipLoss[] | null {\n return codeOf(error) === 'CLIPS_DROPPED' ? (detailsOf(error, 'clips-dropped')?.clips ?? []) : null\n}\n\n/**\n * Why a part cannot be deleted, in the author's words. Since the chief architect's ruling of 2026-09-27 a part that\n * holds others, leads a motion or is followed goes, and what depended on it is let go of (`removalNoticeOf`); what is\n * left is a row -- one laid along the part, or hanging in its row.\n */\nexport function partRefusalOf(error: unknown, part: string, say: Say): string | null {\n const code = codeOf(error)\n if (code !== 'PART_REFERENCED' && code !== 'PART_ROW') return null\n const along = detailsOf(error, 'row-along')\n if (along) return say('figure.text.part-row-along', { part, rows: along.rows.join(', ') })\n const carried = detailsOf(error, 'hangs-in-row')\n if (carried) return say('figure.text.part-row-carries', { part, others: carried.parts.join(', ') })\n return say('figure.text.part-is-referenced', { part })\n}\n\n/** A part the gizmo cannot move because a joint or a fastening places it, named as the author knows it (`part`). */\nexport function placedRefusalOf(error: unknown, part: string, say: Say): string | null {\n if (codeOf(error) !== 'EDIT_TARGET') return null\n if (detailsOf(error, 'placed-by-joint')) return say('figure.text.gizmo-joint-places', { part })\n if (detailsOf(error, 'placed-by-fastening')) return say('figure.text.gizmo-fastening-places', { part })\n return null\n}\n\n/** A part name refused: not a name, already used, or another part is named under the part. The rule is the kernel's. */\nexport function partNameRefusalOf(error: unknown, say: Say): string | null {\n /* A new part named as one already is: the same sentence as a part renamed so. */\n const takenId = detailsOf(error, 'part-id-taken')\n if (takenId) return say('figure.text.part-name-taken', { name: takenId.part })\n if (codeOf(error) !== 'PART_ID') return null\n const invalid = detailsOf(error, 'name-invalid')\n if (invalid) return say('figure.text.part-name-invalid', { name: invalid.name })\n const taken = detailsOf(error, 'name-taken')\n if (taken) return say('figure.text.part-name-taken', { name: taken.name })\n const nested = detailsOf(error, 'name-has-nested')\n if (nested) return say('figure.text.part-name-has-nested', { nested: nested.nested })\n return null\n}\n\n/** What removing a part let go of (figure-model's `RemovalNotice`), said in one line, or nothing when it let go of nothing. */\nexport function removalNoticeOf(\n notice:\n | {\n released: Array<{ part: string; control?: string }>\n fixed: Array<{ part: string }>\n controls: Array<{ part: string; control: string; min: number; max: number }>\n mountingFace?: boolean\n bindings?: Array<{ id: string; label?: string }>\n }\n | undefined,\n say: Say\n): string | null {\n if (!notice) return null\n const lines: string[] = []\n const still = notice.released.filter(r => !r.control).map(r => r.part)\n if (still.length) lines.push(say('figure.text.removal-released', { parts: still.join(', ') }))\n for (const r of notice.released.filter(r => r.control)) lines.push(say('figure.text.removal-released-motion', { part: r.part, control: r.control! }))\n for (const c of notice.controls) lines.push(say('figure.text.removal-own-control', { part: c.part, control: c.control, min: numberOf(c.min), max: numberOf(c.max) }))\n const fixed = [...new Set(notice.fixed.map(f => f.part))]\n if (fixed.length) lines.push(say('figure.text.removal-fixed', { parts: fixed.join(', ') }))\n if (notice.bindings?.length) lines.push(say('figure.text.removal-bindings', { places: notice.bindings.map(b => b.label ?? b.id).join(', ') }))\n if (notice.mountingFace) lines.push(say('figure.text.removal-mounting-face', {}))\n return lines.length ? lines.join(' ') : null\n}\n\n/**\n * A recipe refused at one of its steps: which step, and why -- the particular sentence when there is one (a size\n * range, a value's range, a placement), otherwise the kernel's code. The step is the refusal's path, `steps[2]`: the\n * contract's path grammar, not its English (ADR-0127 decision 6).\n */\nexport function recipeRefusalOf(error: unknown, say: Say): string | null {\n const step = /^steps\\[(\\d+)\\]$/.exec((error as { path?: string })?.path ?? '')\n if (!step) return null\n const why = sizeRangeRefusalOf(error, say) ?? inputRangeRefusalOf(error, say) ?? placementRefusalOf(error, say)\n return say('figure.text.recipe-step-refused', { step: String(Number(step[1]) + 1), why: why ?? '', code: codeOf(error) ?? '' })\n}\n\n/**\n * A corner or an inside the part cannot take (ADR-0100 stage 1): what was too large or too thick, or what holds on\n * to what the edit would take away.\n */\nfunction sectionRefusalOf(error: unknown, say: Say): string | null {\n const mapping = detailsOf(error, 'faces-taken-away')\n if (mapping) return say('figure.text.section-face-in-use', { faces: mapping.lost.map(l => say('figure.label.face-' + l.face, {})).join(', ') })\n if (codeOf(error) === 'DIMENSION_LINKED') return say('figure.text.section-dimension-linked', {})\n if (detailsOf(error, 'section-invalid')?.issues.some(i => i.code === 'CORNER_TOO_LARGE')) return say('figure.text.section-corner-too-large', {})\n const inside = detailsOf(error, 'inside-invalid')?.refusal\n if (inside?.code === 'CAVITY' && inside.refused === 'NO_ROOM_INSIDE') return say('figure.text.section-wall-too-thick', {})\n if (inside?.code === 'CAVITY_NO_LENGTH') return say('figure.text.section-ends-too-thick', {})\n return null\n}\n\n/**\n * A slot layout refused (ADR-0118): the anchor, slot or value it was refused for. The layout's own findings are named\n * by where they are; the editor checks them before Apply, so they rarely reach here.\n */\nexport function slotLayoutRefusalOf(error: unknown, say: Say): string | null {\n if (detailsOf(error, 'slot-layout-label-missing')) return say('figure.text.slot-layout-label-missing', {})\n if (detailsOf(error, 'slot-anchors-missing')) return say('figure.text.slot-anchors-missing', {})\n const twice = detailsOf(error, 'slot-anchor-duplicate')\n if (twice) return say('figure.text.slot-anchor-duplicate', { anchor: twice.anchor })\n const flat = detailsOf(error, 'slot-anchor-not-flat')\n if (flat) return say('figure.text.slot-anchor-not-flat', { anchor: flat.anchor, part: flat.part })\n const gone = detailsOf(error, 'slot-anchor-no-part')\n if (gone) return say('figure.text.slot-anchor-no-part', { anchor: gone.anchor, part: gone.part })\n const issues = detailsOf(error, 'slot-layout-issues')\n if (issues) return say('figure.text.slot-layout-issues', { path: issues.issues[0]?.path ?? '' })\n const empty = detailsOf(error, 'slot-accepts-empty')\n if (empty) return say('figure.text.slot-accepts-empty', { slot: empty.slot })\n const taken = detailsOf(error, 'slot-id-taken')\n if (taken) return say('figure.text.slot-id-taken', { slot: taken.slot })\n return null\n}\n\n/** The figure's limits: its nodes, its size saved, how deep it nests. */\nfunction documentLimitRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'DOCUMENT_LIMIT') return null\n const nodes = detailsOf(error, 'node-limit')\n if (nodes) return say('figure.text.edit-refused-node-limit', { max: String(nodes.max) })\n const large = detailsOf(error, 'document-too-large')\n if (large)\n return large.at === undefined\n ? say('figure.text.document-too-large-unmeasured', { max: kibOf(large.max) })\n : say('figure.text.document-too-large', { max: kibOf(large.max), at: kibOf(large.at) })\n const deep = detailsOf(error, 'nesting-too-deep')\n if (deep) return say('figure.text.document-nesting-too-deep', { max: String(deep.max), at: String(deep.at) })\n return null\n}\n\n/**\n * A refusal in the author's words when the screen has words for it, otherwise said as a refusal with its code -- never\n * the kernel's English on the screen (the duplicate of a row's part showed 「EDIT_TARGET: … not a repeated template」,\n * 2026-09-27).\n */\n/** The modeller session's own refusals (`product-session.ts`), by their code. Nothing for any other refusal. */\nconst SESSION_REFUSALS: Record<string, string> = {\n SESSION_NOT_OPEN: 'figure.text.session-not-open',\n SESSION_SAVING: 'figure.text.session-saving',\n SESSION_VERSION_MISSING: 'figure.text.session-version-missing',\n SESSION_NEW_FIGURE_TOUCHED: 'figure.text.session-new-figure-touched',\n SESSION_PROPOSAL_KEY: 'figure.text.session-proposal-key'\n}\nexport function sessionRefusalOf(error: unknown, say: Say): string | null {\n const key = SESSION_REFUSALS[codeOf(error) ?? '']\n return key ? say(key, {}) : null\n}\n\nexport function editRefusalOf(error: unknown, say: Say): string {\n return (\n sessionRefusalOf(error, say) ??\n sizeRangeRefusalOf(error, say) ??\n inputRangeRefusalOf(error, say) ??\n repeatPitchRefusalOf(error, say) ??\n rowLimitRefusalOf(error, say) ??\n placementRefusalOf(error, say) ??\n partNameRefusalOf(error, say) ??\n documentLimitRefusalOf(error, say) ??\n sectionRefusalOf(error, say) ??\n slotLayoutRefusalOf(error, say) ??\n dataMotionRefusalOf(error, say) ??\n say('figure.text.edit-refused', { code: codeOf(error) ?? '' })\n )\n}\n\n/**\n * A data field, a binding, a status port, a motion group or a clip's tracks refused (ADR-0051 §8, §3.2), said with the ids\n * and numbers the kernel gave. Nothing for any other refusal.\n */\nexport function dataMotionRefusalOf(error: unknown, say: Say): string | null {\n const invalidId = detailsOf(error, 'data-id-invalid')\n if (invalidId) return say('figure.text.data-id-invalid', { id: invalidId.id })\n const twice = detailsOf(error, 'data-id-duplicate')\n if (twice) return say('figure.text.data-id-duplicate', { id: twice.id })\n const field = detailsOf(error, 'data-field-invalid')\n if (field) return say('figure.text.data-field-invalid-' + field.what, {})\n const fieldTwice = detailsOf(error, 'data-field-duplicate')\n if (fieldTwice) return say('figure.text.data-field-duplicate', { name: fieldTwice.name })\n const accessor = detailsOf(error, 'data-accessor-invalid')\n if (accessor) return say('figure.text.data-accessor-invalid-' + accessor.why, { accessor: accessor.accessor })\n const behavior = detailsOf(error, 'data-behavior-absent')\n if (behavior) return say('figure.text.data-behavior-absent-' + behavior.behavior, { id: behavior.id })\n const writers = detailsOf(error, 'data-behavior-duplicate')\n if (writers) return say('figure.text.data-behavior-duplicate', { a: writers.bindings[0], b: writers.bindings[1], id: writers.id })\n const domain = detailsOf(error, 'data-rule-domain')\n if (domain)\n return say('figure.text.data-rule-' + domain.why, {\n from: domain.from ?? '',\n to: domain.to ?? '',\n min: domain.min === undefined ? '' : numberOf(domain.min),\n max: domain.max === undefined ? '' : numberOf(domain.max),\n low: domain.within ? numberOf(domain.within[0]) : '',\n high: domain.within ? numberOf(domain.within[1]) : '',\n value: domain.value === undefined ? '' : String(domain.value)\n })\n const port = detailsOf(error, 'data-port-invalid')\n if (port) return say('figure.text.data-port-invalid-' + port.what, { port: port.port, id: port.id ?? '' })\n const bound = detailsOf(error, 'data-port-bound')\n if (bound) return say('figure.text.data-port-bound', { port: bound.port, bindings: bound.bindings.join(', ') })\n const clipAbsent = detailsOf(error, 'motion-clip-absent')\n if (clipAbsent) return say('figure.text.motion-clip-absent', { clip: clipAbsent.clip, group: clipAbsent.group })\n const shared = detailsOf(error, 'motion-clip-shared')\n if (shared) return say('figure.text.motion-clip-shared', { clip: shared.clip, group: shared.groups[0] })\n const many = detailsOf(error, 'driver-writers')\n if (many) return say('figure.text.driver-writers', { state: many.state, clips: many.clips.join(', ') })\n const which = detailsOf(error, 'driver-clip-required')\n if (which) return say('figure.text.driver-clip-required', { state: which.state, clips: which.clips.join(', ') })\n const setting = detailsOf(error, 'motion-setting')\n if (setting) return say('figure.text.motion-setting-' + setting.why, { group: setting.group, clip: setting.clip ?? '' })\n const key = codeOf(error) === 'MOTION_GROUP' ? detailsOf(error, 'value-outside-range') : undefined\n if (key) return say('figure.text.motion-key-outside-range', { input: key.input, value: numberOf(key.value), min: numberOf(key.min!), max: numberOf(key.max!) })\n return null\n}\n\n/**\n * A value outside the range its input declares, with the range and the value given. The figure's own size is named by\n * its axis; any other input by its range only.\n */\nexport function inputRangeRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INPUT_RANGE') return null\n const range = detailsOf(error, 'value-outside-range')\n if (!range) return null\n const axis = (Object.entries(FIGURE_INSTANCE_SIZE_INPUTS) as Array<[string, string]>).find(([, id]) => id === range.input)?.[0]\n const params = { value: numberOf(range.value), min: range.min === undefined ? '−∞' : numberOf(range.min), max: range.max === undefined ? '∞' : numberOf(range.max) }\n return axis ? say('figure.text.input-range-size', { ...params, axis: axis.toUpperCase() }) : say('figure.text.input-range', params)\n}\n\n/**\n * A row past its limits: a pitch so fine it would hold more copies than a row takes, a row that would expand to more\n * bodies than a figure draws, a number of copies outside what a row may have or more than its length holds apart, a\n * row inside a row along the same axis, or a part whose face something holds made into a row.\n */\nexport function rowLimitRefusalOf(error: unknown, say: Say): string | null {\n const copies = detailsOf(error, 'copies-over-limit')\n if (copies) return say('figure.text.row-copies-over-limit', { count: copies.count.toLocaleString(), limit: copies.limit.toLocaleString() })\n const bodies = detailsOf(error, 'geometry-over-limit')\n if (bodies) return say('figure.text.row-geometry-over-limit', { count: bodies.count.toLocaleString(), limit: bodies.limit.toLocaleString() })\n const count = detailsOf(error, 'row-copies-out-of-range')\n if (count) return say('figure.text.row-copies-out-of-range', { count: count.count.toLocaleString(), min: String(count.min), max: String(count.max) })\n const fit = detailsOf(error, 'row-does-not-fit')\n if (fit) return say('figure.text.row-does-not-fit', { count: fit.count.toLocaleString(), length: mmOf(fit.length), extent: mmOf(fit.extent) })\n const axis = detailsOf(error, 'row-same-axis')\n if (axis) return say('figure.text.row-same-axis', { part: axis.part, outer: axis.outer, axis: axis.axis.toUpperCase() })\n const held = detailsOf(error, 'surface-on-row')\n if (held) return say(`figure.text.row-face-held-${heldByOf(held.at)}`, { part: held.part })\n return null\n}\n\n/* What holds a face, from the contract path the kernel names it by: the slot layout, a place, the footprint. */\nconst heldByOf = (at: string) => (at.startsWith('slotLayout') ? 'slot-layout' : at.startsWith('bindings') ? 'place' : at.startsWith('occupancy') ? 'footprint' : 'other')\n\n/** A row's pitch under which the figure, at the length it is authored, would hold more copies than a row takes. */\nexport function repeatPitchRefusalOf(error: unknown, say: Say): string | null {\n if (codeOf(error) !== 'INPUT_RANGE') return null\n const pitch = detailsOf(error, 'pitch-too-many-copies')\n if (!pitch) return null\n return say('figure.text.repeat-pitch-too-small', { length: pitch.length.toLocaleString(), min: String(pitch.least), limit: String(pitch.limit) })\n}\n\n/**\n * Why \"follow the size and keep where the figure is placed\" was not applied, in the author's words (ADR-0097): the plan\n * says what it would have had to overwrite, and for a part through the plane how far. A code the screen has no words\n * for is said as a refusal with its code, never in the kernel's English.\n */\nexport function resizeRefusalOf(plan: { mode: string; refusal?: { code: string; axis?: string; mm?: number } }, part: string, say: Say): string {\n const refusal = plan.refusal\n if (!refusal) return ''\n const place = say(`figure.label.resize-place-${plan.mode}`, {})\n const params = { part, place, axis: (refusal.axis ?? '').toUpperCase(), mm: refusal.mm === undefined ? '' : String(Math.round(refusal.mm)) }\n const known = ['HELD', 'TURNED', 'UNIFORM_POLICY', 'SHAPE_EDIT', 'DIMENSION_RULE', 'POSITION_RULE', 'GAP_CHOICE', 'NO_FACE']\n if (known.includes(refusal.code)) return say(`figure.text.resize-refused-${refusal.code.toLowerCase().replace(/_/g, '-')}`, params)\n return say('figure.text.edit-refused', { code: refusal.code })\n}\n"]}
@@ -62,9 +62,7 @@ export declare class FigureModellerPage extends PageView {
62
62
  * 서버의 거절(이미 쓰는 타입 · 발행 뒤)은 그 문장 그대로 칸 아래에 둔다.
63
63
  */
64
64
  private renameType;
65
- /** 「부품에 맞추기」 — 공간을 지금 부품에서 다시 선언한다. 저장은 저작자가 따로 한다. */
66
- private fitToParts;
67
- /** A command from the properties tab — rename, declare the room, the mounting face. */
65
+ /** A command from the properties tab — rename, the mounting face. */
68
66
  private onCommand;
69
67
  /**
70
68
  * One step of the session's history, whichever part of the side asked for it — so undo takes it back like any
@@ -10,7 +10,6 @@ import { i18next } from '@operato/i18n';
10
10
  import { fetchFigure, fetchFigureCategories, fetchFigureNamespaces, fetchFigureTypeNames, updateFigure } from '../graphql/index.js';
11
11
  import { figureProposalOutcome } from '../figure-assistant.js';
12
12
  import { availableRecipes, recipeGuide } from '../modeller/recipe-source.js';
13
- import { occupancyFromParts } from '../modeller/occupancy.js';
14
13
  import '../modeller/editor.js';
15
14
  import '@material/web/icon/icon.js';
16
15
  import '../modeller/figure-history-panel.js';
@@ -161,14 +160,7 @@ let FigureModellerPage = class FigureModellerPage extends PageView {
161
160
  input.value = this.row.type ?? '';
162
161
  }
163
162
  };
164
- /** 「부품에 맞추기」 — 공간을 지금 부품에서 다시 선언한다. 저장은 저작자가 따로 한다. */
165
- this.fitToParts = () => {
166
- const shown = this.session.revisionNow();
167
- /* Nothing open, nothing to fit: the button stands only beside an open figure. */
168
- if (shown)
169
- this.runCommand(() => occupancyFromParts(shown.asset));
170
- };
171
- /** A command from the properties tab — rename, declare the room, the mounting face. */
163
+ /** A command from the properties tab — rename, the mounting face. */
172
164
  this.onCommand = (event) => {
173
165
  const action = event.detail?.action;
174
166
  if (action)
@@ -405,18 +397,12 @@ let FigureModellerPage = class FigureModellerPage extends PageView {
405
397
  this.changed();
406
398
  }
407
399
  catch (error) {
408
- /*
409
- This used to set the page error, which replaces the whole editor with one raw line — for a figure with no
410
- parts that line was 「OCCUPANCY_NO_PARTS: occupancy: no part could be measured」 (2026-09-24).
411
- */
412
- this.commandError =
413
- error?.code === 'OCCUPANCY_NO_PARTS'
414
- ? i18next.t('figure.text.fit-needs-parts')
415
- : error?.code
416
- ? editRefusalOf(error, (key, params) => i18next.t(key, params))
417
- : error instanceof Error
418
- ? error.message
419
- : String(error);
400
+ /* Said in the author's words beside the side panel, not as the page error that replaces the whole editor. */
401
+ this.commandError = error?.code
402
+ ? editRefusalOf(error, (key, params) => i18next.t(key, params))
403
+ : error instanceof Error
404
+ ? error.message
405
+ : String(error);
420
406
  }
421
407
  }
422
408
  connectedCallback() {
@@ -575,7 +561,6 @@ let FigureModellerPage = class FigureModellerPage extends PageView {
575
561
  @capacity-changed=${(event) => {
576
562
  this.budget = event.detail.budget;
577
563
  }}
578
- @fit-base-to-parts=${this.fitToParts}
579
564
  @release-verdict=${(event) => (this.releaseBlockers = event.detail.blocking)}
580
565
  ></figure-verdict>
581
566
  <figure-history-panel
@@ -588,7 +573,6 @@ let FigureModellerPage = class FigureModellerPage extends PageView {
588
573
  .dirty=${!!view.dirty}
589
574
  .saveFirst=${this.saveBeforeRevert}
590
575
  .serverSource=${() => this.session.confirmedSource()}
591
- @fit-base-to-parts=${this.fitToParts}
592
576
  @figure-released=${this.released}
593
577
  @figure-reverted=${this.reverted}
594
578
  ></figure-history-panel>
@@ -1 +1 @@
1
- {"version":3,"file":"figure-modeller-page.js","sourceRoot":"","sources":["../../client/pages/figure-modeller-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACnI,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAG7D,OAAO,uBAAuB,CAAA;AAC9B,OAAO,4BAA4B,CAAA;AACnC,OAAO,qCAAqC,CAAA;AAC5C,OAAO,+BAA+B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B;AAEjB;IAAhB,KAAK,EAAE;;2DAAkD;AACzC;IAAhB,KAAK,EAAE;;kDAAkC;AA1G/B,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA6hB9B","sourcesContent":["import { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { navigate, PageView } from '@operato/shell'\nimport { getPathInfo } from '@operato/utils'\nimport { modellerPathOf } from '../modeller/modeller-route.js'\nimport { createFigureProductSession } from '../modeller/product-session.js'\nimport { figureProductStore } from '../graphql/store.js'\nimport { i18next } from '@operato/i18n'\nimport { fetchFigure, fetchFigureCategories, fetchFigureNamespaces, fetchFigureTypeNames, updateFigure } from '../graphql/index.js'\nimport { figureProposalOutcome } from '../figure-assistant.js'\nimport { availableRecipes, recipeGuide } from '../modeller/recipe-source.js'\nimport type { RecipeTemplate } from '../modeller/recipes.js'\nimport { occupancyFromParts } from '../modeller/occupancy.js'\nimport type { FigureAuthoringAction } from '@hatiolab/figure-model'\nimport type { FigureGateFinding } from '../types.js'\nimport '../modeller/editor.js'\nimport '@material/web/icon/icon.js'\nimport '../modeller/figure-history-panel.js'\nimport '../modeller/figure-verdict.js'\nimport '../modeller/figure-properties.js'\nimport type { FigureBudgetLine } from '../modeller/maturity.js'\nimport { OxPrompt } from '@operato/popup'\nimport { notify, openPopup } from '@operato/layout'\nimport '../modeller/figure-first-save.js'\nimport { activePalette } from '@hatiolab/things-scene'\nimport {\n askAssistant,\n clearAssistantSurface,\n notifyAssistantSurface,\n provideAssistantSurface\n} from '@things-factory/ai-assistant/dist-client/index.js'\nimport type { FirstSave } from '../modeller/first-save.js'\nimport { typeOf } from '../modeller/first-save.js'\nimport { editRefusalOf } from '../modeller/refusals.js'\nimport { askingToLeave, takeFigureOffer, takePendingNewFigure } from '../modeller/ai-proposal.js'\n\n/**\n * The product page has exactly one authoritative workspace for UI and AI input transactions.\n *\n * The one modeller since ADR-0087 step 5 (2026-09-24): it answers to `figure-modeller`, and to `figure-modeller`\n * as an alias for links made before the switch.\n */\n@customElement('figure-modeller-page')\nexport class FigureModellerPage extends PageView {\n static styles = css`\n :host {\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n /*\n The page must fit the width it is given. Without this the shell sizes it to its content — the editor's\n 660 plus the 320 release panel — and the panel runs off the right edge (seen at 945 px, 2026-09-24).\n */\n overflow: hidden;\n }\n figure-editor {\n flex: 1;\n min-width: 0;\n min-height: 0;\n }\n /*\n The first field of the properties tab, in the side panel's look (side-panel-styles): its label and its field on one\n line, the field a line under its value. It is slotted into the figure panel, so the panel's measures reach it by\n inheritance.\n */\n label[type-field] {\n display: grid;\n grid-template-columns: var(--figure-label-width, 72px) minmax(0, 1fr);\n align-items: center;\n gap: 4px 8px;\n margin: 0;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-on-surface-variant);\n }\n label[type-field] > :not(span) {\n grid-column: 2;\n }\n label[type-field] input,\n label[type-field] code {\n box-sizing: border-box;\n min-height: var(--figure-control-height, 26px);\n padding: 2px 2px;\n font-family: var(--ui-mono, ui-monospace, monospace);\n font-size: var(--ui-t-small, 11.5px);\n line-height: calc(var(--figure-control-height, 26px) - 6px);\n color: var(--md-sys-color-on-surface);\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n /* Fixed once released: its value with no line under it, read not edited. */\n label[type-field] code {\n border-bottom-color: transparent;\n }\n label[type-field] input:hover:not(:focus) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n label[type-field] input:focus {\n outline: none;\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n label[type-field] small {\n color: var(--md-sys-color-on-surface-variant);\n }\n p[fit-error] {\n margin: 0;\n padding: 8px 12px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-error);\n }\n label[type-field] small[role='alert'] {\n color: var(--md-sys-color-error);\n }\n .error {\n padding: 16px;\n color: var(--md-sys-color-error);\n }\n `\n private readonly session = createFigureProductSession(figureProductStore)\n private routeId: string | undefined\n private discardApproved = false\n @state() private revision = 0\n /** The recipe templates (ADR-0095), read once when the page is first shown; none read, and the section is not drawn. */\n @state() private templates: RecipeTemplate[] = []\n private templatesRead = false\n private guideOf = (name: string) => recipeGuide(name, i18next.language || 'en')\n /* The domain part of the address is read the way the shell reads it (figure-thumb does the same). */\n private thumbnailOf = (name: string) => `${getPathInfo(location.pathname).contextPath}/figure-recipe-thumbnail/${name}`\n @state() private error = ''\n /**\n * 발행 패널이 읽는 행의 사실 — 상태와 발행 판 번호. 원본은 세션이 들고, 이 둘은 행에 있다.\n *\n * 이 화면에는 발행 패널이 없었다. 저장은 되고 발행 · 판본 · 복원 · 판정을 볼 자리가 없어서, ADR-0087 5단계에서\n * `figure-modeller` 가 이 화면으로 바뀌면 저작자는 발행을 할 수 없었다. 새 도형은 공간을 선언하기 전에는 전부\n * 발행 판정에 막히는데 그 선언을 할 단추도 없었다(2026-09-24 확인). 그래서 발행 패널을 건다.\n */\n /** The categories the server allows, or null when a category is free text (G5). */\n @state() private categories: string[] | null = null\n @state() private row: { state?: 'draft' | 'released'; version: number; namespace?: string; type?: string; category?: string; tags?: string[] } = {\n version: 0\n }\n @state() private typeError = ''\n /** Why a command from the side did nothing. Shown beside the tabs — the editor stays, since nothing in it was lost. */\n @state() private commandError = ''\n /** What the verdict says blocks release now, handed to the editor's bar. */\n @state() private releaseBlockers: FigureGateFinding[] = []\n @state() private budget?: FigureBudgetLine\n private wasDirty = false\n private titled?: string | null\n /** The figure the AI dock was last told about - another id is another conversation. */\n private assistantFor?: string\n /*\n The figure on screen is what the AI dock talks about (design/ai/shared-dock.md §3). A figure not saved yet is named\n by its creation id, the id its first save inserts the row under (ADR-0061 decision 3, ADR-0072 decision 6): the\n anchor is the same before and after that save, so the conversation goes on, with nothing to bind again.\n The draft is read at the moment of sending, never cached - the dock must not answer about a shape already changed.\n */\n private provideAssistant = () => {\n const view = this.session.read()\n if (!this.active || view.loading || view.error || !view.context) return\n const id = view.id ?? view.creationId\n if (!id) {\n this.withdrawAssistant()\n return\n }\n if (this.assistantFor === id) {\n notifyAssistantSurface(this)\n return\n }\n this.assistantFor = id\n provideAssistantSurface(this, {\n key: `figure:${id}`,\n subject: 'figure',\n icon: 'category',\n label: () => this.session.read().name || id,\n detail: () => (this.session.read().dirty ? i18next.t('figure.text.unsaved-changes') : ''),\n anchor: () => ({ anchorType: 'figure', anchorId: id }),\n /* The card's \"check the result\": the server's record, never the dock's memory; nothing is applied again. */\n proposalOutcome: figureProposalOutcome,\n hostContext: () => ({\n surface: 'figure-modeller',\n editorMode: this.session.read().id ? 'existing' : 'new',\n figureId: id,\n draftSource: JSON.parse(this.session.source()),\n /* The version the model sees; a proposal is applied on it, or refused if the figure moved on (ADR-0094). */\n context: this.session.read().context,\n revision: this.session.read().revision,\n palette: Object.keys(activePalette()),\n ...this.assistantFocus()\n })\n })\n }\n /**\n * The part selected and what the preview is trying, with the version they were seen on (ADR-0097 §5.6 item 5). Read\n * when a request is sent; selecting is not a new subject, so the dock is not told about it and the conversation stays.\n */\n private assistantFocus() {\n const focus = this.renderRoot.querySelector<HTMLElement & { assistantFocus?: () => { part?: string; trying?: object } }>('figure-editor')?.assistantFocus?.() ?? {}\n const { context, revision } = this.session.read()\n return {\n ...(focus.part ? { selection: { part: focus.part, context, revision } } : {}),\n ...(focus.trying ? { trying: { ...focus.trying, context, revision } } : {})\n }\n }\n private withdrawAssistant() {\n this.assistantFor = undefined\n clearAssistantSurface(this)\n }\n private changed = () => {\n this.revision++\n /* Any edit after a failed command makes the message stale — the author has done something about it. */\n this.commandError = ''\n const view = this.session.read()\n /* The title bar reads the name through `context`, which the shell asks for only when told — a rename left it stale. */\n if (view.name !== this.titled) {\n this.titled = view.name\n this.updateContext()\n }\n if (!view.saving) this.provideAssistant()\n /*\n A new figure's first save gives it an id: the address becomes the figure's own, in place of the history entry.\n Left at the bare modeller address, opening the modeller again from the menu was taken for the same page and kept\n the saved figure -- its type showing where a new figure's was expected (2026-09-25).\n */\n if (view.id && !this.routeId && !view.saving) {\n this.routeId = view.id\n navigate(modellerPathOf({ id: view.id }), true)\n }\n /* 저장이 끝난 순간 행을 다시 읽는다 — 발행된 도형을 고쳐 저장하면 서버가 초안으로 내린다. */\n if (this.wasDirty && !view.dirty && !view.saving && view.id) this.readRow(view.id)\n this.wasDirty = !!view.dirty\n }\n /*\n A released figure changed on the server -- its source saved, or its category or tags -- comes back a draft, and a\n board keeps the released version until it is released again. Said when it happens (D, designer 2026-09-27), not left\n to a badge in the history tab.\n */\n /* True of what boards read: `figureBlueprint` answers a draft row with its latest released version (releasedSourceOf). */\n private toldDemoted(before: string | undefined, after: string | undefined) {\n if (before === 'released' && after === 'draft') notify({ level: 'info', message: i18next.t('figure.text.released-now-draft') })\n }\n private async readRow(id: string) {\n try {\n const figure = await fetchFigure(id)\n if (this.session.read().id === id) this.toldDemoted(this.row.state, figure.state)\n if (this.session.read().id === id)\n this.row = {\n state: figure.state as 'draft' | 'released',\n version: figure.version ?? 0,\n namespace: figure.namespace ?? undefined,\n type: figure.type,\n category: figure.category ?? undefined,\n tags: figure.tags ?? undefined\n }\n } catch {\n /* 행을 못 읽으면 패널은 판 번호 0 으로 보인다 — 발행 문이 서버에서 다시 판단하므로 여기서 지어내지 않는다. */\n }\n }\n /**\n * 타입을 정한다 — 보드가 도형을 부르는 이름이고, 발행하면 굳는다(ADR-0063 결정 4).\n *\n * 새 도형은 저장할 때 임시 타입을 받는데, 이 화면에는 그것을 바꿀 칸이 없어서 임시 타입 그대로 발행됐다.\n * 행만 바뀐다 — 자산은 타입을 원본에 적지 않으므로(적으면 형식이 거절한다) 편집 중인 원본과 부딪히지 않는다.\n * 서버의 거절(이미 쓰는 타입 · 발행 뒤)은 그 문장 그대로 칸 아래에 둔다.\n */\n private renameType = async (event: Event) => {\n const input = event.target as HTMLInputElement\n const id = this.session.read().id\n const wanted = typeOf(input.value)\n input.value = wanted\n /*\n A figure not saved yet has no row to rename: the type is held here and the first save's question opens with it.\n The field was disabled until the first save, so a type typed there went nowhere and was asked for again\n (2026-09-25).\n */\n if (!id) {\n this.row = { ...this.row, type: wanted || undefined }\n return\n }\n if (!wanted || wanted === this.row.type) return\n try {\n const result = await updateFigure(id, { type: wanted })\n this.typeError = ''\n this.row = { ...this.row, type: result.figure.type }\n } catch (error) {\n this.typeError = error instanceof Error ? error.message : String(error)\n input.value = this.row.type ?? ''\n }\n }\n /** 「부품에 맞추기」 — 공간을 지금 부품에서 다시 선언한다. 저장은 저작자가 따로 한다. */\n private fitToParts = () => {\n const shown = this.session.revisionNow()\n /* Nothing open, nothing to fit: the button stands only beside an open figure. */\n if (shown) this.runCommand(() => occupancyFromParts(shown.asset))\n }\n /** A command from the properties tab — rename, declare the room, the mounting face. */\n private onCommand = (event: Event) => {\n const action = (event as CustomEvent).detail?.action as FigureAuthoringAction | undefined\n if (action) this.runCommand(() => action)\n }\n /**\n * One step of the session's history, whichever part of the side asked for it — so undo takes it back like any\n * other edit, and it is saved with the figure.\n */\n private runCommand(actionOf: () => FigureAuthoringAction) {\n try {\n this.session.command(actionOf())\n this.commandError = ''\n this.changed()\n } catch (error) {\n /*\n This used to set the page error, which replaces the whole editor with one raw line — for a figure with no\n parts that line was 「OCCUPANCY_NO_PARTS: occupancy: no part could be measured」 (2026-09-24).\n */\n this.commandError =\n (error as { code?: string })?.code === 'OCCUPANCY_NO_PARTS'\n ? i18next.t('figure.text.fit-needs-parts')\n : (error as { code?: string })?.code\n ? editRefusalOf(error, (key, params) => i18next.t(key, params))\n : error instanceof Error\n ? error.message\n : String(error)\n }\n }\n /**\n * Category and tags — the catalogue's, kept on the row, not in the asset. Written at once; the server's\n * refusal is shown as it gave it.\n */\n private onCatalog = async (event: Event) => {\n const patch = (event as CustomEvent).detail as { category?: string; tags?: string[] }\n const id = this.session.read().id\n if (!id || !patch) return\n try {\n const result = await updateFigure(id, patch)\n this.commandError = ''\n /* The server's answer on its state too: a category changed on a released figure made it a draft, and the badge stayed. */\n this.toldDemoted(this.row.state, result.figure.state)\n this.row = {\n ...this.row,\n category: result.figure.category ?? undefined,\n tags: result.figure.tags ?? undefined,\n ...(result.figure.state ? { state: result.figure.state as 'draft' | 'released' } : {}),\n ...(result.figure.version !== undefined ? { version: result.figure.version ?? 0 } : {})\n }\n } catch (error) {\n this.commandError = error instanceof Error ? error.message : String(error)\n }\n }\n private released = (event: Event) => {\n const figure = (event as CustomEvent).detail?.figure\n /* Keep the rest of the row: rebuilding it from these two dropped the type, and the locked type field went blank. */\n if (figure?.id && figure.id === this.session.read().id) this.row = { ...this.row, state: figure.state, version: figure.version ?? 0 }\n }\n /*\n The edits in hand saved before going back to a released version: known saved, or not -- a failure, or an outcome not\n known, holds the revert (designer 2026-09-27, Q-D1). The figure has a row here: there is no first save to ask.\n */\n private saveBeforeRevert = async (): Promise<{ ok: boolean; reason?: string }> => {\n try {\n await this.session.save()\n this.changed()\n return this.session.read().dirty ? { ok: false } : { ok: true }\n } catch (error) {\n this.changed()\n const code = (error as { code?: string })?.code\n return { ok: false, reason: code === 'SAVE_UNREACHABLE' ? i18next.t('figure.text.save-unreachable') : error instanceof Error ? error.message : String(error) }\n }\n }\n /** 과거 판으로 되돌렸으면 서버의 원본이 바뀐 것이다 — 다시 연다. 저장 안 된 것이 있으면 패널이 먼저 저장·버리기·취소를 묻는다. */\n private reverted = async () => {\n const id = this.session.read().id\n if (!id) return\n await this.session.open(id, { discard: true })\n this.changed()\n this.readRow(id)\n }\n /**\n * The dock's way in (`figure-assistant.ts`): input changes, or a proposal's commands as one step (ADR-0094). A\n * revision is applied on the version the model saw; a new figure's proposal only on a new figure not yet touched. A\n * page on a saved figure leaves a new figure's proposal untaken, and the handler opens a new figure for it.\n */\n private applyAI = (event: Event) => {\n const detail = (event as CustomEvent).detail\n if (!this.active || !detail) return\n if (takeFigureOffer(this.session, detail, { onSavedFigure: !!this.routeId, say: (key, params) => i18next.t(key, params) })) this.changed()\n }\n /*\n Reloading or closing the tab is not a move the shell asks `canDeactivate` about: a new figure not yet saved was lost\n without a word (2026-09-26). The browser's own question is the only one it allows there.\n */\n private holdUnsaved = (event: BeforeUnloadEvent) => {\n if (!this.active || !this.session.read().dirty) return\n event.preventDefault()\n event.returnValue = ''\n }\n connectedCallback() {\n super.connectedCallback()\n /* Read once: the server's category vocabulary does not change while it runs. Free text when it has none or cannot say. */\n fetchFigureCategories()\n .then(codes => (this.categories = codes))\n .catch(() => (this.categories = null))\n window.addEventListener('figure-apply', this.applyAI)\n window.addEventListener('beforeunload', this.holdUnsaved)\n }\n disconnectedCallback() {\n this.withdrawAssistant()\n window.removeEventListener('figure-apply', this.applyAI)\n window.removeEventListener('beforeunload', this.holdUnsaved)\n super.disconnectedCallback()\n }\n get addressDirty(): boolean { return this.session.read().dirty }\n\n get deactivation(): boolean | Parameters<typeof OxPrompt.open>[0] {\n const view = this.session.read()\n if (view.saving) return false\n if (!view.dirty) return true\n return {\n type: 'warning',\n title: i18next.t('figure.text.unsaved-changes'),\n text: i18next.t('figure.text.leave-without-saving'),\n confirmButton: { text: i18next.t('figure.button.leave-without-saving') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n }\n }\n\n async canDeactivate(signal?: AbortSignal): Promise<boolean> {\n const answered = askingToLeave()\n const approved = await super.canDeactivate(signal)\n answered?.(approved)\n return approved\n }\n\n discardAddressEdits(): void {\n this.discardApproved = true\n super.discardAddressEdits()\n }\n async pageUpdated(changes: Record<string, unknown>, lifecycle: { resourceId?: string }) {\n if (!this.active) {\n if (this.session.read().loading) this.session.close()\n this.withdrawAssistant()\n return\n }\n if (!this.templatesRead) {\n this.templatesRead = true\n availableRecipes(i18next.language || 'en')\n .then(templates => (this.templates = templates))\n .catch(() => (this.templatesRead = false))\n }\n const id = lifecycle?.resourceId\n if (this.session.read().context && id === this.routeId && !changes.active) return\n try {\n const discard = this.discardApproved\n this.discardApproved = false\n if (id) {\n /* The row is read after the figure opens; until then the last figure's type must not stand in the field (C2). */\n this.row = { version: 0 }\n this.typeError = ''\n const opening = this.session.open(id, { discard })\n this.changed()\n await opening\n this.readRow(id)\n } else {\n this.session.startNew({ discard })\n this.row = { version: 0 }\n this.typeError = ''\n this.takeNewFigureProposal()\n }\n this.routeId = id\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = error instanceof Error ? error.message : String(error)\n }\n }\n /** A new figure the dock opened for a proposal: its steps, applied as the new figure's first step. */\n private takeNewFigureProposal() {\n const waiting = takePendingNewFigure()\n if (!waiting) return\n const view = this.session.read()\n try {\n /* Created under the proposal's key: taken twice, it meets the first figure, never a second (ADR-0097 §5.6 item 5). */\n if (waiting.key) this.session.createUnder(waiting.key)\n this.session.applyProposal(waiting.steps, view.revision!, view.context!, waiting.key)\n waiting.settle({ applied: true })\n } catch (error) {\n waiting.settle({ applied: false, code: (error as { code?: string })?.code, error: error instanceof Error ? error.message : String(error) })\n }\n }\n /** The first save's question, over the names this domain already uses. */\n private askFirstSave = async (name: string): Promise<FirstSave | undefined> => {\n const [taken, namespaces] = await Promise.all([\n fetchFigureTypeNames().catch(() => [] as string[]),\n fetchFigureNamespaces()\n .then(all => all.filter(namespace => namespace.state === 'active'))\n .catch(() => [])\n ])\n const answer = await openPopup<FirstSave>(html`<figure-first-save .type=${this.row.type ?? ''} .name=${name} .taken=${taken} .namespaces=${namespaces}></figure-first-save>`, {\n backdrop: true,\n size: 'small',\n title: i18next.t('figure.title.save-new-figure')\n }).result\n /* Kept: a first save that failed opens again on the same identifier, not a new draw (ADR-0097 §5.6, Q-D3). */\n if (answer) this.row = { ...this.row, type: answer.type }\n return answer\n }\n get context() {\n const view = this.session.read()\n return {\n title: view.name ?? 'Figure',\n /*\n A figure that has an id was opened from the catalog (or saved there), so the rail marks the catalog. Without this\n the rail matches the page name and marks \"new figure\" while an existing one is being edited.\n */\n menu: view.id ? 'figure-list' : undefined,\n /* The canvas needs the width: the rail folds while the modeller is open and comes back as it was on leaving. */\n rail: 'collapsed',\n actions: [],\n /*\n No heading line: the canvas is what this page is for, and the name is already in the properties' first section\n (and the browser tab). The title stays, not emptied, because the MDI tab reads it too -- the heading is switched\n off where it is drawn (`ox-page-title-bar`).\n */\n heading: false\n }\n }\n render() {\n if (this.error) return html`<p role=\"alert\" class=\"error\">${this.error}</p>`\n const view = this.session.read()\n /* A new figure's third way to start: the app's assistant dock, with a request put in its input for the author to finish and send (B, U04). */\n return html`<figure-editor .session=${this.session} .releaseState=${this.row} .releaseBlockers=${this.releaseBlockers} .templates=${this.templates} .guideOf=${this.guideOf} .thumbnailOf=${this.thumbnailOf} .firstSave=${this.askFirstSave} .revision=${this.revision} .budget=${this.budget} aiDraft @ask-ai-draft=${() => askAssistant({ draft: i18next.t('figure.text.ai-draft-request') })} @changed=${this.changed}>\n ${this.commandError ? html`<p slot=\"notice\" fit-error role=\"alert\">${this.commandError}</p>` : ''}\n <figure-properties\n slot=\"figure\"\n .revision=${this.session.revisionNow()}\n .figureId=${view.id}\n .figureCategory=${this.row.category}\n .figureCategories=${this.categories}\n .figureTags=${this.row.tags}\n @command=${this.onCommand}\n @catalog=${this.onCatalog}\n >\n <label slot=\"type\" type-field>\n <span>${i18next.t('figure.label.figure-identifier')}</span>\n ${this.row.version > 0\n ? html`<code>${this.row.type}</code><small>${i18next.t('figure.text.type-name-cannot-change')}</small>`\n : html`<input\n .value=${this.row.type ?? ''}\n placeholder=${i18next.t('figure.text.figure-type-placeholder')}\n @change=${this.renameType}\n />`}\n ${this.typeError ? html`<small role=\"alert\">${this.typeError}</small>` : ''}\n </label>\n </figure-properties>\n <figure-verdict\n slot=\"verdict\"\n .revision=${this.session.revisionNow()}\n .figureId=${view.id}\n .figureType=${this.row.type}\n @capacity-changed=${(event: CustomEvent) => {\n this.budget = event.detail.budget\n }}\n @fit-base-to-parts=${this.fitToParts}\n @release-verdict=${(event: CustomEvent<{ blocking: FigureGateFinding[] }>) => (this.releaseBlockers = event.detail.blocking)}\n ></figure-verdict>\n <figure-history-panel\n slot=\"history\"\n .figureId=${view.id}\n .figureState=${this.row.state}\n .figureVersion=${this.row.version}\n .figureType=${this.row.type}\n .figureNamespace=${this.row.namespace}\n .dirty=${!!view.dirty}\n .saveFirst=${this.saveBeforeRevert}\n .serverSource=${() => this.session.confirmedSource()}\n @fit-base-to-parts=${this.fitToParts}\n @figure-released=${this.released}\n @figure-reverted=${this.reverted}\n ></figure-history-panel>\n </figure-editor>`\n }\n\n}\n"]}
1
+ {"version":3,"file":"figure-modeller-page.js","sourceRoot":"","sources":["../../client/pages/figure-modeller-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACnI,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAI5E,OAAO,uBAAuB,CAAA;AAC9B,OAAO,4BAA4B,CAAA;AACnC,OAAO,qCAAqC,CAAA;AAC5C,OAAO,+BAA+B,CAAA;AACtC,OAAO,kCAAkC,CAAA;AAGzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAA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KAAqD,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;;;;oBAIhH,IAAI,CAAC,EAAE;uBACJ,IAAI,CAAC,GAAG,CAAC,KAAK;yBACZ,IAAI,CAAC,GAAG,CAAC,OAAO;sBACnB,IAAI,CAAC,GAAG,CAAC,IAAI;2BACR,IAAI,CAAC,GAAG,CAAC,SAAS;iBAC5B,CAAC,CAAC,IAAI,CAAC,KAAK;qBACR,IAAI,CAAC,gBAAgB;wBAClB,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;2BACjC,IAAI,CAAC,QAAQ;2BACb,IAAI,CAAC,QAAQ;;qBAEnB,CAAA;IACnB,CAAC;;AA5bgB;IAAhB,KAAK,EAAE;;oDAAqB;AAEZ;IAAhB,KAAK,EAAE;;qDAAyC;AAKhC;IAAhB,KAAK,EAAE;;iDAAmB;AASV;IAAhB,KAAK,EAAE;;sDAA2C;AAClC;IAAhB,KAAK,EAAE;;+CAEP;AACgB;IAAhB,KAAK,EAAE;;qDAAuB;AAEd;IAAhB,KAAK,EAAE;;wDAA0B;AAEjB;IAAhB,KAAK,EAAE;;2DAAkD;AACzC;IAAhB,KAAK,EAAE;;kDAAkC;AA1G/B,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA+gB9B","sourcesContent":["import { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { navigate, PageView } from '@operato/shell'\nimport { getPathInfo } from '@operato/utils'\nimport { modellerPathOf } from '../modeller/modeller-route.js'\nimport { createFigureProductSession } from '../modeller/product-session.js'\nimport { figureProductStore } from '../graphql/store.js'\nimport { i18next } from '@operato/i18n'\nimport { fetchFigure, fetchFigureCategories, fetchFigureNamespaces, fetchFigureTypeNames, updateFigure } from '../graphql/index.js'\nimport { figureProposalOutcome } from '../figure-assistant.js'\nimport { availableRecipes, recipeGuide } from '../modeller/recipe-source.js'\nimport type { RecipeTemplate } from '../modeller/recipes.js'\nimport type { FigureAuthoringAction } from '@hatiolab/figure-model'\nimport type { FigureGateFinding } from '../types.js'\nimport '../modeller/editor.js'\nimport '@material/web/icon/icon.js'\nimport '../modeller/figure-history-panel.js'\nimport '../modeller/figure-verdict.js'\nimport '../modeller/figure-properties.js'\nimport type { FigureBudgetLine } from '../modeller/maturity.js'\nimport { OxPrompt } from '@operato/popup'\nimport { notify, openPopup } from '@operato/layout'\nimport '../modeller/figure-first-save.js'\nimport { activePalette } from '@hatiolab/things-scene'\nimport {\n askAssistant,\n clearAssistantSurface,\n notifyAssistantSurface,\n provideAssistantSurface\n} from '@things-factory/ai-assistant/dist-client/index.js'\nimport type { FirstSave } from '../modeller/first-save.js'\nimport { typeOf } from '../modeller/first-save.js'\nimport { editRefusalOf } from '../modeller/refusals.js'\nimport { askingToLeave, takeFigureOffer, takePendingNewFigure } from '../modeller/ai-proposal.js'\n\n/**\n * The product page has exactly one authoritative workspace for UI and AI input transactions.\n *\n * The one modeller since ADR-0087 step 5 (2026-09-24): it answers to `figure-modeller`, and to `figure-modeller`\n * as an alias for links made before the switch.\n */\n@customElement('figure-modeller-page')\nexport class FigureModellerPage extends PageView {\n static styles = css`\n :host {\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n /*\n The page must fit the width it is given. Without this the shell sizes it to its content — the editor's\n 660 plus the 320 release panel — and the panel runs off the right edge (seen at 945 px, 2026-09-24).\n */\n overflow: hidden;\n }\n figure-editor {\n flex: 1;\n min-width: 0;\n min-height: 0;\n }\n /*\n The first field of the properties tab, in the side panel's look (side-panel-styles): its label and its field on one\n line, the field a line under its value. It is slotted into the figure panel, so the panel's measures reach it by\n inheritance.\n */\n label[type-field] {\n display: grid;\n grid-template-columns: var(--figure-label-width, 72px) minmax(0, 1fr);\n align-items: center;\n gap: 4px 8px;\n margin: 0;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-on-surface-variant);\n }\n label[type-field] > :not(span) {\n grid-column: 2;\n }\n label[type-field] input,\n label[type-field] code {\n box-sizing: border-box;\n min-height: var(--figure-control-height, 26px);\n padding: 2px 2px;\n font-family: var(--ui-mono, ui-monospace, monospace);\n font-size: var(--ui-t-small, 11.5px);\n line-height: calc(var(--figure-control-height, 26px) - 6px);\n color: var(--md-sys-color-on-surface);\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n /* Fixed once released: its value with no line under it, read not edited. */\n label[type-field] code {\n border-bottom-color: transparent;\n }\n label[type-field] input:hover:not(:focus) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n label[type-field] input:focus {\n outline: none;\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n label[type-field] small {\n color: var(--md-sys-color-on-surface-variant);\n }\n p[fit-error] {\n margin: 0;\n padding: 8px 12px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-error);\n }\n label[type-field] small[role='alert'] {\n color: var(--md-sys-color-error);\n }\n .error {\n padding: 16px;\n color: var(--md-sys-color-error);\n }\n `\n private readonly session = createFigureProductSession(figureProductStore)\n private routeId: string | undefined\n private discardApproved = false\n @state() private revision = 0\n /** The recipe templates (ADR-0095), read once when the page is first shown; none read, and the section is not drawn. */\n @state() private templates: RecipeTemplate[] = []\n private templatesRead = false\n private guideOf = (name: string) => recipeGuide(name, i18next.language || 'en')\n /* The domain part of the address is read the way the shell reads it (figure-thumb does the same). */\n private thumbnailOf = (name: string) => `${getPathInfo(location.pathname).contextPath}/figure-recipe-thumbnail/${name}`\n @state() private error = ''\n /**\n * 발행 패널이 읽는 행의 사실 — 상태와 발행 판 번호. 원본은 세션이 들고, 이 둘은 행에 있다.\n *\n * 이 화면에는 발행 패널이 없었다. 저장은 되고 발행 · 판본 · 복원 · 판정을 볼 자리가 없어서, ADR-0087 5단계에서\n * `figure-modeller` 가 이 화면으로 바뀌면 저작자는 발행을 할 수 없었다. 새 도형은 공간을 선언하기 전에는 전부\n * 발행 판정에 막히는데 그 선언을 할 단추도 없었다(2026-09-24 확인). 그래서 발행 패널을 건다.\n */\n /** The categories the server allows, or null when a category is free text (G5). */\n @state() private categories: string[] | null = null\n @state() private row: { state?: 'draft' | 'released'; version: number; namespace?: string; type?: string; category?: string; tags?: string[] } = {\n version: 0\n }\n @state() private typeError = ''\n /** Why a command from the side did nothing. Shown beside the tabs — the editor stays, since nothing in it was lost. */\n @state() private commandError = ''\n /** What the verdict says blocks release now, handed to the editor's bar. */\n @state() private releaseBlockers: FigureGateFinding[] = []\n @state() private budget?: FigureBudgetLine\n private wasDirty = false\n private titled?: string | null\n /** The figure the AI dock was last told about - another id is another conversation. */\n private assistantFor?: string\n /*\n The figure on screen is what the AI dock talks about (design/ai/shared-dock.md §3). A figure not saved yet is named\n by its creation id, the id its first save inserts the row under (ADR-0061 decision 3, ADR-0072 decision 6): the\n anchor is the same before and after that save, so the conversation goes on, with nothing to bind again.\n The draft is read at the moment of sending, never cached - the dock must not answer about a shape already changed.\n */\n private provideAssistant = () => {\n const view = this.session.read()\n if (!this.active || view.loading || view.error || !view.context) return\n const id = view.id ?? view.creationId\n if (!id) {\n this.withdrawAssistant()\n return\n }\n if (this.assistantFor === id) {\n notifyAssistantSurface(this)\n return\n }\n this.assistantFor = id\n provideAssistantSurface(this, {\n key: `figure:${id}`,\n subject: 'figure',\n icon: 'category',\n label: () => this.session.read().name || id,\n detail: () => (this.session.read().dirty ? i18next.t('figure.text.unsaved-changes') : ''),\n anchor: () => ({ anchorType: 'figure', anchorId: id }),\n /* The card's \"check the result\": the server's record, never the dock's memory; nothing is applied again. */\n proposalOutcome: figureProposalOutcome,\n hostContext: () => ({\n surface: 'figure-modeller',\n editorMode: this.session.read().id ? 'existing' : 'new',\n figureId: id,\n draftSource: JSON.parse(this.session.source()),\n /* The version the model sees; a proposal is applied on it, or refused if the figure moved on (ADR-0094). */\n context: this.session.read().context,\n revision: this.session.read().revision,\n palette: Object.keys(activePalette()),\n ...this.assistantFocus()\n })\n })\n }\n /**\n * The part selected and what the preview is trying, with the version they were seen on (ADR-0097 §5.6 item 5). Read\n * when a request is sent; selecting is not a new subject, so the dock is not told about it and the conversation stays.\n */\n private assistantFocus() {\n const focus = this.renderRoot.querySelector<HTMLElement & { assistantFocus?: () => { part?: string; trying?: object } }>('figure-editor')?.assistantFocus?.() ?? {}\n const { context, revision } = this.session.read()\n return {\n ...(focus.part ? { selection: { part: focus.part, context, revision } } : {}),\n ...(focus.trying ? { trying: { ...focus.trying, context, revision } } : {})\n }\n }\n private withdrawAssistant() {\n this.assistantFor = undefined\n clearAssistantSurface(this)\n }\n private changed = () => {\n this.revision++\n /* Any edit after a failed command makes the message stale — the author has done something about it. */\n this.commandError = ''\n const view = this.session.read()\n /* The title bar reads the name through `context`, which the shell asks for only when told — a rename left it stale. */\n if (view.name !== this.titled) {\n this.titled = view.name\n this.updateContext()\n }\n if (!view.saving) this.provideAssistant()\n /*\n A new figure's first save gives it an id: the address becomes the figure's own, in place of the history entry.\n Left at the bare modeller address, opening the modeller again from the menu was taken for the same page and kept\n the saved figure -- its type showing where a new figure's was expected (2026-09-25).\n */\n if (view.id && !this.routeId && !view.saving) {\n this.routeId = view.id\n navigate(modellerPathOf({ id: view.id }), true)\n }\n /* 저장이 끝난 순간 행을 다시 읽는다 — 발행된 도형을 고쳐 저장하면 서버가 초안으로 내린다. */\n if (this.wasDirty && !view.dirty && !view.saving && view.id) this.readRow(view.id)\n this.wasDirty = !!view.dirty\n }\n /*\n A released figure changed on the server -- its source saved, or its category or tags -- comes back a draft, and a\n board keeps the released version until it is released again. Said when it happens (D, designer 2026-09-27), not left\n to a badge in the history tab.\n */\n /* True of what boards read: `figureBlueprint` answers a draft row with its latest released version (releasedSourceOf). */\n private toldDemoted(before: string | undefined, after: string | undefined) {\n if (before === 'released' && after === 'draft') notify({ level: 'info', message: i18next.t('figure.text.released-now-draft') })\n }\n private async readRow(id: string) {\n try {\n const figure = await fetchFigure(id)\n if (this.session.read().id === id) this.toldDemoted(this.row.state, figure.state)\n if (this.session.read().id === id)\n this.row = {\n state: figure.state as 'draft' | 'released',\n version: figure.version ?? 0,\n namespace: figure.namespace ?? undefined,\n type: figure.type,\n category: figure.category ?? undefined,\n tags: figure.tags ?? undefined\n }\n } catch {\n /* 행을 못 읽으면 패널은 판 번호 0 으로 보인다 — 발행 문이 서버에서 다시 판단하므로 여기서 지어내지 않는다. */\n }\n }\n /**\n * 타입을 정한다 — 보드가 도형을 부르는 이름이고, 발행하면 굳는다(ADR-0063 결정 4).\n *\n * 새 도형은 저장할 때 임시 타입을 받는데, 이 화면에는 그것을 바꿀 칸이 없어서 임시 타입 그대로 발행됐다.\n * 행만 바뀐다 — 자산은 타입을 원본에 적지 않으므로(적으면 형식이 거절한다) 편집 중인 원본과 부딪히지 않는다.\n * 서버의 거절(이미 쓰는 타입 · 발행 뒤)은 그 문장 그대로 칸 아래에 둔다.\n */\n private renameType = async (event: Event) => {\n const input = event.target as HTMLInputElement\n const id = this.session.read().id\n const wanted = typeOf(input.value)\n input.value = wanted\n /*\n A figure not saved yet has no row to rename: the type is held here and the first save's question opens with it.\n The field was disabled until the first save, so a type typed there went nowhere and was asked for again\n (2026-09-25).\n */\n if (!id) {\n this.row = { ...this.row, type: wanted || undefined }\n return\n }\n if (!wanted || wanted === this.row.type) return\n try {\n const result = await updateFigure(id, { type: wanted })\n this.typeError = ''\n this.row = { ...this.row, type: result.figure.type }\n } catch (error) {\n this.typeError = error instanceof Error ? error.message : String(error)\n input.value = this.row.type ?? ''\n }\n }\n /** A command from the properties tab — rename, the mounting face. */\n private onCommand = (event: Event) => {\n const action = (event as CustomEvent).detail?.action as FigureAuthoringAction | undefined\n if (action) this.runCommand(() => action)\n }\n /**\n * One step of the session's history, whichever part of the side asked for it — so undo takes it back like any\n * other edit, and it is saved with the figure.\n */\n private runCommand(actionOf: () => FigureAuthoringAction) {\n try {\n this.session.command(actionOf())\n this.commandError = ''\n this.changed()\n } catch (error) {\n /* Said in the author's words beside the side panel, not as the page error that replaces the whole editor. */\n this.commandError = (error as { code?: string })?.code\n ? editRefusalOf(error, (key, params) => i18next.t(key, params))\n : error instanceof Error\n ? error.message\n : String(error)\n }\n }\n /**\n * Category and tags — the catalogue's, kept on the row, not in the asset. Written at once; the server's\n * refusal is shown as it gave it.\n */\n private onCatalog = async (event: Event) => {\n const patch = (event as CustomEvent).detail as { category?: string; tags?: string[] }\n const id = this.session.read().id\n if (!id || !patch) return\n try {\n const result = await updateFigure(id, patch)\n this.commandError = ''\n /* The server's answer on its state too: a category changed on a released figure made it a draft, and the badge stayed. */\n this.toldDemoted(this.row.state, result.figure.state)\n this.row = {\n ...this.row,\n category: result.figure.category ?? undefined,\n tags: result.figure.tags ?? undefined,\n ...(result.figure.state ? { state: result.figure.state as 'draft' | 'released' } : {}),\n ...(result.figure.version !== undefined ? { version: result.figure.version ?? 0 } : {})\n }\n } catch (error) {\n this.commandError = error instanceof Error ? error.message : String(error)\n }\n }\n private released = (event: Event) => {\n const figure = (event as CustomEvent).detail?.figure\n /* Keep the rest of the row: rebuilding it from these two dropped the type, and the locked type field went blank. */\n if (figure?.id && figure.id === this.session.read().id) this.row = { ...this.row, state: figure.state, version: figure.version ?? 0 }\n }\n /*\n The edits in hand saved before going back to a released version: known saved, or not -- a failure, or an outcome not\n known, holds the revert (designer 2026-09-27, Q-D1). The figure has a row here: there is no first save to ask.\n */\n private saveBeforeRevert = async (): Promise<{ ok: boolean; reason?: string }> => {\n try {\n await this.session.save()\n this.changed()\n return this.session.read().dirty ? { ok: false } : { ok: true }\n } catch (error) {\n this.changed()\n const code = (error as { code?: string })?.code\n return { ok: false, reason: code === 'SAVE_UNREACHABLE' ? i18next.t('figure.text.save-unreachable') : error instanceof Error ? error.message : String(error) }\n }\n }\n /** 과거 판으로 되돌렸으면 서버의 원본이 바뀐 것이다 — 다시 연다. 저장 안 된 것이 있으면 패널이 먼저 저장·버리기·취소를 묻는다. */\n private reverted = async () => {\n const id = this.session.read().id\n if (!id) return\n await this.session.open(id, { discard: true })\n this.changed()\n this.readRow(id)\n }\n /**\n * The dock's way in (`figure-assistant.ts`): input changes, or a proposal's commands as one step (ADR-0094). A\n * revision is applied on the version the model saw; a new figure's proposal only on a new figure not yet touched. A\n * page on a saved figure leaves a new figure's proposal untaken, and the handler opens a new figure for it.\n */\n private applyAI = (event: Event) => {\n const detail = (event as CustomEvent).detail\n if (!this.active || !detail) return\n if (takeFigureOffer(this.session, detail, { onSavedFigure: !!this.routeId, say: (key, params) => i18next.t(key, params) })) this.changed()\n }\n /*\n Reloading or closing the tab is not a move the shell asks `canDeactivate` about: a new figure not yet saved was lost\n without a word (2026-09-26). The browser's own question is the only one it allows there.\n */\n private holdUnsaved = (event: BeforeUnloadEvent) => {\n if (!this.active || !this.session.read().dirty) return\n event.preventDefault()\n event.returnValue = ''\n }\n connectedCallback() {\n super.connectedCallback()\n /* Read once: the server's category vocabulary does not change while it runs. Free text when it has none or cannot say. */\n fetchFigureCategories()\n .then(codes => (this.categories = codes))\n .catch(() => (this.categories = null))\n window.addEventListener('figure-apply', this.applyAI)\n window.addEventListener('beforeunload', this.holdUnsaved)\n }\n disconnectedCallback() {\n this.withdrawAssistant()\n window.removeEventListener('figure-apply', this.applyAI)\n window.removeEventListener('beforeunload', this.holdUnsaved)\n super.disconnectedCallback()\n }\n get addressDirty(): boolean { return this.session.read().dirty }\n\n get deactivation(): boolean | Parameters<typeof OxPrompt.open>[0] {\n const view = this.session.read()\n if (view.saving) return false\n if (!view.dirty) return true\n return {\n type: 'warning',\n title: i18next.t('figure.text.unsaved-changes'),\n text: i18next.t('figure.text.leave-without-saving'),\n confirmButton: { text: i18next.t('figure.button.leave-without-saving') },\n cancelButton: { text: i18next.t('figure.button.keep-editing') }\n }\n }\n\n async canDeactivate(signal?: AbortSignal): Promise<boolean> {\n const answered = askingToLeave()\n const approved = await super.canDeactivate(signal)\n answered?.(approved)\n return approved\n }\n\n discardAddressEdits(): void {\n this.discardApproved = true\n super.discardAddressEdits()\n }\n async pageUpdated(changes: Record<string, unknown>, lifecycle: { resourceId?: string }) {\n if (!this.active) {\n if (this.session.read().loading) this.session.close()\n this.withdrawAssistant()\n return\n }\n if (!this.templatesRead) {\n this.templatesRead = true\n availableRecipes(i18next.language || 'en')\n .then(templates => (this.templates = templates))\n .catch(() => (this.templatesRead = false))\n }\n const id = lifecycle?.resourceId\n if (this.session.read().context && id === this.routeId && !changes.active) return\n try {\n const discard = this.discardApproved\n this.discardApproved = false\n if (id) {\n /* The row is read after the figure opens; until then the last figure's type must not stand in the field (C2). */\n this.row = { version: 0 }\n this.typeError = ''\n const opening = this.session.open(id, { discard })\n this.changed()\n await opening\n this.readRow(id)\n } else {\n this.session.startNew({ discard })\n this.row = { version: 0 }\n this.typeError = ''\n this.takeNewFigureProposal()\n }\n this.routeId = id\n this.error = ''\n this.changed()\n } catch (error) {\n this.error = error instanceof Error ? error.message : String(error)\n }\n }\n /** A new figure the dock opened for a proposal: its steps, applied as the new figure's first step. */\n private takeNewFigureProposal() {\n const waiting = takePendingNewFigure()\n if (!waiting) return\n const view = this.session.read()\n try {\n /* Created under the proposal's key: taken twice, it meets the first figure, never a second (ADR-0097 §5.6 item 5). */\n if (waiting.key) this.session.createUnder(waiting.key)\n this.session.applyProposal(waiting.steps, view.revision!, view.context!, waiting.key)\n waiting.settle({ applied: true })\n } catch (error) {\n waiting.settle({ applied: false, code: (error as { code?: string })?.code, error: error instanceof Error ? error.message : String(error) })\n }\n }\n /** The first save's question, over the names this domain already uses. */\n private askFirstSave = async (name: string): Promise<FirstSave | undefined> => {\n const [taken, namespaces] = await Promise.all([\n fetchFigureTypeNames().catch(() => [] as string[]),\n fetchFigureNamespaces()\n .then(all => all.filter(namespace => namespace.state === 'active'))\n .catch(() => [])\n ])\n const answer = await openPopup<FirstSave>(html`<figure-first-save .type=${this.row.type ?? ''} .name=${name} .taken=${taken} .namespaces=${namespaces}></figure-first-save>`, {\n backdrop: true,\n size: 'small',\n title: i18next.t('figure.title.save-new-figure')\n }).result\n /* Kept: a first save that failed opens again on the same identifier, not a new draw (ADR-0097 §5.6, Q-D3). */\n if (answer) this.row = { ...this.row, type: answer.type }\n return answer\n }\n get context() {\n const view = this.session.read()\n return {\n title: view.name ?? 'Figure',\n /*\n A figure that has an id was opened from the catalog (or saved there), so the rail marks the catalog. Without this\n the rail matches the page name and marks \"new figure\" while an existing one is being edited.\n */\n menu: view.id ? 'figure-list' : undefined,\n /* The canvas needs the width: the rail folds while the modeller is open and comes back as it was on leaving. */\n rail: 'collapsed',\n actions: [],\n /*\n No heading line: the canvas is what this page is for, and the name is already in the properties' first section\n (and the browser tab). The title stays, not emptied, because the MDI tab reads it too -- the heading is switched\n off where it is drawn (`ox-page-title-bar`).\n */\n heading: false\n }\n }\n render() {\n if (this.error) return html`<p role=\"alert\" class=\"error\">${this.error}</p>`\n const view = this.session.read()\n /* A new figure's third way to start: the app's assistant dock, with a request put in its input for the author to finish and send (B, U04). */\n return html`<figure-editor .session=${this.session} .releaseState=${this.row} .releaseBlockers=${this.releaseBlockers} .templates=${this.templates} .guideOf=${this.guideOf} .thumbnailOf=${this.thumbnailOf} .firstSave=${this.askFirstSave} .revision=${this.revision} .budget=${this.budget} aiDraft @ask-ai-draft=${() => askAssistant({ draft: i18next.t('figure.text.ai-draft-request') })} @changed=${this.changed}>\n ${this.commandError ? html`<p slot=\"notice\" fit-error role=\"alert\">${this.commandError}</p>` : ''}\n <figure-properties\n slot=\"figure\"\n .revision=${this.session.revisionNow()}\n .figureId=${view.id}\n .figureCategory=${this.row.category}\n .figureCategories=${this.categories}\n .figureTags=${this.row.tags}\n @command=${this.onCommand}\n @catalog=${this.onCatalog}\n >\n <label slot=\"type\" type-field>\n <span>${i18next.t('figure.label.figure-identifier')}</span>\n ${this.row.version > 0\n ? html`<code>${this.row.type}</code><small>${i18next.t('figure.text.type-name-cannot-change')}</small>`\n : html`<input\n .value=${this.row.type ?? ''}\n placeholder=${i18next.t('figure.text.figure-type-placeholder')}\n @change=${this.renameType}\n />`}\n ${this.typeError ? html`<small role=\"alert\">${this.typeError}</small>` : ''}\n </label>\n </figure-properties>\n <figure-verdict\n slot=\"verdict\"\n .revision=${this.session.revisionNow()}\n .figureId=${view.id}\n .figureType=${this.row.type}\n @capacity-changed=${(event: CustomEvent) => {\n this.budget = event.detail.budget\n }}\n @release-verdict=${(event: CustomEvent<{ blocking: FigureGateFinding[] }>) => (this.releaseBlockers = event.detail.blocking)}\n ></figure-verdict>\n <figure-history-panel\n slot=\"history\"\n .figureId=${view.id}\n .figureState=${this.row.state}\n .figureVersion=${this.row.version}\n .figureType=${this.row.type}\n .figureNamespace=${this.row.namespace}\n .dirty=${!!view.dirty}\n .saveFirst=${this.saveBeforeRevert}\n .serverSource=${() => this.session.confirmedSource()}\n @figure-released=${this.released}\n @figure-reverted=${this.reverted}\n ></figure-history-panel>\n </figure-editor>`\n }\n\n}\n"]}
@@ -1 +1 @@
1
- export default function route(page: string): "figure-list" | "figure-modeller" | "figure-public-list" | undefined;
1
+ export default function route(page: string): "figure-modeller" | "figure-list" | "figure-public-list" | undefined;