@things-factory/figure-ui 10.1.75 → 10.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/figure-assistant.ts +3 -3
- package/client/graphql/{v3-store.ts → store.ts} +6 -6
- package/client/modeller/{v3-ai-proposal.ts → ai-proposal.ts} +8 -8
- package/client/modeller/{v3-align.ts → align.ts} +14 -14
- package/client/modeller/{v3-canvas.ts → canvas.ts} +13 -13
- package/client/modeller/{v3-clips.ts → clips.ts} +5 -5
- package/client/modeller/{v3-controls.ts → controls.ts} +2 -2
- package/client/modeller/{v3-editor.ts → editor.ts} +117 -117
- package/client/modeller/{figure-v3-capability.ts → figure-capability-panel.ts} +7 -7
- package/client/modeller/{figure-v3-clips.ts → figure-clips.ts} +10 -10
- package/client/modeller/{figure-v3-controls.ts → figure-controls.ts} +9 -9
- package/client/modeller/{v3-figure-facts.ts → figure-facts.ts} +11 -11
- package/client/modeller/{figure-v3-first-save.ts → figure-first-save.ts} +3 -3
- package/client/modeller/figure-history-panel.ts +1 -1
- package/client/modeller/{figure-v3-links.ts → figure-links.ts} +35 -35
- package/client/modeller/{figure-v3-material.ts → figure-material-panel.ts} +20 -20
- package/client/modeller/{figure-v3-parts.ts → figure-parts.ts} +15 -15
- package/client/modeller/{figure-v3-preview.ts → figure-preview.ts} +14 -14
- package/client/modeller/{figure-v3-properties.ts → figure-properties.ts} +25 -25
- package/client/modeller/{figure-v3-recipe-catalog.ts → figure-recipe-catalog.ts} +10 -10
- package/client/modeller/{figure-v3-verdict.ts → figure-verdict.ts} +24 -24
- package/client/modeller/gate-findings.ts +2 -2
- package/client/modeller/{v3-gizmo.ts → gizmo.ts} +11 -11
- package/client/modeller/{v3-joint-drag.ts → joint-drag.ts} +11 -11
- package/client/modeller/{v3-joint-fan.ts → joint-fan.ts} +13 -13
- package/client/modeller/{v3-links.ts → links.ts} +59 -59
- package/client/modeller/{v3-live.ts → live.ts} +9 -9
- package/client/modeller/{v3-maturity.ts → maturity.ts} +65 -65
- package/client/modeller/modeller-route.ts +1 -1
- package/client/modeller/{v3-occupancy.ts → occupancy.ts} +6 -6
- package/client/modeller/{v3-palette.ts → palette.ts} +3 -3
- package/client/modeller/{v3-preview-model.ts → preview-model.ts} +8 -8
- package/client/modeller/{v3-product-session.ts → product-session.ts} +25 -25
- package/client/modeller/{v3-recipe-source.ts → recipe-source.ts} +2 -2
- package/client/modeller/{v3-recipes.ts → recipes.ts} +9 -9
- package/client/modeller/{v3-renderer.ts → renderer.ts} +16 -16
- package/client/modeller/{v3-stage-model.ts → stage-model.ts} +15 -15
- package/client/modeller/{v3-thumbnail.ts → thumbnail.ts} +8 -8
- package/client/pages/figure-list-page.ts +4 -4
- package/client/pages/{figure-v3-modeller-page.ts → figure-modeller-page.ts} +37 -37
- package/client/route.ts +1 -5
- package/dist-client/figure-assistant.js +3 -3
- package/dist-client/figure-assistant.js.map +1 -1
- package/dist-client/graphql/store.d.ts +3 -0
- package/dist-client/graphql/{v3-store.js → store.js} +6 -6
- package/dist-client/graphql/store.js.map +1 -0
- package/dist-client/modeller/{v3-ai-proposal.d.ts → ai-proposal.d.ts} +7 -7
- package/dist-client/modeller/{v3-ai-proposal.js → ai-proposal.js} +1 -1
- package/dist-client/modeller/ai-proposal.js.map +1 -0
- package/dist-client/modeller/{v3-align.d.ts → align.d.ts} +8 -8
- package/dist-client/modeller/{v3-align.js → align.js} +6 -6
- package/dist-client/modeller/align.js.map +1 -0
- package/dist-client/modeller/{v3-canvas.d.ts → canvas.d.ts} +7 -7
- package/dist-client/modeller/{v3-canvas.js → canvas.js} +20 -20
- package/dist-client/modeller/canvas.js.map +1 -0
- package/dist-client/modeller/{v3-clips.d.ts → clips.d.ts} +4 -4
- package/dist-client/modeller/{v3-clips.js → clips.js} +1 -1
- package/dist-client/modeller/clips.js.map +1 -0
- package/dist-client/modeller/{v3-controls.d.ts → controls.d.ts} +2 -2
- package/dist-client/modeller/{v3-controls.js → controls.js} +1 -1
- package/dist-client/modeller/controls.js.map +1 -0
- package/dist-client/modeller/{v3-editor.d.ts → editor.d.ts} +19 -19
- package/dist-client/modeller/{v3-editor.js → editor.js} +103 -103
- package/dist-client/modeller/editor.js.map +1 -0
- package/dist-client/modeller/{v3-fields.js → fields.js} +1 -1
- package/dist-client/modeller/fields.js.map +1 -0
- package/dist-client/modeller/{figure-v3-capability.d.ts → figure-capability-panel.d.ts} +4 -4
- package/dist-client/modeller/{figure-v3-capability.js → figure-capability-panel.js} +12 -12
- package/dist-client/modeller/figure-capability-panel.js.map +1 -0
- package/dist-client/modeller/{figure-v3-clips.d.ts → figure-clips.d.ts} +4 -4
- package/dist-client/modeller/{figure-v3-clips.js → figure-clips.js} +16 -16
- package/dist-client/modeller/figure-clips.js.map +1 -0
- package/dist-client/modeller/{figure-v3-controls.d.ts → figure-controls.d.ts} +5 -5
- package/dist-client/modeller/{figure-v3-controls.js → figure-controls.js} +16 -16
- package/dist-client/modeller/figure-controls.js.map +1 -0
- package/dist-client/modeller/{v3-figure-facts.d.ts → figure-facts.d.ts} +5 -5
- package/dist-client/modeller/{v3-figure-facts.js → figure-facts.js} +5 -5
- package/dist-client/modeller/figure-facts.js.map +1 -0
- package/dist-client/modeller/{figure-v3-first-save.d.ts → figure-first-save.d.ts} +1 -1
- package/dist-client/modeller/{figure-v3-first-save.js → figure-first-save.js} +11 -11
- package/dist-client/modeller/figure-first-save.js.map +1 -0
- package/dist-client/modeller/figure-history-panel.d.ts +1 -1
- package/dist-client/modeller/figure-history-panel.js.map +1 -1
- package/dist-client/modeller/{figure-v3-links.d.ts → figure-links.d.ts} +5 -5
- package/dist-client/modeller/{figure-v3-links.js → figure-links.js} +24 -24
- package/dist-client/modeller/figure-links.js.map +1 -0
- package/dist-client/modeller/{figure-v3-material.d.ts → figure-material-panel.d.ts} +9 -9
- package/dist-client/modeller/{figure-v3-material.js → figure-material-panel.js} +19 -19
- package/dist-client/modeller/figure-material-panel.js.map +1 -0
- package/dist-client/modeller/{figure-v3-parts.d.ts → figure-parts.d.ts} +12 -12
- package/dist-client/modeller/{figure-v3-parts.js → figure-parts.js} +14 -14
- package/dist-client/modeller/figure-parts.js.map +1 -0
- package/dist-client/modeller/{figure-v3-preview.d.ts → figure-preview.d.ts} +4 -4
- package/dist-client/modeller/{figure-v3-preview.js → figure-preview.js} +21 -21
- package/dist-client/modeller/figure-preview.js.map +1 -0
- package/dist-client/modeller/{figure-v3-properties.d.ts → figure-properties.d.ts} +8 -8
- package/dist-client/modeller/{figure-v3-properties.js → figure-properties.js} +25 -25
- package/dist-client/modeller/figure-properties.js.map +1 -0
- package/dist-client/modeller/{figure-v3-recipe-catalog.d.ts → figure-recipe-catalog.d.ts} +4 -4
- package/dist-client/modeller/{figure-v3-recipe-catalog.js → figure-recipe-catalog.js} +21 -21
- package/dist-client/modeller/figure-recipe-catalog.js.map +1 -0
- package/dist-client/modeller/{figure-v3-verdict.d.ts → figure-verdict.d.ts} +2 -2
- package/dist-client/modeller/{figure-v3-verdict.js → figure-verdict.js} +26 -26
- package/dist-client/modeller/figure-verdict.js.map +1 -0
- package/dist-client/modeller/{v3-first-save.js → first-save.js} +1 -1
- package/dist-client/modeller/first-save.js.map +1 -0
- package/dist-client/modeller/gate-findings.d.ts +2 -2
- package/dist-client/modeller/gate-findings.js +2 -2
- package/dist-client/modeller/gate-findings.js.map +1 -1
- package/dist-client/modeller/{v3-gizmo.d.ts → gizmo.d.ts} +5 -5
- package/dist-client/modeller/{v3-gizmo.js → gizmo.js} +3 -3
- package/dist-client/modeller/gizmo.js.map +1 -0
- package/dist-client/modeller/{v3-help.js → help.js} +1 -1
- package/dist-client/modeller/help.js.map +1 -0
- package/dist-client/modeller/joint-drag.d.ts +19 -0
- package/dist-client/modeller/{v3-joint-drag.js → joint-drag.js} +4 -4
- package/dist-client/modeller/joint-drag.js.map +1 -0
- package/dist-client/modeller/{v3-joint-fan.d.ts → joint-fan.d.ts} +3 -3
- package/dist-client/modeller/{v3-joint-fan.js → joint-fan.js} +6 -6
- package/dist-client/modeller/joint-fan.js.map +1 -0
- package/dist-client/modeller/{v3-keys.js → keys.js} +1 -1
- package/dist-client/modeller/keys.js.map +1 -0
- package/dist-client/modeller/{v3-links.d.ts → links.d.ts} +48 -48
- package/dist-client/modeller/{v3-links.js → links.js} +15 -15
- package/dist-client/modeller/links.js.map +1 -0
- package/dist-client/modeller/{v3-live.d.ts → live.d.ts} +6 -6
- package/dist-client/modeller/{v3-live.js → live.js} +5 -5
- package/dist-client/modeller/live.js.map +1 -0
- package/dist-client/modeller/{v3-maturity.d.ts → maturity.d.ts} +26 -26
- package/dist-client/modeller/{v3-maturity.js → maturity.js} +28 -28
- package/dist-client/modeller/maturity.js.map +1 -0
- package/dist-client/modeller/modeller-route.d.ts +1 -1
- package/dist-client/modeller/modeller-route.js +1 -1
- package/dist-client/modeller/modeller-route.js.map +1 -1
- package/dist-client/modeller/{v3-occupancy.d.ts → occupancy.d.ts} +4 -4
- package/dist-client/modeller/{v3-occupancy.js → occupancy.js} +6 -6
- package/dist-client/modeller/occupancy.js.map +1 -0
- package/dist-client/modeller/palette.d.ts +7 -0
- package/dist-client/modeller/{v3-palette.js → palette.js} +1 -1
- package/dist-client/modeller/palette.js.map +1 -0
- package/dist-client/modeller/{v3-preview-model.d.ts → preview-model.d.ts} +3 -3
- package/dist-client/modeller/{v3-preview-model.js → preview-model.js} +6 -6
- package/dist-client/modeller/preview-model.js.map +1 -0
- package/dist-client/modeller/{v3-product-session.d.ts → product-session.d.ts} +56 -56
- package/dist-client/modeller/{v3-product-session.js → product-session.js} +7 -7
- package/dist-client/modeller/product-session.js.map +1 -0
- package/dist-client/modeller/{v3-recipe-source.d.ts → recipe-source.d.ts} +2 -2
- package/dist-client/modeller/{v3-recipe-source.js → recipe-source.js} +3 -3
- package/dist-client/modeller/recipe-source.js.map +1 -0
- package/dist-client/modeller/{v3-recipes.d.ts → recipes.d.ts} +7 -7
- package/dist-client/modeller/{v3-recipes.js → recipes.js} +4 -4
- package/dist-client/modeller/recipes.js.map +1 -0
- package/dist-client/modeller/{v3-refusals.js → refusals.js} +1 -1
- package/dist-client/modeller/refusals.js.map +1 -0
- package/dist-client/modeller/{v3-renderer.d.ts → renderer.d.ts} +6 -6
- package/dist-client/modeller/{v3-renderer.js → renderer.js} +13 -13
- package/dist-client/modeller/renderer.js.map +1 -0
- package/dist-client/modeller/{v3-stage-model.d.ts → stage-model.d.ts} +7 -7
- package/dist-client/modeller/{v3-stage-model.js → stage-model.js} +5 -5
- package/dist-client/modeller/stage-model.js.map +1 -0
- package/dist-client/modeller/thumbnail.d.ts +3 -0
- package/dist-client/modeller/{v3-thumbnail.js → thumbnail.js} +6 -6
- package/dist-client/modeller/thumbnail.js.map +1 -0
- package/dist-client/pages/figure-list-page.d.ts +1 -1
- package/dist-client/pages/figure-list-page.js +4 -4
- package/dist-client/pages/figure-list-page.js.map +1 -1
- package/dist-client/pages/{figure-v3-modeller-page.d.ts → figure-modeller-page.d.ts} +10 -10
- package/dist-client/pages/{figure-v3-modeller-page.js → figure-modeller-page.js} +42 -42
- package/dist-client/pages/figure-modeller-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +1 -5
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/docs/product-cutover.md +25 -0
- package/package.json +5 -5
- package/test/{v3-ai-proposal.test.ts → ai-proposal.test.ts} +6 -6
- package/test/{v3-align.test.ts → align.test.ts} +8 -8
- package/test/browser/modeller-page.js +30 -30
- package/test/browser/modeller.check.mjs +14 -14
- package/test/browser/serve.mjs +1 -1
- package/test/browser/thumbnail-page.js +6 -6
- package/test/{v3-clips.test.ts → clips.test.ts} +18 -18
- package/test/{v3-controls.test.ts → controls.test.ts} +15 -15
- package/test/{v3-fields.test.ts → fields.test.ts} +13 -13
- package/test/figure-assistant-surface.test.ts +3 -3
- package/test/{v3-first-save.test.ts → first-save.test.ts} +10 -10
- package/test/fixtures/joint-column.json +2 -2
- package/test/fixtures/joint-roller.json +2 -2
- package/test/fixtures/robot-arm-6dof.json +2 -2
- package/test/{v3-gizmo.test.ts → gizmo.test.ts} +33 -33
- package/test/{v3-joint-drag.test.ts → joint-drag.test.ts} +17 -17
- package/test/{v3-joint-fan.test.ts → joint-fan.test.ts} +18 -18
- package/test/joints.ts +6 -6
- package/test/{v3-keys.test.ts → keys.test.ts} +2 -2
- package/test/{v3-layout.test.ts → layout.test.ts} +8 -8
- package/test/{v3-links.test.ts → links.test.ts} +201 -201
- package/test/{v3-live.test.ts → live.test.ts} +18 -18
- package/test/{v3-material.test.ts → material.test.ts} +12 -12
- package/test/{v3-maturity.test.ts → maturity.test.ts} +74 -74
- package/test/modeller-route.test.ts +5 -6
- package/test/{v3-palette-icons.test.ts → palette-icons.test.ts} +1 -1
- package/test/{v3-parts-wiring.test.ts → parts-wiring.test.ts} +5 -5
- package/test/{v3-preview.test.ts → preview.test.ts} +12 -12
- package/test/{v3-product-session.test.ts → product-session.test.ts} +17 -17
- package/test/{v3-product-write.test.ts → product-write.test.ts} +20 -20
- package/test/{v3-properties.test.ts → properties.test.ts} +24 -24
- package/test/{v3-recipes.test.ts → recipes.test.ts} +9 -9
- package/test/{v3-refusals.test.ts → refusals.test.ts} +43 -43
- package/test/{v3-release-panel.test.ts → release-panel.test.ts} +21 -21
- package/test/renderer.test.ts +24 -0
- package/test/resolve-ts-siblings.mjs +1 -1
- package/test/{v3-scene-canvas.test.ts → scene-canvas.test.ts} +6 -6
- package/test/{v3-stage-model.test.ts → stage-model.test.ts} +5 -5
- package/test/{v3-theme.test.ts → theme.test.ts} +4 -4
- package/test/{v3-thumbnail.test.ts → thumbnail.test.ts} +4 -4
- package/test/{v3-verdict.test.ts → verdict.test.ts} +17 -17
- package/test/{v3-view.test.ts → view.test.ts} +2 -2
- package/things-factory.config.js +2 -3
- package/translations/en.json +2 -2
- package/translations/ja.json +2 -2
- package/translations/ko.json +2 -2
- package/translations/ms.json +2 -2
- package/translations/zh.json +2 -2
- package/dist-client/graphql/v3-store.d.ts +0 -3
- package/dist-client/graphql/v3-store.js.map +0 -1
- package/dist-client/modeller/figure-v3-capability.js.map +0 -1
- package/dist-client/modeller/figure-v3-clips.js.map +0 -1
- package/dist-client/modeller/figure-v3-controls.js.map +0 -1
- package/dist-client/modeller/figure-v3-first-save.js.map +0 -1
- package/dist-client/modeller/figure-v3-links.js.map +0 -1
- package/dist-client/modeller/figure-v3-material.js.map +0 -1
- package/dist-client/modeller/figure-v3-parts.js.map +0 -1
- package/dist-client/modeller/figure-v3-preview.js.map +0 -1
- package/dist-client/modeller/figure-v3-properties.js.map +0 -1
- package/dist-client/modeller/figure-v3-recipe-catalog.js.map +0 -1
- package/dist-client/modeller/figure-v3-verdict.js.map +0 -1
- package/dist-client/modeller/v3-ai-proposal.js.map +0 -1
- package/dist-client/modeller/v3-align.js.map +0 -1
- package/dist-client/modeller/v3-canvas.js.map +0 -1
- package/dist-client/modeller/v3-clips.js.map +0 -1
- package/dist-client/modeller/v3-controls.js.map +0 -1
- package/dist-client/modeller/v3-editor.js.map +0 -1
- package/dist-client/modeller/v3-fields.js.map +0 -1
- package/dist-client/modeller/v3-figure-facts.js.map +0 -1
- package/dist-client/modeller/v3-first-save.js.map +0 -1
- package/dist-client/modeller/v3-gizmo.js.map +0 -1
- package/dist-client/modeller/v3-help.js.map +0 -1
- package/dist-client/modeller/v3-joint-drag.d.ts +0 -19
- package/dist-client/modeller/v3-joint-drag.js.map +0 -1
- package/dist-client/modeller/v3-joint-fan.js.map +0 -1
- package/dist-client/modeller/v3-keys.js.map +0 -1
- package/dist-client/modeller/v3-links.js.map +0 -1
- package/dist-client/modeller/v3-live.js.map +0 -1
- package/dist-client/modeller/v3-maturity.js.map +0 -1
- package/dist-client/modeller/v3-occupancy.js.map +0 -1
- package/dist-client/modeller/v3-palette.d.ts +0 -7
- package/dist-client/modeller/v3-palette.js.map +0 -1
- package/dist-client/modeller/v3-preview-model.js.map +0 -1
- package/dist-client/modeller/v3-product-session.js.map +0 -1
- package/dist-client/modeller/v3-recipe-source.js.map +0 -1
- package/dist-client/modeller/v3-recipes.js.map +0 -1
- package/dist-client/modeller/v3-refusals.js.map +0 -1
- package/dist-client/modeller/v3-renderer.js.map +0 -1
- package/dist-client/modeller/v3-stage-model.js.map +0 -1
- package/dist-client/modeller/v3-thumbnail.d.ts +0 -3
- package/dist-client/modeller/v3-thumbnail.js.map +0 -1
- package/dist-client/pages/figure-v3-modeller-page.js.map +0 -1
- package/dist-client/tsconfig.chk.tsbuildinfo +0 -1
- package/dist-client/tsconfig.fui.tsbuildinfo +0 -1
- package/dist-client/tsconfig.scratch-fm.tsbuildinfo +0 -1
- package/docs/v3-product-cutover.md +0 -25
- package/test/v3-renderer.test.ts +0 -24
- /package/client/modeller/{v3-fields.ts → fields.ts} +0 -0
- /package/client/modeller/{v3-first-save.ts → first-save.ts} +0 -0
- /package/client/modeller/{v3-help.ts → help.ts} +0 -0
- /package/client/modeller/{v3-keys.ts → keys.ts} +0 -0
- /package/client/modeller/{v3-refusals.ts → refusals.ts} +0 -0
- /package/dist-client/modeller/{v3-fields.d.ts → fields.d.ts} +0 -0
- /package/dist-client/modeller/{v3-first-save.d.ts → first-save.d.ts} +0 -0
- /package/dist-client/modeller/{v3-help.d.ts → help.d.ts} +0 -0
- /package/dist-client/modeller/{v3-keys.d.ts → keys.d.ts} +0 -0
- /package/dist-client/modeller/{v3-refusals.d.ts → refusals.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-links.js","sourceRoot":"","sources":["../../client/modeller/figure-links.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,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C,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAA;IAC3H,CAAC;IAEO,OAAO,CAAC,MAA6B;QAC3C,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACvG,CAAC;;AA3iB+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0CAAoB;AAEvC;IAAX,QAAQ,EAAE;;2CAAY;AAES;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yCAAgC;AAClC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;2CAAe;AAE/B;IAAX,QAAQ,EAAE;;4CAAiD;AAE3C;IAAhB,KAAK,EAAE;;2CAA+B;AACtB;IAAhB,KAAK,EAAE;;2CAA2C;AAClC;IAAhB,KAAK,EAAE;;0CAA6B;AACpB;IAAhB,KAAK,EAAE;;wCAAyB;AAEhB;IAAhB,KAAK,EAAE;;kDAA8B;AA9C3B,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA4kBvB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { FIGURE_FACES } from '@hatiolab/figure-model'\nimport type { FigureAsset, FigureAuthoringAction, FigureDimensionSource, FigureFace } from '@hatiolab/figure-model'\n\nimport {\n acceptsOf,\n alignAxesOf,\n mountingPlaneOf,\n alignOf,\n AXES,\n canFasten,\n facesOf,\n canFollow,\n dimensionNow,\n followableAxes,\n positionIsShare,\n choiceOf,\n fastenedTo,\n heldBy,\n followOf,\n hangsFrom,\n shownWhenOf,\n visibilityControlsOf,\n placeKeptOf,\n fasteningOf,\n hasInstanceSize,\n holdsThings,\n leadersFor,\n motionOf,\n motionFormOf,\n motionJoint,\n placeFacesOf,\n placeIdFor,\n placesOn,\n rowAxesOf,\n positionsWorkedOut,\n type Alignment,\n type Axis,\n type Follow,\n type MotionForm\n} from './links.js'\nimport { SidePanelStyles } from './side-panel-styles.js'\nimport { HelpToggles } from './help.js'\n\nconst FACES = Object.keys(FIGURE_FACES) as FigureFace[]\n\nconst freshFasten = () => ({\n face: 'bottom' as FigureFace | 'centre',\n toPlane: false,\n target: '',\n targetFace: 'top' as FigureFace,\n facing: 'meet' as 'meet' | 'flush',\n gap: 0,\n twist: 0,\n align: {} as Partial<Record<Axis, Alignment>>,\n alignMm: {} as Partial<Record<Axis, number>>\n})\nconst freshMotion = (): MotionForm => ({ kind: 'slide', axis: 'x', id: '', min: 0, max: 500, follow: '', multiplier: 1, offset: 0, travel: '', travelPlus: 0 })\nconst freshRow = () => ({ axis: '' as Axis | '', pitch: 200, fills: true, count: 5 })\nconst freshPlace = () => ({ role: 'grip' as 'seat' | 'grip', face: 'top' as FigureFace, label: '', accepts: '', capacity: 1 })\n\n/**\n * What a part is tied to — its size response, what it is fastened to, how it moves.\n *\n * 「Build Once, Fit Anywhere」 lives here: a dimension that follows the instance size or another part is what lets\n * a figure be placed at any size, and a part fastened to the face it rests on is what keeps it there when that\n * happens. The release gate refuses a figure that falls apart when resized, and tells the author to fasten the\n * parts that come away — this is where they do it. Motion is a joint: a slide or a turn driven by a control.\n *\n * The sections are dimensions, placement and joint, in that order. Every\n * change is one figure-model authoring command, sent as `command` and run by the editor through the session — one\n * step of the undo history. Choices the command would refuse (a round body fastened, a size following an instance\n * size the figure does not declare) are not offered, so the author is not sent into a refusal.\n */\n@customElement('figure-links')\nexport class FigureLinks extends localize(i18next)(LitElement) {\n private readonly help = new HelpToggles(this)\n static styles = [SidePanelStyles, css`\n :host {\n display: block;\n }\n /* The measure's name, then its rule: X, or a cylinder's 반지름 · 길이, on one line. */\n div[row] > b {\n white-space: nowrap;\n }\n div[row] {\n display: grid;\n grid-template-columns: minmax(24px, max-content) minmax(0, 1fr);\n gap: 6px;\n align-items: center;\n }\n b[bound] {\n font-weight: 600;\n }\n /* The difference a following measure keeps: under its choice, on the same line as its words. */\n label[inline-plus] {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n label[inline-plus] input {\n flex: 1;\n min-width: 0;\n }\n `]\n\n /** The asset being edited. */\n @property({ attribute: false }) asset?: FigureAsset\n /** The selected part. */\n @property() partId = ''\n /** The part's own extent along its axes now, in mm — what a dimension is fixed at when it stops following. */\n @property({ attribute: false }) dims?: [number, number, number]\n @property({ type: Boolean }) locked = false\n /** Which ties this shows: the part's shape (size and placement, in 속성), its places (자리·능력) or its motion (움직임). */\n @property() section: 'shape' | 'places' | 'motion' = 'shape'\n\n @state() private fasten = freshFasten()\n @state() private motion: MotionForm = freshMotion()\n @state() private place = freshPlace()\n @state() private row = freshRow()\n /** The motion form is open over the part's own motion, to change it where it is. */\n @state() private editingMotion = false\n\n /*\n The forms describe the next command for the selected part, so another part starts from the defaults: carrying the\n last part's choices over fastened a shutter curtain level with a right edge nobody chose for it (2026-09-25).\n */\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('partId') && changed.get('partId') !== undefined) {\n /* A part's own fastening is not another part's choices: the form opens on it (walk 1, 2026-09-26). */\n const own = this.asset && this.partId ? fasteningOf(this.asset, this.partId) : null\n this.fasten = own ? ({ ...freshFasten(), ...own } as ReturnType<typeof freshFasten>) : freshFasten()\n this.motion = freshMotion()\n this.place = freshPlace()\n this.row = freshRow()\n this.editingMotion = false\n }\n }\n\n render() {\n const asset = this.asset\n if (!asset || !this.partId) return nothing\n if (this.section === 'motion')\n return html`<section><h3>${i18next.t('figure.label.motion')}${this.help.button('figure.text.motion-explained')}</h3>${this.help.hint('figure.text.motion-explained')}\n ${this.renderMotion(asset)}${this.renderShown(asset)}</section>`\n if (this.section === 'places')\n return html`<section><h3>${i18next.t('figure.label.places-on-part', { part: this.partId })}${this.help.button('figure.text.place-explained')}</h3>${this.help.hint('figure.text.place-explained')}\n ${placeFacesOf(asset, this.partId).length ? this.renderPlaces(asset) : html`<p hint>${i18next.t('figure.text.places-need-a-box')}</p>`}</section>`\n return html`\n <section>\n <h3>${i18next.t('figure.label.dimensions')}</h3>\n ${canFollow(asset, this.partId) ? this.renderDimensions(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n <section>\n <h3>${i18next.t('figure.label.placement')}${this.help.button('figure.text.fastening-explained')}</h3>${this.help.hint('figure.text.fastening-explained')}\n ${this.renderPositions(asset)}\n ${canFasten(asset, this.partId) ? this.renderFastening(asset) : html`<p hint>${i18next.t('figure.text.links-need-a-box')}</p>`}\n </section>\n ${this.renderRow(asset)}\n `\n }\n\n /** Where things are held on this part: a seat things rest on, or a grip things are held in. */\n private renderPlaces(asset: FigureAsset) {\n const faces = placeFacesOf(asset, this.partId)\n const p = this.place\n const face = faces.includes(p.face) ? p.face : faces[0]!\n const accepts = acceptsOf(p.accepts)\n const capacityOk = Number.isSafeInteger(p.capacity) && p.capacity >= 1\n const roleName = (role: string) => i18next.t('figure.label.place-' + role)\n return html`\n ${placesOn(asset, this.partId).map(\n one => html`<div pair>\n <span>\n <b bound>${one.label}</b>\n <small>${roleName(one.role)} · ${one.face ? i18next.t('figure.label.face-' + one.face) : ''} · ${one.accepts.join(', ')} · ${i18next.t('figure.label.place-holds', { count: one.capacity })}</small>\n </span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'remove-binding', id: one.id })}>\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-place')}\n </button>\n </div>`\n )}\n ${holdsThings(asset)\n ? nothing\n : html`<p hint>${i18next.t('figure.text.place-needs-holding')}</p>\n <button act ?disabled=${this.locked} @click=${() => this.declareHolding(asset)}>\n <md-icon>inventory_2</md-icon>${i18next.t('figure.button.declare-holding')}\n </button>`}\n <div pair>\n <select @change=${(e: Event) => (this.place = { ...p, role: (e.target as HTMLSelectElement).value as 'seat' | 'grip' })}>\n <option value=\"grip\" ?selected=${p.role === 'grip'}>${roleName('grip')}</option>\n <option value=\"seat\" ?selected=${p.role === 'seat'}>${roleName('seat')}</option>\n </select>\n <select @change=${(e: Event) => (this.place = { ...p, face: (e.target as HTMLSelectElement).value as FigureFace })}>\n ${faces.map(one => html`<option value=${one} ?selected=${one === face}>${i18next.t('figure.label.face-' + one)}</option>`)}\n </select>\n </div>\n <div form>\n <span>${i18next.t('figure.label.place-name')}</span>\n <input .value=${p.label} placeholder=${roleName(p.role)} @change=${(e: Event) => (this.place = { ...p, label: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-accepts')}</span>\n <input .value=${p.accepts} placeholder=\"BOX, TOTE\" @input=${(e: Event) => (this.place = { ...p, accepts: (e.target as HTMLInputElement).value })} />\n <span>${i18next.t('figure.label.place-capacity')}</span>\n <input type=\"number\" min=\"1\" step=\"1\" .value=${String(p.capacity)} @change=${(e: Event) => (this.place = { ...p, capacity: (e.target as HTMLInputElement).valueAsNumber })} />\n </div>\n ${accepts.length ? nothing : html`<small>${i18next.t('figure.text.place-accepts-needed')}</small>`}\n <button\n act\n ?disabled=${this.locked || !accepts.length || !capacityOk}\n @click=${() =>\n this.command({\n kind: 'add-binding',\n id: placeIdFor(asset, this.partId, p.role),\n label: p.label.trim() || roleName(p.role),\n role: p.role,\n part: this.partId,\n face,\n accepts,\n capacity: p.capacity\n })}\n >\n <md-icon>back_hand</md-icon>${i18next.t('figure.button.add-place')}\n </button>\n `\n }\n\n /** The figure holds things: `Capacity` and `Holdable`, the ladder's middle rung. One part edit, one undo step. */\n private declareHolding(asset: FigureAsset) {\n const names = [...new Set([...(asset.document.capabilities.names ?? []), 'Capacity', 'Holdable'])]\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-capabilities', names } }, bubbles: true, composed: true }))\n }\n\n private renderDimensions(asset: FigureAsset) {\n const others = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFollow(asset, one))\n const round = followableAxes(asset, this.partId).length === 2\n /* One step for the whole part (figure-model follow-size): the size is declared from the parts if there is none. */\n const followsAll = followableAxes(asset, this.partId).every(axis => followOf(asset, this.partId, axis).of === 'instance')\n const whole = followsAll\n ? nothing\n : html`<button act follow-size ?disabled=${this.locked} @click=${() => this.command({ kind: 'follow-size', part: this.partId })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.follow-size')}\n </button>`\n return html`${whole}${followableAxes(asset, this.partId).map(axis => {\n const now = followOf(asset, this.partId, axis)\n const value = choiceOf(now)\n /* A cylinder's two measures are its radius and its length; its X and Y name them. */\n const name = round ? i18next.t(axis === 'x' ? 'figure.label.field-radius' : 'figure.label.field-length') : axis.toUpperCase()\n return html`<div row>\n <b>${name}</b>\n <select ?disabled=${this.locked} @change=${(e: Event) => this.follow(asset, axis, (e.target as HTMLSelectElement).value, now)}>\n <option value=\"own\" ?selected=${value === 'own'}>${i18next.t('figure.label.follows-nothing')}</option>\n ${AXES.filter(one => hasInstanceSize(asset, one)).map(\n one => html`<option value=${`share:${one}`} ?selected=${value === `share:${one}`}>\n ${i18next.t('figure.label.follows-instance-share')} · ${one.toUpperCase()}\n </option>\n <option value=${`instance:${one}`} ?selected=${value === `instance:${one}`}>\n ${i18next.t('figure.label.follows-instance')} · ${one.toUpperCase()}\n </option>`\n )}\n ${others.flatMap(other =>\n AXES.map(\n one => html`<option value=${`part:${other}:${one}`} ?selected=${value === `part:${other}:${one}`}>${other} · ${one.toUpperCase()}</option>`\n )\n )}\n ${now.of === 'expression' || now.of === 'input'\n ? html`<option value=${value} selected>${now.of === 'input' ? now.input : i18next.t('figure.label.follows-expression')}</option>`\n : nothing}\n </select>\n ${now.of === 'instance' || now.of === 'part'\n ? html`<span></span>\n <label inline-plus>\n ${i18next.t('figure.label.follows-plus')}\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.plus ?? 0)}\n @change=${(e: Event) => this.followPlus(axis, now, Number((e.target as HTMLInputElement).value) || 0)}\n />\n </label>`\n : nothing}\n </div>`\n })}`\n }\n\n /** The same source, the same share, a new difference: a leaf the opening less its gaps (link-dimension's `plus`). */\n private followPlus(axis: Axis, now: Follow, plus: number) {\n if (now.of !== 'instance' && now.of !== 'part') return\n if ((now.plus ?? 0) === plus) return\n const source: FigureDimensionSource = now.of === 'instance' ? { of: 'instance', axis: now.axis } : { of: 'part', part: now.part, axis: now.axis }\n const times = now.of === 'instance' ? now.times : (now.times ?? 1)\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, ...(times !== 1 ? { times } : {}), ...(plus ? { plus } : {}), replace: true })\n }\n\n private follow(asset: FigureAsset, axis: Axis, choice: string, now: Follow) {\n const following = now.of !== 'own'\n /* The measure as it stands: a dimension stops following at it, and a share is taken of it. */\n const current = dimensionNow(asset, this.partId, axis) ?? this.dims?.[AXES.indexOf(axis)] ?? 100\n if (choice === 'own') {\n if (!following) return\n this.command({ kind: 'unlink-dimension', part: this.partId, axis, mm: Math.max(1, Math.round(current)) })\n return\n }\n const [of, a, b] = choice.split(':')\n if (of === 'share') {\n /* A proportional rule: this measure is the share of the instance size it is now, so it grows with the figure. */\n const size = asset.designInputs[`size.${a}`]\n if (!size) return\n const times = Math.round((current / size) * 1e6) / 1e6\n this.command({ kind: 'link-dimension', part: this.partId, axis, source: { of: 'instance', axis: a as Axis }, times, replace: following })\n return\n }\n const source: FigureDimensionSource = of === 'instance' ? { of: 'instance', axis: a as Axis } : { of: 'part', part: a!, axis: b as Axis }\n this.command({ kind: 'link-dimension', part: this.partId, axis, source, replace: following })\n }\n\n /**\n * Positions worked out from other values, each with the way to\n * keep it where it is. This is the way out the release gate names when a resize leaves a part in the air.\n */\n private renderPositions(asset: FigureAsset) {\n return positionsWorkedOut(asset, this.partId).map(\n axis => html`<div pair>\n <span>${axis.toUpperCase()} · ${i18next.t(positionIsShare(asset, this.partId, axis) ? 'figure.label.position-in-proportion' : 'figure.label.position-worked-out')}</span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'fix-position', part: this.partId, axis })}>\n <md-icon>push_pin</md-icon>${i18next.t('figure.button.fix-position')}\n </button>\n ${hasInstanceSize(asset, axis) && !positionIsShare(asset, this.partId, axis)\n ? html`<button act ?disabled=${this.locked} title=${i18next.t('figure.text.scale-position-explained')} @click=${() => this.command({ kind: 'scale-position', part: this.partId, axis })}>\n <md-icon>open_in_full</md-icon>${i18next.t('figure.button.scale-position')}\n </button>`\n : nothing}\n </div>`\n )\n }\n\n /**\n * A new aim for the fastening: where on the face is filled in as where the part stands now, so fastening it keeps it\n * there (`placeKeptOf`). The author changes it from there.\n */\n private aimAt(asset: FigureAsset, f: ReturnType<typeof freshFasten>) {\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : f.target ? { part: f.target, face: targetFace } : undefined\n this.fasten = { ...f, ...(aim ? placeKeptOf(asset, this.partId, aim, !!f.twist) : { align: {}, alignMm: {} }) }\n }\n\n private renderFastening(asset: FigureAsset) {\n const held = heldBy(asset, this.partId)\n const f = this.fasten\n /* Not a part that hangs from this one: fastening a frame to its own roller would close a loop. */\n const targets = asset.appearance.map(look => look.target).filter(one => one !== this.partId && canFasten(asset, one) && !hangsFrom(asset, one, this.partId))\n /* The faces are the ones each shape declares: a part is fastened by one of its outer faces, to any face of the target. */\n /* On the mounting plane only the faces it takes: a bottom or a top on the floor, a back on a wall. */\n const plane = mountingPlaneOf(asset)\n /* Its outer faces, and its centre -- a roller spins about its middle (ADR-0093); the mounting plane takes a face. */\n const mineFaces: Array<FigureFace | 'centre'> = [\n ...(facesOf(asset, this.partId).filter(face => FACES.includes(face as FigureFace) && (!f.toPlane || plane.faces.includes(face as FigureFace))) as FigureFace[]),\n ...(f.toPlane ? [] : (['centre'] as const))\n ]\n const myFace = mineFaces.includes(f.face) ? f.face : mineFaces[0]!\n const theirFaces = f.target ? facesOf(asset, f.target) : FACES\n const targetFace = theirFaces.includes(f.targetFace) ? f.targetFace : theirFaces[0]!\n const aim = f.toPlane ? ('plane' as const) : { part: f.target, face: targetFace }\n const align = f.target || f.toPlane ? alignOf(asset, this.partId, aim, f.align, f.alignMm, !!f.twist) : undefined\n return html`\n ${held\n ? html`<div pair>\n <span>${i18next.t('figure.label.fastened-to')}: <b bound>${'plane' in held ? i18next.t('figure.label.mounting-plane') : held.part}</b></span>\n <button act ?disabled=${this.locked} @click=${() => this.command({ kind: 'detach', part: this.partId })}>\n <md-icon>link_off</md-icon>${i18next.t('figure.button.detach')}\n </button>\n </div>`\n : nothing}\n <div form>\n <span>${i18next.t('figure.label.my-face')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, face: (e.target as HTMLSelectElement).value as FigureFace | 'centre' })}>\n ${mineFaces.map(face => html`<option value=${face} ?selected=${face === myFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${f.toPlane} @change=${(e: Event) => this.aimAt(asset, { ...f, toPlane: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.stands-on-plane')}\n </label>\n ${f.toPlane\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.target-part')}</span>\n <select @change=${(e: Event) => this.aimAt(asset, { ...f, target: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!f.target}>—</option>\n ${targets.map(one => html`<option value=${one} ?selected=${one === f.target}>${one}</option>`)}\n </select>\n <span>${i18next.t('figure.label.target-face')}</span>\n <select @change=${(e: Event) => this.aimAt(asset, { ...f, targetFace: (e.target as HTMLSelectElement).value as FigureFace })}>\n ${theirFaces.map(face => html`<option value=${face} ?selected=${face === targetFace}>${i18next.t('figure.label.face-' + face)}</option>`)}\n </select>\n <span>${i18next.t('figure.label.facing-meet')}</span>\n <select @change=${(e: Event) => (this.fasten = { ...f, facing: (e.target as HTMLSelectElement).value as 'meet' | 'flush' })}>\n <option value=\"meet\" ?selected=${f.facing === 'meet'}>${i18next.t('figure.label.facing-meet')}</option>\n <option value=\"flush\" ?selected=${f.facing === 'flush'}>${i18next.t('figure.label.facing-flush')}</option>\n </select>\n </div>`}\n ${this.renderAlignment(f.toPlane || f.target ? alignAxesOf(asset, this.partId, aim, !!f.twist) : [])}\n <div form>\n <span>${i18next.t('figure.label.gap')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.gap)} @change=${(e: Event) => (this.fasten = { ...f, gap: Number((e.target as HTMLInputElement).value) || 0 })} />\n <span>${i18next.t('figure.label.twist')}</span>\n <input type=\"number\" step=\"any\" .value=${String(f.twist)} @change=${(e: Event) => (this.fasten = { ...f, twist: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>\n <button\n act\n ?disabled=${this.locked || (!f.toPlane && !f.target)}\n @click=${() =>\n this.command({\n kind: 'attach',\n part: this.partId,\n face: myFace,\n to: f.toPlane ? { plane: 'mounting-plane' } : { part: f.target, face: targetFace },\n ...(f.toPlane ? {} : { facing: f.facing }),\n ...(f.gap ? { gap: f.gap } : {}),\n twist: f.twist,\n ...(align ? { align } : {}),\n replace: !!held\n } as FigureAuthoringAction)}\n >\n <md-icon>link</md-icon>${i18next.t('figure.button.fasten')}\n </button>\n `\n }\n\n /**\n * Where on the target face the part sits, on the two axes across it: centred, level with the target's edge on\n * either side, or a distance off centre. A door hung level with the frame's front edge turns about that edge.\n */\n private renderAlignment(axes: { axis: Axis; edges: boolean }[]) {\n const f = this.fasten\n const set = (axis: Axis, how: Alignment) => (this.fasten = { ...f, align: { ...f.align, [axis]: how } })\n const setMm = (axis: Axis, mm: number) => (this.fasten = { ...f, alignMm: { ...f.alignMm, [axis]: mm } })\n return html`<div form>\n ${axes.map(({ axis, edges }) => {\n const how = f.align[axis] === 'min' || f.align[axis] === 'max' ? (edges ? f.align[axis]! : 'centre') : (f.align[axis] ?? 'centre')\n return html`<span>${i18next.t('figure.label.align-' + axis)}</span>\n <select @change=${(e: Event) => set(axis, (e.target as HTMLSelectElement).value as Alignment)}>\n <option value=\"centre\" ?selected=${how === 'centre'}>${i18next.t('figure.label.align-centre')}</option>\n ${edges\n ? html`<option value=\"min\" ?selected=${how === 'min'}>${i18next.t(`figure.label.align-${axis}-min`)}</option>\n <option value=\"max\" ?selected=${how === 'max'}>${i18next.t(`figure.label.align-${axis}-max`)}</option>`\n : nothing}\n <option value=\"mm\" ?selected=${how === 'mm'}>${i18next.t('figure.label.align-mm')}</option>\n ${this.asset && hasInstanceSize(this.asset, axis)\n ? html`<option value=\"share\" ?selected=${how === 'share'}>${i18next.t('figure.label.align-share')}</option>`\n : nothing}\n </select>\n ${how === 'mm' || how === 'share'\n ? html`<span></span><input type=\"number\" step=\"any\" aria-label=${i18next.t('figure.label.align-mm')} .value=${String(f.alignMm[axis] ?? 0)} @change=${(e: Event) => setMm(axis, Number((e.target as HTMLInputElement).value) || 0)} />`\n : nothing}`\n })}\n </div>`\n }\n\n /**\n * Making the part a row across what it is fastened to (figure-model `make-repeat`): along one of the axes across its\n * face, copies a pitch apart filling the parent's length, or a count spread over it. Once made, the row's own section\n * (the editor's) shows it and takes it away.\n */\n private renderRow(asset: FigureAsset) {\n const axes = rowAxesOf(asset, this.partId)\n if (!axes.length) return nothing\n const r = this.row\n const axis = axes.includes(r.axis as Axis) ? (r.axis as Axis) : axes[0]!\n const ok = r.pitch > 0 && (r.fills || (Number.isSafeInteger(r.count) && r.count >= 1))\n return html`<section>\n <h3>${i18next.t('figure.label.repeat')}</h3>\n <div form>\n <span>${i18next.t('figure.label.repeat-axis')}</span>\n <select @change=${(e: Event) => (this.row = { ...r, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${axes.map(a => html`<option value=${a} ?selected=${a === axis}>${a.toUpperCase()}</option>`)}\n </select>\n <span>${i18next.t('figure.label.repeat-pitch')} (mm)</span>\n <input type=\"number\" step=\"any\" min=\"0\" .value=${String(r.pitch)} @change=${(e: Event) => (this.row = { ...r, pitch: Number((e.target as HTMLInputElement).value) })} />\n </div>\n <label toggle>\n <input type=\"checkbox\" .checked=${r.fills} @change=${(e: Event) => (this.row = { ...r, fills: (e.target as HTMLInputElement).checked })} />\n ${i18next.t('figure.label.repeat-fills')}\n </label>\n ${r.fills\n ? nothing\n : html`<div form>\n <span>${i18next.t('figure.label.repeat-count')}</span>\n <input type=\"number\" step=\"1\" min=\"1\" .value=${String(r.count)} @change=${(e: Event) => (this.row = { ...r, count: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n <button\n act\n ?disabled=${this.locked || !ok}\n @click=${() => this.command({ kind: 'make-repeat', part: this.partId, axis, pitch: r.pitch, ...(r.fills ? {} : { count: r.count }) } as FigureAuthoringAction)}\n >\n <md-icon>view_week</md-icon>${i18next.t('figure.button.make-repeat')}\n </button>\n </section>`\n }\n\n /**\n * When the part is drawn: always, or while a control is at least a value -- a lamp lit while the gate is open. One\n * part edit (`set-visibility`), one step. Offered once the figure has a control; a motion is what makes one.\n */\n private renderShown(asset: FigureAsset) {\n const controls = visibilityControlsOf(asset)\n if (!controls.length) return nothing\n const now = shownWhenOf(asset, this.partId)\n const send = (shownWhen: { input: string; atLeast: number } | null) =>\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit: { kind: 'set-visibility', target: this.partId, shownWhen } }, bubbles: true, composed: true }))\n const first = (id: string) => {\n const c = controls.find(one => one.id === id)!\n return Math.round((c.min + (c.max - c.min) * 0.01) * 1000) / 1000\n }\n const unit = now ? controls.find(c => c.id === now.input)?.unit : ''\n return html`<div form>\n <span>${i18next.t('figure.label.shown-when')}</span>\n <select\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const id = (e.target as HTMLSelectElement).value\n send(id ? { input: id, atLeast: now?.input === id ? now.atLeast : first(id) } : null)\n }}\n >\n <option value=\"\" ?selected=${!now}>${i18next.t('figure.label.shown-always')}</option>\n ${controls.map(c => html`<option value=${c.id} ?selected=${now?.input === c.id}>${i18next.t('figure.label.shown-while', { control: c.label })}</option>`)}\n </select>\n ${now\n ? html`<span>${i18next.t('figure.label.shown-at-least')}${unit ? ` (${unit})` : ''}</span>\n <input\n type=\"number\"\n step=\"any\"\n ?disabled=${this.locked}\n .value=${String(now.atLeast)}\n @change=${(e: Event) => {\n const v = (e.target as HTMLInputElement).valueAsNumber\n if (Number.isFinite(v)) send({ input: now.input, atLeast: v })\n }}\n />`\n : nothing}\n </div>`\n }\n\n private renderMotion(asset: FigureAsset) {\n const now = motionOf(asset, this.partId)\n const joint = asset.joints?.find(j => j.body1.part === this.partId)\n if (now && !(this.editingMotion && joint)) {\n return html`<div pair>\n <span>\n ${i18next.t('figure.label.motion-' + now.kind)} · ${String(now.axis).toUpperCase()}\n ${now.travel\n ? html`<small>${i18next.t('figure.label.motion-travel-is', { part: now.travel.part, axis: now.travel.axis.toUpperCase(), plus: now.travel.plus ?? 0 })}</small>`\n : nothing}\n ${now.follows\n ? html`<small>${i18next.t('figure.label.motion-follows', { joint: now.follows.joint, multiplier: now.follows.multiplier, offset: now.follows.offset ?? 0 })}</small>`\n : now.control\n ? html`<small>${now.control.id} (${now.control.unit}) ${now.control.min} … ${now.control.max}</small>`\n : nothing}\n </span>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => joint && this.command({ kind: 'set-joint', joint: { id: joint.id, type: 'fixed', body0: joint.body0, body1: joint.body1, ...(joint.origin ? { origin: joint.origin } : {}) } })}\n >\n <md-icon>close</md-icon>${i18next.t('figure.button.remove-motion')}\n </button>\n <button\n act\n ?disabled=${this.locked || !joint}\n @click=${() => {\n if (!joint) return\n this.motion = motionFormOf(joint)\n this.editingMotion = true\n }}\n >\n <md-icon>edit</md-icon>${i18next.t('figure.button.change-motion')}\n </button>\n </div>`\n }\n /* A joint needs a parent (URDF): a part fastened to nothing is fastened first. */\n if (!joint) return html`<p hint>${i18next.t('figure.text.fasten-before-moving')}</p>`\n const m = this.motion\n const unit = m.kind === 'slide' ? 'mm' : 'deg'\n /* A follower follows a joint that moves the same way; a choice the kind no longer allows is dropped. */\n const leaders = leadersFor(asset, this.partId, m.kind)\n const follow = leaders.some(j => j.id === m.follow) ? m.follow : ''\n return html`\n <div pair>\n <select @change=${(e: Event) => this.setKind((e.target as HTMLSelectElement).value as 'slide' | 'turn' | 'continuous')}>\n <option value=\"slide\" ?selected=${m.kind === 'slide'}>${i18next.t('figure.label.motion-slide')}</option>\n <option value=\"turn\" ?selected=${m.kind === 'turn'}>${i18next.t('figure.label.motion-turn')}</option>\n <option value=\"continuous\" ?selected=${m.kind === 'continuous'}>${i18next.t('figure.label.motion-continuous')}</option>\n </select>\n <select @change=${(e: Event) => (this.motion = { ...m, axis: (e.target as HTMLSelectElement).value as Axis })}>\n ${AXES.map(a => html`<option value=${a} ?selected=${a === m.axis}>${i18next.t('figure.label.motion-axis')} ${a.toUpperCase()}</option>`)}\n </select>\n </div>\n ${leaders.length\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-follow')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, follow: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!follow}>${i18next.t('figure.label.motion-own-control')}</option>\n ${leaders.map(j => html`<option value=${j.id} ?selected=${j.id === follow}>${j.body1.part}${j.state ? ` · ${j.state.id}` : ''}</option>`)}\n </select>\n </div>`\n : nothing}\n ${follow\n ? html`<div form>\n <span>${i18next.t('figure.label.motion-multiplier')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.multiplier)} @change=${(e: Event) => (this.motion = { ...m, multiplier: Number((e.target as HTMLInputElement).value) })} />\n <span>${i18next.t('figure.label.motion-offset')} (${unit})</span>\n <input type=\"number\" step=\"any\" .value=${String(m.offset)} @change=${(e: Event) => (this.motion = { ...m, offset: Number((e.target as HTMLInputElement).value) || 0 })} />\n </div>`\n : html`<div form>\n ${m.kind === 'slide'\n ? html`<span>${i18next.t('figure.label.motion-travel')}</span>\n <select @change=${(e: Event) => (this.motion = { ...m, travel: (e.target as HTMLSelectElement).value })}>\n <option value=\"\" ?selected=${!m.travel}>${i18next.t('figure.label.motion-travel-mm')}</option>\n ${asset.appearance\n .map(look => look.target)\n .filter(one => canFollow(asset, one))\n .flatMap(one => AXES.map(a => html`<option value=${`${one}:${a}`} ?selected=${m.travel === `${one}:${a}`}>${one} · ${a.toUpperCase()}</option>`))}\n </select>\n ${m.travel\n ? html`<span>${i18next.t('figure.label.follows-plus')}</span>\n <input type=\"number\" step=\"any\" .value=${String(m.travelPlus ?? 0)} @change=${(e: Event) => (this.motion = { ...m, travelPlus: Number((e.target as HTMLInputElement).value) || 0 })} />`\n : nothing}`\n : nothing}\n <span>${i18next.t('figure.label.control-id')}</span>\n <input .value=${m.id} placeholder=${`${this.partId}-${m.kind}`} @change=${(e: Event) => (this.motion = { ...m, id: (e.target as HTMLInputElement).value.trim() })} />\n ${m.kind === 'continuous' || (m.kind === 'slide' && m.travel)\n ? nothing\n : html`<span>${i18next.t('figure.label.control-range')} (${unit})</span>\n <div pair>\n <input type=\"number\" step=\"any\" .value=${String(m.min)} @change=${(e: Event) => (this.motion = { ...m, min: Number((e.target as HTMLInputElement).value) })} />\n <input type=\"number\" step=\"any\" .value=${String(m.max)} @change=${(e: Event) => (this.motion = { ...m, max: Number((e.target as HTMLInputElement).value) })} />\n </div>`}\n </div>`}\n <button\n act\n ?disabled=${this.locked || (follow ? !(Number.isFinite(m.multiplier) && m.multiplier !== 0) : m.kind !== 'continuous' && !(m.kind === 'slide' && m.travel) && !(m.max > m.min && m.min <= 0 && 0 <= m.max))}\n title=${!follow && m.kind !== 'continuous' && !(m.min <= 0 && 0 <= m.max) ? i18next.t('figure.text.joint-range-holds-zero') : ''}\n @click=${() => {\n this.command({ kind: 'set-joint', joint: motionJoint(joint, { ...m, follow }, this.partId) })\n this.editingMotion = false\n }}\n >\n <md-icon>animation</md-icon>${i18next.t(this.editingMotion ? 'figure.button.apply-motion-change' : 'figure.button.add-motion')}\n </button>\n ${this.editingMotion\n ? html`<button act @click=${() => (this.editingMotion = false)}><md-icon>undo</md-icon>${i18next.t('figure.button.cancel-motion-change')}</button>`\n : nothing}\n `\n }\n\n private setKind(kind: 'slide' | 'turn' | 'continuous') {\n this.motion = kind === 'slide' ? { ...this.motion, kind, min: 0, max: 500 } : { ...this.motion, kind, min: -90, max: 90 }\n }\n\n private command(action: FigureAuthoringAction) {\n this.dispatchEvent(new CustomEvent('command', { detail: { action }, bubbles: true, composed: true }))\n }\n}\n\n"]}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { LitElement, nothing } from 'lit';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FigureAssetGeometry } from '@hatiolab/figure-model';
|
|
3
3
|
export declare const purposeOf: (token?: string) => string;
|
|
4
|
-
declare const
|
|
4
|
+
declare const FigureMaterialPanel_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
5
5
|
/**
|
|
6
|
-
* 재질 — a
|
|
6
|
+
* 재질 — a part's material.
|
|
7
7
|
*
|
|
8
|
-
* An earlier editor showed the colour role as a raw token (`palette.dark`) in a select and nothing else. The
|
|
8
|
+
* An earlier editor showed the colour role as a raw token (`palette.dark`) in a select and nothing else. The material
|
|
9
9
|
* holds the colour role, a preset, transparency and a glow; a round body also has how finely its rim is drawn. This
|
|
10
10
|
* shows those: painted colours and lit colours as two groups of swatches, each named for what it
|
|
11
11
|
* is for.
|
|
12
12
|
*
|
|
13
|
-
* Not here, because a
|
|
13
|
+
* Not here, because a material has no place for them: flat shading and casting
|
|
14
14
|
* shadows. The glow's colour comes from the lit colours.
|
|
15
15
|
*
|
|
16
|
-
* Every change leaves as one `
|
|
16
|
+
* Every change leaves as one `part-edit`; the editor runs it through the session, one step of the undo history.
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class FigureMaterialPanel extends FigureMaterialPanel_base {
|
|
19
19
|
static styles: import("lit").CSSResult[];
|
|
20
20
|
/** The selected body as evaluated — its material, its segments and its shape. */
|
|
21
|
-
body?:
|
|
21
|
+
body?: FigureAssetGeometry & {
|
|
22
22
|
id: string;
|
|
23
23
|
};
|
|
24
24
|
/** The asset's palette, token → colour. */
|
|
@@ -32,7 +32,7 @@ export declare class FigureV3Material extends FigureV3Material_base {
|
|
|
32
32
|
private offered;
|
|
33
33
|
/** Intensity 0 is no glow at all; a new glow takes the part's own colour until another is picked. */
|
|
34
34
|
private glow;
|
|
35
|
-
/** A material change: recorded, or -- while a slider is dragged -- only drawn (`
|
|
35
|
+
/** A material change: recorded, or -- while a slider is dragged -- only drawn (`part-live`). */
|
|
36
36
|
private put;
|
|
37
37
|
private edit;
|
|
38
38
|
}
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { css, html, LitElement, nothing, svg } from 'lit';
|
|
3
3
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
4
|
import { i18next, localize } from '@operato/i18n';
|
|
5
|
-
import { MATERIAL_PRESETS, SEGMENT_PRESETS,
|
|
5
|
+
import { MATERIAL_PRESETS, SEGMENT_PRESETS, figureTrianglesOf } from '@hatiolab/figure-model';
|
|
6
6
|
import { activePalette } from '@hatiolab/things-scene';
|
|
7
7
|
import { SidePanelStyles } from './side-panel-styles.js';
|
|
8
8
|
/** The purpose each palette role is for, by its token. */
|
|
@@ -23,19 +23,19 @@ export const purposeOf = (token) => i18next.t(`figure.label.palette-purpose-${PU
|
|
|
23
23
|
const ROUND = new Set(['cylinder', 'ellipticCylinder', 'sphere', 'frustum']);
|
|
24
24
|
const DEFAULT_SEGMENTS = 12;
|
|
25
25
|
/**
|
|
26
|
-
* 재질 — a
|
|
26
|
+
* 재질 — a part's material.
|
|
27
27
|
*
|
|
28
|
-
* An earlier editor showed the colour role as a raw token (`palette.dark`) in a select and nothing else. The
|
|
28
|
+
* An earlier editor showed the colour role as a raw token (`palette.dark`) in a select and nothing else. The material
|
|
29
29
|
* holds the colour role, a preset, transparency and a glow; a round body also has how finely its rim is drawn. This
|
|
30
30
|
* shows those: painted colours and lit colours as two groups of swatches, each named for what it
|
|
31
31
|
* is for.
|
|
32
32
|
*
|
|
33
|
-
* Not here, because a
|
|
33
|
+
* Not here, because a material has no place for them: flat shading and casting
|
|
34
34
|
* shadows. The glow's colour comes from the lit colours.
|
|
35
35
|
*
|
|
36
|
-
* Every change leaves as one `
|
|
36
|
+
* Every change leaves as one `part-edit`; the editor runs it through the session, one step of the undo history.
|
|
37
37
|
*/
|
|
38
|
-
let
|
|
38
|
+
let FigureMaterialPanel = class FigureMaterialPanel extends localize(i18next)(LitElement) {
|
|
39
39
|
constructor() {
|
|
40
40
|
super(...arguments);
|
|
41
41
|
/** The asset's palette, token → colour. */
|
|
@@ -236,7 +236,7 @@ let FigureV3Material = class FigureV3Material extends localize(i18next)(LitEleme
|
|
|
236
236
|
>
|
|
237
237
|
${silhouette(preset)}
|
|
238
238
|
<b>${preset}</b>
|
|
239
|
-
<small>${i18next.t('figure.text.n-triangles', { count:
|
|
239
|
+
<small>${i18next.t('figure.text.n-triangles', { count: figureTrianglesOf({ ...part, segments: preset }) })}</small>
|
|
240
240
|
</button>`)}
|
|
241
241
|
</div>
|
|
242
242
|
<details free ?open=${SEGMENT_PRESETS.slice(4).includes(current)}>
|
|
@@ -270,7 +270,7 @@ let FigureV3Material = class FigureV3Material extends localize(i18next)(LitEleme
|
|
|
270
270
|
this.glowing = live ? intensity : undefined;
|
|
271
271
|
this.put({ emissive: intensity > 0 ? { token: material.emissive?.token ?? material.token, intensity, on: true } : undefined }, live);
|
|
272
272
|
}
|
|
273
|
-
/** A material change: recorded, or -- while a slider is dragged -- only drawn (`
|
|
273
|
+
/** A material change: recorded, or -- while a slider is dragged -- only drawn (`part-live`). */
|
|
274
274
|
put(patch, live = false) {
|
|
275
275
|
const material = { ...this.body.material, ...patch };
|
|
276
276
|
for (const key of Object.keys(material))
|
|
@@ -283,34 +283,34 @@ let FigureV3Material = class FigureV3Material extends localize(i18next)(LitEleme
|
|
|
283
283
|
.map(token => [token, offered[token]]));
|
|
284
284
|
const edit = { kind: 'set-material', target: this.body.id, material, ...(Object.keys(palette).length ? { palette } : {}) };
|
|
285
285
|
if (live)
|
|
286
|
-
this.dispatchEvent(new CustomEvent('
|
|
286
|
+
this.dispatchEvent(new CustomEvent('part-live', { detail: { edit }, bubbles: true, composed: true }));
|
|
287
287
|
else
|
|
288
288
|
this.edit(edit);
|
|
289
289
|
}
|
|
290
290
|
edit(edit) {
|
|
291
|
-
this.dispatchEvent(new CustomEvent('
|
|
291
|
+
this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit }, bubbles: true, composed: true }));
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
__decorate([
|
|
295
295
|
property({ attribute: false }),
|
|
296
296
|
__metadata("design:type", Object)
|
|
297
|
-
],
|
|
297
|
+
], FigureMaterialPanel.prototype, "body", void 0);
|
|
298
298
|
__decorate([
|
|
299
299
|
property({ attribute: false }),
|
|
300
300
|
__metadata("design:type", Object)
|
|
301
|
-
],
|
|
301
|
+
], FigureMaterialPanel.prototype, "palette", void 0);
|
|
302
302
|
__decorate([
|
|
303
303
|
property({ type: Boolean }),
|
|
304
304
|
__metadata("design:type", Object)
|
|
305
|
-
],
|
|
305
|
+
], FigureMaterialPanel.prototype, "locked", void 0);
|
|
306
306
|
__decorate([
|
|
307
307
|
state(),
|
|
308
308
|
__metadata("design:type", Number)
|
|
309
|
-
],
|
|
310
|
-
|
|
311
|
-
customElement('figure-
|
|
312
|
-
],
|
|
313
|
-
export {
|
|
309
|
+
], FigureMaterialPanel.prototype, "glowing", void 0);
|
|
310
|
+
FigureMaterialPanel = __decorate([
|
|
311
|
+
customElement('figure-material-panel')
|
|
312
|
+
], FigureMaterialPanel);
|
|
313
|
+
export { FigureMaterialPanel };
|
|
314
314
|
/** A regular polygon of this many sides -- how round a body with this rim count looks from its end. */
|
|
315
315
|
function silhouette(segments) {
|
|
316
316
|
const points = [];
|
|
@@ -320,4 +320,4 @@ function silhouette(segments) {
|
|
|
320
320
|
}
|
|
321
321
|
return svg `<svg viewBox="0 0 32 32" aria-hidden="true"><polygon points=${points.join(' ')}></polygon></svg>`;
|
|
322
322
|
}
|
|
323
|
-
//# sourceMappingURL=figure-
|
|
323
|
+
//# sourceMappingURL=figure-material-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-material-panel.js","sourceRoot":"","sources":["../../client/modeller/figure-material-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,0DAA0D;AAC1D,MAAM,OAAO,GAA2B;IACtC,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,QAAQ;IAC1B,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,MAAM;IACtB,eAAe,EAAE,OAAO;IACxB,iBAAiB,EAAE,SAAS;IAC5B,uBAAuB,EAAE,QAAQ;IACjC,wBAAwB,EAAE,SAAS;IACnC,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,SAAS;CACpC,CAAA;AACD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC,CAAA;AAE9H,2DAA2D;AAC3D,MAAM,KAAK,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EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;mDAAe;AAE1B;IAAhB,KAAK,EAAE;;oDAAyB;AAvHtB,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CA4Q/B;;AAED,uGAAuG;AACvG,SAAS,UAAU,CAAC,QAAgB;IAClC,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAA;QACzD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACpG,CAAC;IACD,OAAO,GAAG,CAAA,+DAA+D,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAA;AAC9G,CAAC","sourcesContent":["import { css, html, LitElement, nothing, svg } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { MATERIAL_PRESETS, SEGMENT_PRESETS, figureTrianglesOf } from '@hatiolab/figure-model'\nimport { activePalette } from '@hatiolab/things-scene'\nimport type { FigureAssetGeometry, FigureMaterial, FigurePartEdit } from '@hatiolab/figure-model'\nimport { SidePanelStyles } from './side-panel-styles.js'\n\n/** The purpose each palette role is for, by its token. */\nconst PURPOSE: Record<string, string> = {\n 'palette.primary': 'primary',\n 'palette.accent': 'accent',\n 'palette.neutral': 'neutral',\n 'palette.dark': 'dark',\n 'palette.light': 'light',\n 'palette.surface': 'surface',\n 'palette.status-danger': 'danger',\n 'palette.status-warning': 'warning',\n 'palette.status-info': 'info',\n 'palette.status-success': 'success'\n}\nexport const purposeOf = (token?: string) => i18next.t(`figure.label.palette-purpose-${PURPOSE[token ?? ''] ?? 'registered'}`)\n\n/** Bodies with a rim — the ones `set-segments` accepts. */\nconst ROUND = new Set(['cylinder', 'ellipticCylinder', 'sphere', 'frustum'])\nconst DEFAULT_SEGMENTS = 12\n\n/**\n * 재질 — a part's material.\n *\n * An earlier editor showed the colour role as a raw token (`palette.dark`) in a select and nothing else. The material\n * holds the colour role, a preset, transparency and a glow; a round body also has how finely its rim is drawn. This\n * shows those: painted colours and lit colours as two groups of swatches, each named for what it\n * is for.\n *\n * Not here, because a material has no place for them: flat shading and casting\n * shadows. The glow's colour comes from the lit colours.\n *\n * Every change leaves as one `part-edit`; the editor runs it through the session, one step of the undo history.\n */\n@customElement('figure-material-panel')\nexport class FigureMaterialPanel extends localize(i18next)(LitElement) {\n static styles = [SidePanelStyles, css`\n :host {\n display: block;\n }\n div[field] {\n display: grid;\n gap: 4px;\n }\n div[field] > label {\n font-weight: 600;\n }\n div[swatches] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n button[swatch] {\n width: 22px;\n height: 22px;\n padding: 0;\n border-radius: 50%;\n border: 1px solid var(--md-sys-color-outline-variant);\n background: var(--swatch);\n cursor: pointer;\n }\n button[swatch][on] {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 1px;\n }\n select,\n input[type='range'] {\n font: inherit;\n min-width: 0;\n }\n /* The segment picker: the four common counts as their silhouettes with their triangle cost, the rest folded. */\n div[segments] {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 4px;\n }\n button[seg] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1px;\n padding: 6px 2px 4px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[seg]:hover:not([on]) {\n background-color: var(--md-sys-color-surface-container);\n }\n button[seg][on] {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n border-color: transparent;\n }\n /* Small, and 12 and 16 both read as circles: large enough for the corners to show. */\n button[seg] svg {\n display: block;\n width: 32px;\n height: 32px;\n }\n button[seg] svg polygon {\n fill: var(--md-sys-color-surface-container-highest);\n stroke: currentColor;\n stroke-width: 1.1;\n stroke-linejoin: miter;\n }\n button[seg][on] svg polygon {\n fill: var(--md-sys-color-surface-container-lowest);\n }\n button[seg] b {\n font-size: 0.8rem;\n }\n button[seg] small {\n margin: 0;\n font-size: 0.6rem;\n }\n details[free] summary {\n margin-top: 4px;\n cursor: pointer;\n font-size: 0.68rem;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[presets] {\n display: flex;\n gap: 4px;\n margin-top: 4px;\n }\n div[presets] button {\n flex: 1;\n padding: 3px 0;\n font: inherit;\n font-size: 0.72rem;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n div[presets] button[on] {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n border-color: transparent;\n }\n `]\n\n /** The selected body as evaluated — its material, its segments and its shape. */\n @property({ attribute: false }) body?: FigureAssetGeometry & { id: string }\n /** The asset's palette, token → colour. */\n @property({ attribute: false }) palette: Record<string, string> = {}\n @property({ type: Boolean }) locked = false\n /** The glow while its slider is dragged: shown beside it and drawn on the canvas, recorded on release. */\n @state() private glowing?: number\n\n render() {\n const part = this.body\n if (!part) return nothing\n const material = part.material\n /*\n The roles offered are the app's palette, with any the asset carries beyond it. A new asset carries\n only its primary colour; a role it lacks is sent with its colour and added in the same edit (`put`).\n */\n const entries = Object.entries(this.offered())\n const painted = entries.filter(([token]) => !token.startsWith('palette.status-'))\n const lit = entries.filter(([token]) => token.startsWith('palette.status-'))\n const glow = material.emissive\n return html`<section>\n <h3>${i18next.t('figure.label.part-material')}</h3>\n <div field>\n <label>${i18next.t('figure.label.palette-role')}</label>\n <div swatches>${this.swatches(painted, material.token, token => this.put({ token }))}</div>\n ${lit.length\n ? html`<small>${i18next.t('figure.label.status-colors')}</small>\n <div swatches>${this.swatches(lit, material.token, token => this.put({ token }))}</div>`\n : nothing}\n <small><b>${purposeOf(material.token)}</b> — ${i18next.t('figure.text.palette-purpose-explained')}</small>\n </div>\n <div field>\n <label>${i18next.t('figure.label.preset')}</label>\n <select\n ?disabled=${this.locked}\n @change=${(e: Event) => this.put({ preset: ((e.target as HTMLSelectElement).value || undefined) as FigureMaterial['preset'] })}\n >\n <option value=\"\" ?selected=${!material.preset}>${i18next.t('figure.label.none')}</option>\n ${MATERIAL_PRESETS.map(\n preset => html`<option value=${preset} ?selected=${preset === material.preset}>${i18next.t('figure.label.preset-' + preset)}</option>`\n )}\n </select>\n </div>\n <label toggle>\n <input\n type=\"checkbox\"\n ?disabled=${this.locked}\n .checked=${!!material.transparent}\n @change=${(e: Event) => this.put({ transparent: (e.target as HTMLInputElement).checked || undefined })}\n />\n ${i18next.t('figure.label.transparent')}\n </label>\n <div field>\n <label>${i18next.t('figure.label.emissive')}</label>\n <input\n type=\"range\"\n min=\"0\"\n max=\"1\"\n step=\"0.05\"\n ?disabled=${this.locked}\n .value=${String(glow?.intensity ?? 0)}\n @input=${(e: Event) => this.glow(Number((e.target as HTMLInputElement).value), true)}\n @change=${(e: Event) => this.glow(Number((e.target as HTMLInputElement).value))}\n />\n <small>${(this.glowing ?? glow?.intensity ?? 0).toFixed(2)}</small>\n </div>\n ${glow\n ? html`<div field>\n <label>${i18next.t('figure.label.emissive-color')}</label>\n <div swatches>${this.swatches(lit.length ? lit : painted, glow.token, token => this.put({ emissive: { ...glow, token } }))}</div>\n </div>`\n : nothing}\n ${this.renderSegments(part)}\n </section>`\n }\n\n private renderSegments(part: FigureAssetGeometry & { id: string }) {\n const provider = (part as { shape?: { provider?: string } }).shape?.provider ?? ''\n if (!ROUND.has(provider)) return nothing\n const current = part.segments ?? DEFAULT_SEGMENTS\n return html`\n <div field>\n <label>${i18next.t('figure.label.segments')}</label>\n <div segments>\n ${SEGMENT_PRESETS.slice(0, 4).map(\n preset => html`<button\n seg\n ?on=${preset === current}\n ?disabled=${this.locked}\n @click=${() => this.edit({ kind: 'set-segments', target: part.id, segments: preset })}\n >\n ${silhouette(preset)}\n <b>${preset}</b>\n <small>${i18next.t('figure.text.n-triangles', { count: figureTrianglesOf({ ...part, segments: preset }) })}</small>\n </button>`\n )}\n </div>\n <details free ?open=${SEGMENT_PRESETS.slice(4).includes(current as never)}>\n <summary>${i18next.t('figure.text.more-segment-options')}</summary>\n <div presets>\n ${SEGMENT_PRESETS.slice(4).map(\n preset => html`<button ?on=${preset === current} ?disabled=${this.locked} @click=${() => this.edit({ kind: 'set-segments', target: part.id, segments: preset })}>\n ${preset}\n </button>`\n )}\n </div>\n </details>\n </div>\n `\n }\n\n private swatches(entries: [string, string][], chosen: string | undefined, pick: (token: string) => void) {\n return entries.map(\n ([token, colour]) => html`<button\n swatch\n ?on=${token === chosen}\n ?disabled=${this.locked}\n title=${purposeOf(token)}\n aria-label=${purposeOf(token)}\n style=\"--swatch:${colour}\"\n @click=${() => pick(token)}\n ></button>`\n )\n }\n\n private offered(): Record<string, string> {\n return { ...(activePalette() as Record<string, string>), ...this.palette }\n }\n\n /** Intensity 0 is no glow at all; a new glow takes the part's own colour until another is picked. */\n private glow(intensity: number, live = false) {\n const material = this.body!.material\n this.glowing = live ? intensity : undefined\n this.put({ emissive: intensity > 0 ? { token: material.emissive?.token ?? material.token, intensity, on: true } : undefined }, live)\n }\n\n /** A material change: recorded, or -- while a slider is dragged -- only drawn (`part-live`). */\n private put(patch: Partial<FigureMaterial>, live = false) {\n const material: FigureMaterial = { ...this.body!.material, ...patch }\n for (const key of Object.keys(material) as (keyof FigureMaterial)[]) if (material[key] === undefined) delete material[key]\n /* The colours this material names that the asset does not carry yet. */\n const offered = this.offered()\n const palette = Object.fromEntries(\n [material.token, material.emissive?.token]\n .filter((token): token is string => !!token && this.palette[token] === undefined && offered[token] !== undefined)\n .map(token => [token, offered[token]!])\n )\n const edit: FigurePartEdit = { kind: 'set-material', target: this.body!.id, material, ...(Object.keys(palette).length ? { palette } : {}) }\n if (live) this.dispatchEvent(new CustomEvent('part-live', { detail: { edit }, bubbles: true, composed: true }))\n else this.edit(edit)\n }\n\n private edit(edit: FigurePartEdit) {\n this.dispatchEvent(new CustomEvent('part-edit', { detail: { edit }, bubbles: true, composed: true }))\n }\n}\n\n/** A regular polygon of this many sides -- how round a body with this rim count looks from its end. */\nfunction silhouette(segments: number) {\n const points: string[] = []\n for (let i = 0; i < segments; i++) {\n const angle = -Math.PI / 2 + (i * 2 * Math.PI) / segments\n points.push(`${(16 + 13 * Math.cos(angle)).toFixed(2)},${(16 + 13 * Math.sin(angle)).toFixed(2)}`)\n }\n return svg`<svg viewBox=\"0 0 32 32\" aria-hidden=\"true\"><polygon points=${points.join(' ')}></polygon></svg>`\n}\n"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { FigurePrimitiveCreation } from '@hatiolab/figure-model';
|
|
4
|
+
import type { FigureBudgetLine } from './maturity.js';
|
|
5
5
|
/**
|
|
6
|
-
* 도형 팔레트와 부품 목록 —
|
|
6
|
+
* 도형 팔레트와 부품 목록 — 자산의 것.
|
|
7
7
|
*
|
|
8
8
|
* 팔레트는 목록 위에, 눈 단추는 늘 자리를 차지하고, 조작은 고른 줄에서만 보인다.
|
|
9
9
|
*
|
|
10
|
-
* 부품의 도형은
|
|
10
|
+
* 부품의 도형은 평가가 준 `provider` 로 읽는다. 「숨김」은 여기서도 **작업대의 것**이다 — 저장되지 않고, 자산의 `visibility`(상태에 따라
|
|
11
11
|
* 보이고 안 보이는 것)와는 다른 것이다. 그것은 속성 패널의 몫이다.
|
|
12
12
|
*
|
|
13
13
|
* 이 컴포넌트는 정본을 만지지 않는다. 무엇을 하겠다는 것만 알린다.
|
|
14
14
|
*/
|
|
15
|
-
/** 한 줄 —
|
|
16
|
-
export interface
|
|
15
|
+
/** 한 줄 — 평가에서 이 패널이 읽는 것만. */
|
|
16
|
+
export interface FigurePartRow {
|
|
17
17
|
id: string;
|
|
18
18
|
provider: string;
|
|
19
19
|
/** 작업대에서 잠깐 가린 것. 저장되지 않는다. */
|
|
@@ -24,12 +24,12 @@ export interface V3PartRow {
|
|
|
24
24
|
copies?: number;
|
|
25
25
|
}
|
|
26
26
|
/** 팔레트 — 저작 API 가 만들 수 있는 것만 보인다. */
|
|
27
|
-
export type
|
|
28
|
-
declare const
|
|
29
|
-
export declare class
|
|
27
|
+
export type FigurePaletteKind = FigurePrimitiveCreation['kind'] | 'plate' | 'wall';
|
|
28
|
+
declare const FigureParts_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
29
|
+
export declare class FigureParts extends FigureParts_base {
|
|
30
30
|
static styles: import("lit").CSSResult[];
|
|
31
|
-
parts:
|
|
32
|
-
/** 고른 부품의 id. 자리(index)가 아니다 —
|
|
31
|
+
parts: FigurePartRow[];
|
|
32
|
+
/** 고른 부품의 id. 자리(index)가 아니다 — 부품은 id 로 안정하게 가리킨다. */
|
|
33
33
|
selected: string;
|
|
34
34
|
/** 편집할 수 없을 때(불러오는 중 · 저장 중) 팔레트와 조작을 잠근다. */
|
|
35
35
|
locked: boolean;
|
|
@@ -37,7 +37,7 @@ export declare class FigureV3Parts extends FigureV3Parts_base {
|
|
|
37
37
|
* 이 도형이 치르는 값 — 삼각형 · 묶음 · 한 화면에 몇 대 · 등급. 부품을 더하는 바로 그 자리에서 보여야 로우폴리의
|
|
38
38
|
* 기준이 저작을 이끈다. 등급이 D 면 무엇이 넘쳤는지를 적는다. 누르면 성숙도 탭이 열린다.
|
|
39
39
|
*/
|
|
40
|
-
budget?:
|
|
40
|
+
budget?: FigureBudgetLine;
|
|
41
41
|
/**
|
|
42
42
|
* 디테일 등급(S/M/L)의 부품 한도(사용자 2026-09-24). 부품을 넣기 **전에** 몇 개 남았는지 보이고, 다 차면 팔레트가
|
|
43
43
|
* 잠긴다. 되풀이는 한 부품으로 센다. 등급을 안 정했으면 한도는 없다.
|
|
@@ -5,7 +5,7 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
5
5
|
import { i18next, localize } from '@operato/i18n';
|
|
6
6
|
import { ScrollbarStyles } from '@operato/styles';
|
|
7
7
|
import { PART_LIMIT } from '@hatiolab/figure-model';
|
|
8
|
-
import { partLabelOf } from './
|
|
8
|
+
import { partLabelOf } from './fields.js';
|
|
9
9
|
/** 제공자마다의 아이콘. Material Symbols 이름이다. */
|
|
10
10
|
const PROVIDER_ICON = {
|
|
11
11
|
box: 'deployed_code',
|
|
@@ -32,11 +32,11 @@ const RECIPES = [
|
|
|
32
32
|
{ kind: 'portal', icon: 'door_front', label: 'figure.label.primitive-portal' },
|
|
33
33
|
{ kind: 'hollow-box', icon: 'inventory_2', label: 'figure.label.primitive-hollow-box' }
|
|
34
34
|
];
|
|
35
|
-
let
|
|
35
|
+
let FigureParts = class FigureParts extends localize(i18next)(LitElement) {
|
|
36
36
|
constructor() {
|
|
37
37
|
super(...arguments);
|
|
38
38
|
this.parts = [];
|
|
39
|
-
/** 고른 부품의 id. 자리(index)가 아니다 —
|
|
39
|
+
/** 고른 부품의 id. 자리(index)가 아니다 — 부품은 id 로 안정하게 가리킨다. */
|
|
40
40
|
this.selected = '';
|
|
41
41
|
/** 편집할 수 없을 때(불러오는 중 · 저장 중) 팔레트와 조작을 잠근다. */
|
|
42
42
|
this.locked = false;
|
|
@@ -531,29 +531,29 @@ let FigureV3Parts = class FigureV3Parts extends localize(i18next)(LitElement) {
|
|
|
531
531
|
__decorate([
|
|
532
532
|
property({ type: Array }),
|
|
533
533
|
__metadata("design:type", Array)
|
|
534
|
-
],
|
|
534
|
+
], FigureParts.prototype, "parts", void 0);
|
|
535
535
|
__decorate([
|
|
536
536
|
property({ type: String }),
|
|
537
537
|
__metadata("design:type", Object)
|
|
538
|
-
],
|
|
538
|
+
], FigureParts.prototype, "selected", void 0);
|
|
539
539
|
__decorate([
|
|
540
540
|
property({ type: Boolean }),
|
|
541
541
|
__metadata("design:type", Object)
|
|
542
|
-
],
|
|
542
|
+
], FigureParts.prototype, "locked", void 0);
|
|
543
543
|
__decorate([
|
|
544
544
|
property({ attribute: false }),
|
|
545
545
|
__metadata("design:type", Object)
|
|
546
|
-
],
|
|
546
|
+
], FigureParts.prototype, "budget", void 0);
|
|
547
547
|
__decorate([
|
|
548
548
|
property({ attribute: false }),
|
|
549
549
|
__metadata("design:type", Object)
|
|
550
|
-
],
|
|
550
|
+
], FigureParts.prototype, "partBudget", void 0);
|
|
551
551
|
__decorate([
|
|
552
552
|
property({ type: Number }),
|
|
553
553
|
__metadata("design:type", Object)
|
|
554
|
-
],
|
|
555
|
-
|
|
556
|
-
customElement('figure-
|
|
557
|
-
],
|
|
558
|
-
export {
|
|
559
|
-
//# sourceMappingURL=figure-
|
|
554
|
+
], FigureParts.prototype, "recipeCount", void 0);
|
|
555
|
+
FigureParts = __decorate([
|
|
556
|
+
customElement('figure-parts')
|
|
557
|
+
], FigureParts);
|
|
558
|
+
export { FigureParts };
|
|
559
|
+
//# sourceMappingURL=figure-parts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-parts.js","sourceRoot":"","sources":["../../client/modeller/figure-parts.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,QAAQ,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AAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CAAmF;AAEtF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAgB;AA1ThC,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA8fvB","sourcesContent":["import '@material/web/icon/icon.js'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { PART_LIMIT } from '@hatiolab/figure-model'\nimport type { FigurePrimitiveCreation } from '@hatiolab/figure-model'\nimport type { FigureBudgetLine } from './maturity.js'\nimport { partLabelOf } from './fields.js'\n\n/**\n * 도형 팔레트와 부품 목록 — 자산의 것.\n *\n * 팔레트는 목록 위에, 눈 단추는 늘 자리를 차지하고, 조작은 고른 줄에서만 보인다.\n *\n * 부품의 도형은 평가가 준 `provider` 로 읽는다. 「숨김」은 여기서도 **작업대의 것**이다 — 저장되지 않고, 자산의 `visibility`(상태에 따라\n * 보이고 안 보이는 것)와는 다른 것이다. 그것은 속성 패널의 몫이다.\n *\n * 이 컴포넌트는 정본을 만지지 않는다. 무엇을 하겠다는 것만 알린다.\n */\n\n/** 한 줄 — 평가에서 이 패널이 읽는 것만. */\nexport interface FigurePartRow {\n id: string\n provider: string\n /** 작업대에서 잠깐 가린 것. 저장되지 않는다. */\n hidden?: boolean\n /** 자산이 지금 상태에서 보이지 않는다고 한 것. 저장되는 것이고, 여기서는 표시만 한다. */\n invisible?: boolean\n /** 되풀이한 부품이면 지금 몇 개로 그려지나. 되풀이는 한 부품이다 — 한 줄로 보인다. */\n copies?: number\n}\n\n/** 제공자마다의 아이콘. Material Symbols 이름이다. */\nconst PROVIDER_ICON: Record<string, string> = {\n box: 'deployed_code',\n cylinder: 'database',\n ellipticCylinder: 'database',\n frustum: 'change_history',\n sphere: 'circle',\n roundedBox: 'crop_square',\n roundedBoxXZ: 'crop_square',\n hollowBox: 'check_box_outline_blank',\n hollowBoxXZ: 'check_box_outline_blank',\n polygon: 'pentagon',\n portal: 'door_front'\n}\n\n/** 팔레트 — 저작 API 가 만들 수 있는 것만 보인다. */\n/*\n The palette. A plate and a wall are boxes of a shape a person reaches for, so they are starting sizes, not kinds of their own.\n*/\nexport type FigurePaletteKind = FigurePrimitiveCreation['kind'] | 'plate' | 'wall'\nconst RECIPES: Array<{ kind: FigurePaletteKind; icon: string; label: string }> = [\n { kind: 'box', icon: 'deployed_code', label: 'figure.label.primitive-cube' },\n { kind: 'cylinder', icon: 'database', label: 'figure.label.primitive-cylinder' },\n { kind: 'rounded-box', icon: 'crop_square', label: 'figure.label.primitive-rounded-box' },\n { kind: 'sphere', icon: 'circle', label: 'figure.label.primitive-sphere' },\n { kind: 'frustum', icon: 'change_history', label: 'figure.label.primitive-frustum' },\n { kind: 'polygon', icon: 'hexagon', label: 'figure.label.primitive-polygon' },\n { kind: 'plate', icon: 'check_box_outline_blank', label: 'figure.label.primitive-plate' },\n { kind: 'wall', icon: 'crop_portrait', label: 'figure.label.primitive-wall' },\n { kind: 'portal', icon: 'door_front', label: 'figure.label.primitive-portal' },\n { kind: 'hollow-box', icon: 'inventory_2', label: 'figure.label.primitive-hollow-box' }\n]\n\n@customElement('figure-parts')\nexport class FigureParts extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background-color: var(--md-sys-color-surface-container-lowest);\n /* The divider beside it is the editor's frame's (ox-three-pane). */\n color: var(--md-sys-color-on-surface);\n font: var(--label-font, inherit);\n font-size: 0.76rem;\n /* Folds by its own width: the editor gives this column 140 px when it has two columns (UX, 2026-09-24). */\n container-type: inline-size;\n }\n section {\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n section[list] {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n h3 {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 6px;\n margin: 0 0 6px 0;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n /* The cost line: the grade's letter in its colour, then what the figure costs. */\n button[budget] {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: 100%;\n margin: 0 0 6px;\n padding: 4px 6px;\n font: inherit;\n font-size: 0.68rem;\n line-height: 1.5;\n text-align: left;\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[budget]:hover {\n background: var(--md-sys-color-surface-container);\n }\n button[budget] b {\n flex: none;\n min-width: 16px;\n text-align: center;\n border-radius: 4px;\n color: var(--md-sys-color-on-primary-container);\n background: var(--md-sys-color-primary-container);\n }\n button[budget][grade='C'] b {\n color: var(--md-sys-color-on-tertiary-container);\n background: var(--md-sys-color-tertiary-container);\n }\n button[budget][grade='D'] {\n border-color: var(--md-sys-color-error);\n }\n button[budget][grade='D'] b {\n color: var(--md-sys-color-on-error);\n background: var(--md-sys-color-error);\n }\n button[budget] em {\n display: block;\n font-style: normal;\n color: var(--md-sys-color-error);\n }\n span[room][full] {\n color: var(--md-sys-color-error);\n font-weight: 600;\n }\n p[full] {\n margin: 4px 0 0;\n font-size: 0.68rem;\n color: var(--md-sys-color-error);\n }\n div[level] {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: center;\n gap: 6px;\n margin: 0 0 6px;\n font-size: 0.68rem;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[level] select {\n min-width: 0;\n padding: 2px 4px;\n font: inherit;\n font-size: 0.7rem;\n color: var(--md-sys-color-on-surface);\n background: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n small[copies] {\n color: var(--md-sys-color-on-surface-variant);\n }\n span[room] {\n font-size: 0.7rem;\n font-weight: 400;\n letter-spacing: 0;\n text-transform: none;\n }\n /* Three to a row, small (user, 2026-09-24): the palette is reached for, not read -- the list below is what grows. */\n div[palette] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 3px;\n }\n button[shape] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1px;\n min-width: 0;\n padding: 5px 1px 4px;\n font: var(--label-font, inherit);\n font-size: 0.6rem;\n line-height: 1.2;\n text-align: center;\n overflow-wrap: anywhere;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[recipe-catalog] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n font: inherit;\n font-size: 0.75rem;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 999em;\n cursor: pointer;\n }\n button[shape]:hover:not([disabled]) {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n border-color: transparent;\n }\n button[shape][disabled] {\n opacity: 0.35;\n cursor: default;\n }\n button[shape] md-icon {\n --md-icon-size: 18px;\n }\n ol {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n li {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 6px;\n border-radius: 6px;\n cursor: pointer;\n }\n li:hover {\n background-color: var(--md-sys-color-surface-container);\n }\n li[selected] {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n }\n li md-icon {\n --md-icon-size: 16px;\n flex: none;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n button[eye][all] {\n margin-left: auto;\n opacity: 0.75;\n }\n button[eye][all]:hover {\n opacity: 1;\n }\n button[eye] {\n display: flex;\n flex: none;\n padding: 1px;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n opacity: 0;\n }\n li:hover button[eye],\n li[selected] button[eye],\n button[eye][off] {\n opacity: 1;\n }\n button[eye][off] {\n color: var(--md-sys-color-tertiary);\n }\n button[eye] md-icon {\n --md-icon-size: 15px;\n color: inherit;\n }\n li[off] span[label],\n li[off] > md-icon,\n li[invisible] span[label],\n li[invisible] > md-icon {\n opacity: 0.45;\n }\n li[selected] md-icon {\n color: inherit;\n }\n span[label] {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 0.78rem;\n }\n span[label] small {\n margin-left: 4px;\n font-size: 0.66rem;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n div[ops] {\n display: none;\n gap: 1px;\n }\n li[selected] div[ops] {\n display: flex;\n }\n div[ops] button {\n display: flex;\n padding: 2px;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n div[ops] button:hover:not([disabled]) {\n background-color: var(--md-sys-color-surface-container-lowest);\n }\n div[ops] button[disabled] {\n opacity: 0.3;\n cursor: default;\n }\n div[ops] md-icon {\n --md-icon-size: 15px;\n color: inherit;\n }\n /*\n Under 200 px the selected row's four buttons pushed its name out and the last one past the edge (seen at 140,\n 2026-09-24). They go to a line of their own under the name.\n */\n @container (max-width: 199px) {\n li[selected] {\n flex-wrap: wrap;\n }\n li[selected] div[ops] {\n flex-basis: 100%;\n justify-content: flex-end;\n }\n }\n p[quiet] {\n margin: 0;\n font-size: 0.76rem;\n line-height: 1.6;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n `\n ]\n\n @property({ type: Array }) parts: FigurePartRow[] = []\n /** 고른 부품의 id. 자리(index)가 아니다 — 부품은 id 로 안정하게 가리킨다. */\n @property({ type: String }) selected = ''\n /** 편집할 수 없을 때(불러오는 중 · 저장 중) 팔레트와 조작을 잠근다. */\n @property({ type: Boolean }) locked = false\n /**\n * 이 도형이 치르는 값 — 삼각형 · 묶음 · 한 화면에 몇 대 · 등급. 부품을 더하는 바로 그 자리에서 보여야 로우폴리의\n * 기준이 저작을 이끈다. 등급이 D 면 무엇이 넘쳤는지를 적는다. 누르면 성숙도 탭이 열린다.\n */\n @property({ attribute: false }) budget?: FigureBudgetLine\n /**\n * 디테일 등급(S/M/L)의 부품 한도(사용자 2026-09-24). 부품을 넣기 **전에** 몇 개 남았는지 보이고, 다 차면 팔레트가\n * 잠긴다. 되풀이는 한 부품으로 센다. 등급을 안 정했으면 한도는 없다.\n */\n @property({ attribute: false }) partBudget?: { level: 'S' | 'M' | 'L' | null; used: number; limit: number | null }\n /** How many recipe templates the catalog holds; none, and the section is not drawn. */\n @property({ type: Number }) recipeCount = 0\n\n render() {\n const b = this.partBudget\n const full = !!b && b.limit !== null && b.used >= b.limit\n return html`\n <section>\n <h3>${i18next.t('figure.label.shapes')}</h3>\n <div palette>\n ${RECIPES.map(\n recipe => html`\n <button\n shape\n ?disabled=${this.locked || full}\n title=${full ? i18next.t('figure.text.part-limit-reached') : i18next.t(recipe.label)}\n @click=${() => this.ask('add-part', { kind: recipe.kind })}\n >\n <md-icon>${recipe.icon}</md-icon>\n <span>${i18next.t(recipe.label)}</span>\n </button>\n `\n )}\n </div>\n ${full ? html`<p full>${i18next.t('figure.text.part-limit-reached-short', { level: b!.level, limit: b!.limit })}</p>` : nothing}\n </section>\n ${this.renderRecipes(full)}\n\n <section list>\n <h3>\n <span>${i18next.t('figure.label.parts')}</span>\n <span room ?full=${full} title=${i18next.t('figure.text.limit-comes-from-level')}\n >${b && b.limit !== null ? i18next.t('figure.text.n-of-limit', { used: b.used, limit: b.limit }) : (b?.used ?? this.parts.length)}</span\n >\n ${this.renderShowAll()}\n </h3>\n ${this.renderLevel()}\n ${this.renderBudget()}\n ${this.parts.length === 0\n ? html`<p quiet>${i18next.t('figure.text.no-parts-yet')}</p>`\n : html`<ol>\n ${this.parts.map((part, index) => this.renderRow(part, index))}\n </ol>`}\n </section>\n `\n }\n\n /** 디테일 등급 — 고르면 한도가 바뀐다. 목록 머리 아래. */\n private renderLevel() {\n const b = this.partBudget\n if (!b) return nothing\n return html`<div level>\n <label for=\"detail-level\">${i18next.t('figure.label.detail-level')}</label>\n <select\n id=\"detail-level\"\n title=${i18next.t('figure.text.detail-level-explained')}\n .value=${b.level ?? ''}\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const value = (e.target as HTMLSelectElement).value\n this.dispatchEvent(new CustomEvent('set-detail-level', { detail: { level: value || null }, bubbles: true, composed: true }))\n }}\n >\n <option value=\"\" ?selected=${!b.level}>${i18next.t('figure.label.detail-none')}</option>\n ${(['S', 'M', 'L'] as const).map(\n one => html`<option value=${one} ?selected=${one === b.level}>\n ${one} ${i18next.t('figure.label.detail-' + one)} · ${i18next.t('figure.text.n-parts-at-most', { limit: PART_LIMIT[one] })}\n </option>`\n )}\n </select>\n </div>`\n }\n\n private renderBudget() {\n const b = this.budget\n if (!b || !this.parts.length) return nothing\n const over = b.grade === 'D'\n return html`<button\n budget\n grade=${b.grade}\n title=${i18next.t('figure.text.parts-budget-open')}\n @click=${() => this.dispatchEvent(new CustomEvent('show-maturity', { bubbles: true, composed: true }))}\n >\n <b>${b.grade}</b>\n <span>\n <strong performance-cost>${i18next.t('figure.label.performance-cost')}</strong>\n ${i18next.t('figure.text.parts-budget', {\n triangles: b.triangles.toLocaleString(),\n groups: b.groups.toLocaleString(),\n instances: b.instances.toLocaleString()\n })}\n ${over\n ? html`<em\n >${i18next.t('figure.text.parts-budget-over', {\n budget: i18next.t('figure.label.budget-' + b.tightest.key),\n used: b.tightest.used.toLocaleString(),\n limit: b.tightest.limit.toLocaleString()\n })}</em\n >`\n : nothing}\n </span>\n </button>`\n }\n\n /** 한꺼번에 감추고 한꺼번에 되돌린다 — 하나라도 감춰져 있으면 다 되돌리고, 다 보이면 다 감춘다. */\n private renderShowAll() {\n if (this.parts.length === 0) return nothing\n const anyHidden = this.parts.some(part => part.hidden)\n return html`\n <button\n eye\n all\n ?off=${!anyHidden}\n title=${i18next.t(anyHidden ? 'figure.text.show-all-parts' : 'figure.text.hide-all-parts')}\n @click=${(e: Event) => {\n e.stopPropagation()\n this.ask('set-all-parts-hidden', { hidden: !anyHidden })\n }}\n >\n <md-icon>${anyHidden ? 'visibility' : 'visibility_off'}</md-icon>\n </button>\n `\n }\n\n private renderRow(part: FigurePartRow, index: number) {\n const selected = part.id === this.selected\n const off = !!part.hidden\n return html`\n <li\n ?selected=${selected}\n ?off=${off}\n ?invisible=${!!part.invisible}\n @click=${() => this.ask('select-part', { id: part.id })}\n >\n <button\n eye\n ?off=${off}\n title=${i18next.t(off ? 'figure.text.show-this-part' : 'figure.text.hide-this-part')}\n @click=${(e: Event) => {\n e.stopPropagation()\n this.ask('toggle-part-hidden', { id: part.id })\n }}\n >\n <md-icon>${off ? 'visibility_off' : 'visibility'}</md-icon>\n </button>\n <md-icon>${PROVIDER_ICON[part.provider] ?? 'deployed_code'}</md-icon>\n <span label title=${part.id}\n >${partLabelOf(part.id)}${part.copies ? html` <small copies>× ${part.copies}</small>` : nothing}${part.invisible ? html`<small>${i18next.t('figure.label.state-hidden')}</small>` : nothing}</span\n >\n ${selected ? this.renderOps(part.id, index) : nothing}\n </li>\n `\n }\n\n /** 고른 줄의 조작. 못 하는 것은 빼지 않고 흐리게 둔다 — 자리가 밀리면 연달아 지우다 엉뚱한 것을 누른다. */\n private renderOps(id: string, index: number) {\n const count = this.parts.length\n const op = (name: string, icon: string, detail: object, enabled = true) => html`\n <button\n op=${name}\n ?disabled=${!enabled || this.locked}\n title=${i18next.t('figure.button.' + name)}\n @click=${(e: Event) => {\n e.stopPropagation()\n if (enabled && !this.locked) this.ask(name, detail)\n }}\n >\n <md-icon>${icon}</md-icon>\n </button>\n `\n return html`\n <div ops>\n ${op('move-part-up', 'arrow_upward', { id, to: index - 1 }, index > 0)}\n ${op('move-part-down', 'arrow_downward', { id, to: index + 1 }, index < count - 1)}\n ${op('duplicate-part', 'content_copy', { id })} ${op('remove-part', 'delete', { id })}\n </div>\n `\n }\n\n /**\n * Recipes (ADR-0095): the catalog of templates -- a door, a roller row -- opened over the modeller, put onto the chosen\n * part in one step.\n */\n private renderRecipes(full: boolean) {\n if (!this.recipeCount) return nothing\n return html`<section recipes>\n <h3>${i18next.t('figure.label.recipes')}</h3>\n <button recipe-catalog ?disabled=${this.locked || full} @click=${() => this.ask('open-recipe-catalog', {})}>\n <md-icon>widgets</md-icon>${i18next.t('figure.button.open-recipe-catalog', { count: this.recipeCount })}\n </button>\n </section>`\n }\n\n /** 정본을 고치지 않는다 — 무엇을 하겠다는 것만 알린다. */\n private ask(what: string, detail: object) {\n this.dispatchEvent(new CustomEvent(what, { detail, bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FigureAsset } from '@hatiolab/figure-model';
|
|
3
3
|
import { type ViewSettings } from './figure-view.js';
|
|
4
|
-
declare const
|
|
5
|
-
export declare class
|
|
4
|
+
declare const FigurePreview_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
5
|
+
export declare class FigurePreview extends FigurePreview_base {
|
|
6
6
|
static styles: import("lit").CSSResult;
|
|
7
7
|
/** The figure being authored, as the editor holds it now. */
|
|
8
|
-
asset?:
|
|
8
|
+
asset?: FigureAsset;
|
|
9
9
|
/** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */
|
|
10
10
|
context: string;
|
|
11
11
|
view: ViewSettings;
|