@things-factory/figure-ui 10.1.166 → 10.1.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/client/figure-assistant.ts +5 -0
  2. package/client/modeller/ai-proposal.ts +20 -2
  3. package/client/modeller/figure-properties.ts +1 -3
  4. package/client/modeller/product-session.ts +9 -4
  5. package/client/pages/figure-modeller-page.ts +7 -6
  6. package/dist-client/figure-assistant.js +5 -0
  7. package/dist-client/figure-assistant.js.map +1 -1
  8. package/dist-client/modeller/ai-proposal.d.ts +8 -0
  9. package/dist-client/modeller/ai-proposal.js +16 -3
  10. package/dist-client/modeller/ai-proposal.js.map +1 -1
  11. package/dist-client/modeller/figure-properties.d.ts +1 -2
  12. package/dist-client/modeller/figure-properties.js +1 -3
  13. package/dist-client/modeller/figure-properties.js.map +1 -1
  14. package/dist-client/modeller/product-session.d.ts +14 -3
  15. package/dist-client/modeller/product-session.js +9 -4
  16. package/dist-client/modeller/product-session.js.map +1 -1
  17. package/dist-client/pages/figure-modeller-page.js +7 -6
  18. package/dist-client/pages/figure-modeller-page.js.map +1 -1
  19. package/dist-client/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +8 -8
  21. package/test/ai-proposal.test.ts +73 -2
  22. package/test/browser/acceptance-page.js +3 -1
  23. package/test/browser/product-page.check.mjs +63 -3
  24. package/test/browser/product-page.js +7 -2
  25. package/test/figure-assistant-surface.test.ts +27 -1
  26. package/test/links.test.ts +1 -1
  27. package/test/proposal-record.test.ts +18 -6
  28. package/test/refusals.test.ts +1 -1
  29. package/translations/en.json +0 -12
  30. package/translations/es.json +0 -12
  31. package/translations/ja.json +0 -12
  32. package/translations/ko.json +35 -47
  33. package/translations/ms.json +0 -12
  34. package/translations/zh.json +0 -12
  35. package/client/modeller/carrier-declaration.ts +0 -63
  36. package/client/modeller/figure-carrier.ts +0 -117
  37. package/dist-client/modeller/carrier-declaration.d.ts +0 -31
  38. package/dist-client/modeller/carrier-declaration.js +0 -53
  39. package/dist-client/modeller/carrier-declaration.js.map +0 -1
  40. package/dist-client/modeller/figure-carrier.d.ts +0 -26
  41. package/dist-client/modeller/figure-carrier.js +0 -123
  42. package/dist-client/modeller/figure-carrier.js.map +0 -1
  43. package/test/carrier-declaration.test.ts +0 -69
@@ -46,7 +46,7 @@
46
46
  "figure.text.fasten-would-loop": "그 부품은 이미 이 부품에 붙어 있어서 거꾸로 붙일 수 없습니다.",
47
47
  "figure.text.follow-would-loop": "그 치수는 이미 이 부품을 따르고 있어서 서로 따르게 할 수 없습니다.",
48
48
  "figure.text.links-need-a-box": "「크기 따르기」는 상자 모양 부품에서, 「붙이기」는 상자·원기둥 부품에서 사용할 수 있습니다.",
49
- "figure.text.scale-position-explained": "지금 자리를 도형 크기의 몫으로 둡니다. 두 배 크기면 두 배 거리에 놓입니다.",
49
+ "figure.text.scale-position-explained": "현재 위치를 도형 크기에 대한 비율로 설정합니다. 도형 크기가 두 배가 되면 기준점과의 거리도 두 배가 됩니다.",
50
50
  "figure.text.repeat-member": "{name} 되풀이 {count}개 중 {index}번째입니다.",
51
51
  "figure.label.detail-none": "없음",
52
52
  "figure.label.repeat": "줄로 배열",
@@ -59,11 +59,11 @@
59
59
  "figure.text.row-copies-out-of-range": "줄의 개수는 {min}~{max}개입니다. 넣은 값: {count}",
60
60
  "figure.text.row-does-not-fit": "{count}개가 {length} mm 안에 들어가지 않습니다. 하나가 {extent} mm입니다. 개수를 줄이거나 부품을 줄여 주세요.",
61
61
  "figure.text.row-same-axis": "{outer}의 줄이 이미 {axis} 방향입니다. {part}의 줄은 다른 방향으로 늘어나야 합니다.",
62
- "figure.text.row-face-held-slot-layout": "{part}의 면을 자리 배치가 기준면으로 쓰고 있어 줄로 바꿀 수 없습니다. 자리 배치의 기준면을 먼저 바꿔 주세요.",
63
- "figure.text.row-face-held-place": "{part}의 면에 자리가 있어 줄로 바꿀 수 없습니다. 그 자리를 먼저 지워 주세요.",
62
+ "figure.text.row-face-held-slot-layout": "{part}의 면을 적재 위치 배치의 기준면으로 사용하고 있어 반복 배열로 변경할 수 없습니다. 적재 위치 배치의 기준면을 먼저 변경해 주세요.",
63
+ "figure.text.row-face-held-place": "{part}의 면에 적재 위치가 있어 반복 배열로 변경할 수 없습니다. 해당 적재 위치를 먼저 삭제해 주세요.",
64
64
  "figure.text.row-face-held-footprint": "{part}의 면이 점유 공간의 기준이라 줄로 바꿀 수 없습니다. 점유 공간을 먼저 바꿔 주세요.",
65
65
  "figure.text.row-face-held-other": "{part}의 면을 다른 곳에서 쓰고 있어 줄로 바꿀 수 없습니다.",
66
- "figure.text.gizmo-joint-places": "{part} 부품은 관절에 달려 있어 관절이 자리를 정합니다. 움직임 탭의 조작값으로 움직이세요.",
66
+ "figure.text.gizmo-joint-places": "{part} 부품은 관절에 연결되어 있어 관절 설정에 따라 위치가 결정됩니다. 움직임 탭의 조작값으로 조정해 주세요.",
67
67
  "figure.label.motion-continuous": "끝없이 회전",
68
68
  "figure.text.fasten-before-moving": "먼저 다른 부품이나 바닥에 붙여야 움직임을 줄 수 있습니다.",
69
69
  "figure.text.motion-summary": "{part} · {against} 기준 · {axis}축 {kind}",
@@ -71,10 +71,10 @@
71
71
  "figure.text.gizmo-joint-mimic": "{joint} 관절은 {leader} 관절을 따라 움직입니다. {leader}을(를) 움직이세요.",
72
72
  "figure.text.gizmo-joint-fixed-turn": "{joint} 관절은 돌지 않습니다. 돌리려면 움직임 탭에서 회전을 주세요.",
73
73
  "figure.text.gizmo-joint-turned-slide": "{joint} 관절은 미끄러지기만 합니다. 이동 손잡이로 움직이세요.",
74
- "figure.text.gizmo-joint-origin-follows": "{joint} 관절의 자리는 다른 부품을 따라 정해집니다. 움직임 탭의 붙이기에서 바꾸세요.",
74
+ "figure.text.gizmo-joint-origin-follows": "{joint} 관절의 위치는 다른 부품을 기준으로 결정됩니다. 움직임 탭의 붙이기 설정에서 변경해 주세요.",
75
75
  "figure.text.gizmo-joint-off-axis": "{joint} 관절은 {axis}축으로만 돕니다. {axis} 회전 손잡이를 쓰세요.",
76
76
  "figure.text.gizmo-size-follows": "{part}의 {axis} 치수는 다른 치수를 따라 정해집니다. 움직임 탭의 치수에서 바꾸세요.",
77
- "figure.text.gizmo-fastening-places": "{part} 부품은 다른 부품의 면에 붙어 있어 그 면이 자리를 정합니다. 옮기려면 먼저 떼세요.",
77
+ "figure.text.gizmo-fastening-places": "{part} 부품은 다른 부품의 면에 부착되어 있습니다. 위치를 직접 변경하려면 부착 관계를 먼저 해제해 주세요.",
78
78
  "figure.text.instance-range-can-widen": "지금 부품으로 다시 재면 {ranges} mm 입니다.",
79
79
  "figure.text.size-range-too-small": "이 도형은 {axis} 축을 {mm} mm 보다 작게 하면 {part} 부품의 길이가 0 이 되는데, 그보다 작게 놓일 수 있다고 선언되어 있어 이 변경을 할 수 없습니다. 「놓일 수 있는 크기」에서 다시 재기를 누르면 범위가 맞춰집니다.",
80
80
  "figure.text.size-range-too-large": "이 도형은 {axis} 축을 {mm} mm 보다 크게 하면 {part} 부품을 그릴 수 없는데, 그보다 크게 놓일 수 있다고 선언되어 있어 이 변경을 할 수 없습니다. 「놓일 수 있는 크기」에서 다시 재기를 누르면 범위가 맞춰집니다.",
@@ -447,7 +447,7 @@
447
447
  "figure.text.maturity-reuse-because": "여러 부품이 같은 형상을 공유해 절약한 형상 수입니다.",
448
448
  "figure.text.maturity-scale-because": "한 도면에 자산 500개를 배치하는 것을 기준으로 합니다.",
449
449
  "figure.text.mirror-explained": "반대편에 대칭 부품을 생성합니다. 다리나 팔처럼 쌍으로 구성된 부품에 사용합니다.",
450
- "figure.text.mirror-would-overlap": "이미 가운데에 있어 대칭이 제자리입니다. 겹친 부품이 생깁니다.",
450
+ "figure.text.mirror-would-overlap": "부품이 이미 중심에 있어 대칭 복제하면 기존 부품과 겹칩니다.",
451
451
  "figure.text.mode-edit-explained": "기준 크기에서 부품을 배치하고 편집합니다.",
452
452
  "figure.text.mode-preview-explained": "도면에 놓았을 때의 모습입니다. 기준 크기와 늘린 것을 나란히 놓습니다.",
453
453
  "figure.text.more-segment-options": "고급 분할 수",
@@ -511,7 +511,7 @@
511
511
  "figure.label.primitive-portal": "문틀",
512
512
  "figure.label.state-hidden": "지금 상태에서 안 보임",
513
513
  "figure.label.follows": "크기 따라가기",
514
- "figure.text.follows-explained": "이 변이 무엇을 따라 늘어나는지 정합니다. 보드에서 도형을 늘리면 그것을 따라갑니다.",
514
+ "figure.text.follows-explained": "도형의 크기를 변경할 때 이 치수가 어떤 값을 기준으로 변하는지 설정합니다.",
515
515
  "figure.label.follows-nothing": "고정",
516
516
  "figure.label.follows-instance": "인스턴스 크기",
517
517
  "figure.label.follows-instance-share": "크기에 비례",
@@ -591,7 +591,7 @@
591
591
  "figure.label.room-undeclared": "아직 선언하지 않음",
592
592
  "figure.label.room-declared": "지금 선언",
593
593
  "figure.label.mounting-face": "장착면",
594
- "figure.text.mounting-face-explained": "도형이 무엇 위에 놓이는지, 그 면을 지정합니다. 공간 선언과는 별개입니다.",
594
+ "figure.text.mounting-face-explained": "도형을 배치할 때 기준이 되는 장착면을 지정합니다. 점유 공간 설정과는 별개입니다.",
595
595
  "figure.button.set-mounting-face": "이 면으로",
596
596
  "figure.button.clear-mounting-face": "지정 해제",
597
597
  "figure.label.mounting-face-none": "지정 안 함",
@@ -608,16 +608,16 @@
608
608
  "figure.label.design-inputs": "설계 입력",
609
609
  "figure.text.release-blocked": "발행이 막힙니다 — {count}건",
610
610
  "figure.text.release-ready": "발행할 수 있습니다",
611
- "figure.text.places-need-a-box": "자리는 상자 모양 부품의 면에 둡니다.",
612
- "figure.button.remove-place": "자리 삭제",
611
+ "figure.text.places-need-a-box": "적재 위치는 상자 모양 부품의 면에 지정할 수 있습니다.",
612
+ "figure.button.remove-place": "적재 위치 삭제",
613
613
  "figure.text.place-explained": "보드에서 물건을 이 부품의 어느 면에 놓거나 집을지 정합니다. 부품이 움직이면 물건도 따라갑니다.",
614
- "figure.text.place-needs-holding": "이 도형은 물건을 담는다고 선언하지 않아서, 자리를 만들어도 보드가 여기에 물건을 넘기지 않습니다.",
614
+ "figure.text.place-needs-holding": "이 도형에는 물품 수용 기능이 선언되지 않았습니다. 적재 위치를 추가해도 보드에서 물품을 배치할 수 없습니다.",
615
615
  "figure.button.declare-holding": "물건을 담는 도형으로",
616
616
  "figure.label.place-name": "이름",
617
617
  "figure.label.place-accepts": "받는 종류",
618
618
  "figure.label.place-capacity": "몇 개까지",
619
- "figure.text.place-accepts-needed": "받는 종류를 하나 이상 적어야 자리를 만들 수 있습니다. 쉼표로 나눕니다.",
620
- "figure.button.add-place": "자리 추가",
619
+ "figure.text.place-accepts-needed": "적재 위치에 수용 가능한 유형을 하나 이상 입력해 주세요. 여러 유형은 쉼표로 구분합니다.",
620
+ "figure.button.add-place": "적재 위치 추가",
621
621
  "figure.label.controls": "조작값",
622
622
  "figure.text.controls-explained": "보드나 연결이 이 값을 바꿔 도형의 자세를 움직입니다. 슬라이더로 움직여 볼 수 있습니다.",
623
623
  "figure.text.no-controls": "조작값이 없습니다. 부품의 「움직임」에서 움직임을 추가하면 생깁니다.",
@@ -626,10 +626,10 @@
626
626
  "figure.text.control-starts-at": "보드에 놓이면 {value} {unit} 에서 시작합니다.",
627
627
  "figure.label.control-sweep": "끝까지 걸리는 시간 (초)",
628
628
  "figure.button.whole-figure": "도형 전체",
629
- "figure.label.places-on-part": "{part} 의 자리",
629
+ "figure.label.places-on-part": "{part} 의 적재 위치",
630
630
  "figure.text.choose-a-part-to-move": "부품을 선택하면 그 부품이 어떻게 움직이는지 정할 수 있습니다.",
631
631
  "figure.text.loading-figure": "불러오는 중",
632
- "figure.text.no-places": "아직 자리가 없습니다. 부품을 고르고 이 탭에서 추가합니다.",
632
+ "figure.text.no-places": "등록된 적재 위치가 없습니다. 부품을 선택한 후 이 탭에서 추가해 주세요.",
633
633
  "figure.text.opening-model": "모델을 여는 중입니다.",
634
634
  "figure.text.saved": "저장됨",
635
635
  "figure.text.clips-explained": "조작값을 시간에 따라 움직입니다. 막대를 옮기면 그 순간의 자세를 보여 주고, 조작값 슬라이더로 자세를 만든 뒤 그 순간에 키를 더합니다.",
@@ -747,8 +747,8 @@
747
747
  "figure.button.apply": "적용",
748
748
  "figure.text.part-row-along": "{rows} 줄이 '{part}' 를 따라 놓여 있어 '{part}' 를 삭제할 수 없습니다. 줄을 다른 부품에 붙이거나 되풀이를 없앤 뒤 삭제해 주세요.",
749
749
  "figure.text.part-row-carries": "{others} 이 줄 '{part}' 의 복제마다 붙어 있어 삭제할 수 없습니다. 먼저 떼어 주세요.",
750
- "figure.text.removal-released": "{parts} 는 그 자리에 남고 붙임이 풀렸습니다.",
751
- "figure.text.removal-released-motion": "{part} 는 그 자리에 남고, 붙임과 움직임(조작값 {control})이 풀렸습니다.",
750
+ "figure.text.removal-released": "{parts}의 부착 관계를 해제했습니다. 현재 위치는 유지됩니다.",
751
+ "figure.text.removal-released-motion": "{part}의 부착 관계와 움직임(조작값 {control}) 연결을 해제했습니다. 현재 위치는 유지됩니다.",
752
752
  "figure.text.removal-own-control": "{part} 는 이제 제 조작값 {control}({min}~{max})로 움직입니다.",
753
753
  "figure.text.removal-fixed": "{parts} 가 따르던 값은 지금 수로 고정되었습니다.",
754
754
  "figure.text.removal-bindings": "{places} 도 함께 지웠습니다.",
@@ -834,7 +834,7 @@
834
834
  "figure.text.held-on-part": "{other}의 {otherFace}에 {face}으로 붙어 있음",
835
835
  "figure.button.open-fastening": "붙임 설정 열기",
836
836
  "figure.button.detach-held": "붙임 풀기",
837
- "figure.text.gizmo-size-turned-fastening": "{part} 부품은 기울여 돌려 놓았거나 비틀어 붙여서, 끄는 동안 보이는 면과 확정되는 면이 달라집니다. 기즈모 대신 크기 칸에 숫자로 입력하세요 — 입력하면 배치가 지키는 면(또는 {extreme})이 제자리에 남습니다.",
837
+ "figure.text.gizmo-size-turned-fastening": "{part} 부품은 회전하거나 비틀린 상태로 부착되어 드래그 중 표시되는 면과 최종 적용되는 면이 다릅니다. 크기 항목에 숫자를 직접 입력해 주세요. 배치 기준면(또는 {extreme})의 위치는 유지됩니다.",
838
838
  "figure.label.kept-extreme-floor": "가장 낮은 점",
839
839
  "figure.label.kept-extreme-ceiling": "가장 높은 점",
840
840
  "figure.label.kept-extreme-wall": "가장 뒤쪽 점",
@@ -890,9 +890,9 @@
890
890
  "figure.text.align-to-wall-extreme": "벽(Z=0)에 맞춥니다. 가장 뒤쪽 곳이 닿습니다. 붙이지는 않습니다.",
891
891
  "figure.text.aligned-tilted-wall": "기울기를 유지한 채 벽에 맞췄습니다. 가장 뒤쪽 점 또는 모서리가 닿습니다.",
892
892
  "figure.text.aligned-extreme-wall": "벽에 맞췄습니다. 가장 뒤쪽 곳이 닿습니다.",
893
- "figure.text.align-refused-held": "{part} 부품은 붙어 있어 붙임이 자리를 정합니다. 붙임 설정에서 바꾸세요.",
893
+ "figure.text.align-refused-held": "{part} 부품의 위치는 부착 관계에 따라 결정됩니다. 붙임 설정에서 변경해 주세요.",
894
894
  "figure.text.align-refused-position-rule": "{part} 부품의 위치는 규칙이 정해 옮길 숫자가 없습니다.",
895
- "figure.text.align-refused-no-face": "{part} 부품의 자리를 잴 수 없습니다.",
895
+ "figure.text.align-refused-no-face": "{part} 부품의 위치를 측정할 수 없습니다.",
896
896
  "figure.text.save-unreachable": "서버에 연결하지 못했습니다. 저장됐는지 확인하지 못했습니다. 편집 내용은 그대로 있으니 다시 저장해 주세요.",
897
897
  "figure.text.released-now-draft": "발행된 도형을 고쳐 초안으로 돌아갔습니다. 보드에는 다시 발행할 때까지 발행된 버전이 쓰입니다.",
898
898
  "figure.text.revert-with-unsaved": "저장하지 않은 변경이 있습니다. 버전 {version}으로 되돌리기 전에 어떻게 할까요?",
@@ -973,49 +973,37 @@
973
973
  "figure.text.detail-unreleased": "아직 발행되지 않았습니다. 저장된 초안을 보여줍니다.",
974
974
  "figure.button.detail-edit": "편집 화면 열기",
975
975
  "figure.button.download-package": "꾸러미 내려받기",
976
- "figure.label.group-carrier": "캐리어",
977
- "figure.label.carrier-type": "캐리어 유형",
978
- "figure.text.carrier-type-placeholder": "CARRIERTYPE",
979
- "figure.label.carrier-size": "실물 크기",
980
- "figure.label.carrier-width": "폭",
981
- "figure.label.carrier-length": "길이",
982
- "figure.label.carrier-height": "높이",
983
- "figure.button.declare-carrier": "캐리어로 선언",
984
- "figure.button.clear-carrier": "선언 해제",
985
- "figure.text.carrier-type-required": "캐리어 유형 코드를 입력해 주세요.",
986
- "figure.text.carrier-type-too-long": "캐리어 유형 코드는 {max}자까지입니다.",
987
- "figure.text.carrier-length-positive": "{axis} 값은 0보다 커야 합니다.",
988
976
  "figure.button.import-mesh": "GLB 가져오기",
989
977
  "figure.text.import-mesh-hint": "GLB 파일을 부품으로 가져옵니다. 파일 전체나 그 안의 한 부분을 고릅니다.",
990
978
  "figure.text.mesh-whole-file": "파일 전체",
991
979
  "figure.text.mesh-triangles": "삼각형 {n}개",
992
980
  "figure.title.choose-mesh-part": "가져올 부분",
993
981
  "figure.label.face": "면",
994
- "figure.label.places-one": "자리 하나",
982
+ "figure.label.places-one": "적재 위치 하나",
995
983
  "figure.label.places-by-rule": "규칙으로 여럿",
996
- "figure.label.slot-layout": "자리 배치",
984
+ "figure.label.slot-layout": "적재 위치 배치",
997
985
  "figure.label.slot-layout-name": "이름",
998
- "figure.label.slot-layout-role": "자리 종류",
986
+ "figure.label.slot-layout-role": "적재 위치 종류",
999
987
  "figure.label.slot-anchors": "기준면",
1000
988
  "figure.label.slot-anchor-id": "기준면 이름",
1001
989
  "figure.button.remove-slot-anchor": "기준면 빼기",
1002
990
  "figure.button.add-slot-anchor-top": "{part} 윗면을 기준면으로",
1003
991
  "figure.button.add-slot-anchor-bottom": "{part} 아랫면을 기준면으로",
1004
- "figure.text.slot-anchor-pick": "화면에서 부품을 선택하면 그 부품의 윗면이나 아랫면을 기준면으로 더합니다. 기준면이 움직이는 부품이면 자리도 함께 움직입니다.",
992
+ "figure.text.slot-anchor-pick": "화면에서 부품을 선택하면 윗면 또는 아랫면을 적재 기준면으로 추가합니다. 기준면이 움직이면 적재 위치도 함께 이동합니다.",
1005
993
  "figure.button.apply-slot-anchors": "이름·기준면 적용",
1006
- "figure.button.remove-slot-layout": "자리 배치 삭제",
1007
- "figure.text.slot-accepts-required": "자리마다 받는 종류를 하나 이상 입력해야 합니다.",
1008
- "figure.text.slot-layout-label-missing": "자리 배치의 이름을 입력해야 합니다.",
994
+ "figure.button.remove-slot-layout": "적재 위치 배치 삭제",
995
+ "figure.text.slot-accepts-required": "각 적재 위치에 수용 가능한 유형을 하나 이상 입력해 주세요.",
996
+ "figure.text.slot-layout-label-missing": "적재 위치 배치의 이름을 입력해 주세요.",
1009
997
  "figure.text.slot-anchors-missing": "기준면을 하나 이상 더해야 합니다.",
1010
998
  "figure.text.slot-anchor-duplicate": "기준면 이름 {anchor} 이 두 번 쓰였습니다.",
1011
999
  "figure.text.slot-anchor-not-flat": "기준면 {anchor} 은 {part} 의 윗면이나 아랫면이어야 합니다.",
1012
1000
  "figure.text.slot-anchor-no-part": "기준면 {anchor} 의 부품 {part} 이 이 도형에 없습니다.",
1013
- "figure.text.slot-layout-issues": "자리 배치에서 {path} 의 값이 맞지 않습니다.",
1014
- "figure.text.slot-accepts-empty": "자리 {slot} 이 받는 종류가 없습니다.",
1015
- "figure.text.slot-id-taken": "{slot} 은 이 도형에서 이미 쓰는 자리 이름입니다.",
1016
- "figure.label.slot-preset-single": "자리 하나",
1017
- "figure.label.slot-preset-agvTandem": "AGV 앞뒤 두 자리",
1018
- "figure.label.slot-preset-agvParallel": "AGV 좌우 두 자리",
1001
+ "figure.text.slot-layout-issues": "적재 위치 배치의 {path} 값이 올바르지 않습니다.",
1002
+ "figure.text.slot-accepts-empty": "적재 위치 {slot}에 수용 가능한 유형이 지정되지 않았습니다.",
1003
+ "figure.text.slot-id-taken": "{slot}은(는) 이 도형에서 이미 사용 중인 적재 위치 이름입니다.",
1004
+ "figure.label.slot-preset-single": "적재 위치 하나",
1005
+ "figure.label.slot-preset-agvTandem": "AGV 앞뒤 적재 위치 2개",
1006
+ "figure.label.slot-preset-agvParallel": "AGV 좌우 적재 위치 2개",
1019
1007
  "figure.label.slot-preset-agv2x2": "AGV 2×2",
1020
1008
  "figure.label.slot-preset-bufferPort2x2": "버퍼 포트 2×2",
1021
1009
  "figure.label.slot-preset-multiBufferPort": "멀티 버퍼 포트 (4)",
@@ -1131,7 +1119,7 @@
1131
1119
  "figure.label.data-none": "없음",
1132
1120
  "figure.button.remove-data-binding": "연결 삭제",
1133
1121
  "figure.label.data-ports": "상태 표시",
1134
- "figure.text.data-ports-explained": "상태 코드를 보여 줄 자리입니다. 색은 보드의 상태 템플릿이 정하고, 여기서는 그 색을 받을 색 토큰과 점멸·발광을 받을 부품을 고릅니다.",
1122
+ "figure.text.data-ports-explained": "상태 코드를 시각적으로 표시하는 연결점입니다. 색상은 보드의 상태 템플릿에서 결정합니다. 여기서는 색상 토큰과 점멸·발광을 적용할 부품을 선택합니다.",
1135
1123
  "figure.label.data-port-tokens": "색 토큰",
1136
1124
  "figure.label.data-port-parts": "부품",
1137
1125
  "figure.button.add-data-port": "상태 표시 추가",
@@ -973,18 +973,6 @@
973
973
  "figure.text.detail-unreleased": "Belum diterbitkan. Draf yang disimpan dipaparkan.",
974
974
  "figure.button.detail-edit": "Buka editor",
975
975
  "figure.button.download-package": "muat turun pakej",
976
- "figure.label.group-carrier": "Pembawa",
977
- "figure.label.carrier-type": "Jenis pembawa",
978
- "figure.text.carrier-type-placeholder": "CARRIERTYPE",
979
- "figure.label.carrier-size": "Saiz fizikal",
980
- "figure.label.carrier-width": "Lebar",
981
- "figure.label.carrier-length": "Panjang",
982
- "figure.label.carrier-height": "Tinggi",
983
- "figure.button.declare-carrier": "Isytihar pembawa",
984
- "figure.button.clear-carrier": "Kosongkan",
985
- "figure.text.carrier-type-required": "Masukkan kod jenis pembawa.",
986
- "figure.text.carrier-type-too-long": "Kod jenis pembawa paling banyak {max} aksara.",
987
- "figure.text.carrier-length-positive": "{axis} mesti lebih besar daripada 0.",
988
976
  "figure.button.import-mesh": "import GLB",
989
977
  "figure.text.import-mesh-hint": "membawa masuk fail GLB sebagai bahagian: seluruh fail, atau satu bahagian daripadanya.",
990
978
  "figure.text.mesh-whole-file": "seluruh fail",
@@ -973,18 +973,6 @@
973
973
  "figure.text.detail-unreleased": "尚未发布。显示已保存的草稿。",
974
974
  "figure.button.detail-edit": "打开编辑页面",
975
975
  "figure.button.download-package": "下载包",
976
- "figure.label.group-carrier": "载具",
977
- "figure.label.carrier-type": "载具类型",
978
- "figure.text.carrier-type-placeholder": "CARRIERTYPE",
979
- "figure.label.carrier-size": "实物尺寸",
980
- "figure.label.carrier-width": "宽",
981
- "figure.label.carrier-length": "长",
982
- "figure.label.carrier-height": "高",
983
- "figure.button.declare-carrier": "声明为载具",
984
- "figure.button.clear-carrier": "取消声明",
985
- "figure.text.carrier-type-required": "请输入载具类型代码。",
986
- "figure.text.carrier-type-too-long": "载具类型代码最多 {max} 个字符。",
987
- "figure.text.carrier-length-positive": "{axis}必须大于 0。",
988
976
  "figure.button.import-mesh": "导入 GLB",
989
977
  "figure.text.import-mesh-hint": "将 GLB 文件导入为部件:整个文件,或其中的一部分。",
990
978
  "figure.text.mesh-whole-file": "整个文件",
@@ -1,63 +0,0 @@
1
- /*
2
- * A figure that is a carrier type declares so (ADR-0123): the CARRIERTYPE code a material handling system reports, and
3
- * the carrier's physical size in mm. Kept apart from the element so it is tested without a browser.
4
- *
5
- * The rule is figure-model's (`carrierDeclarationRefusal`); the field asks it before sending `set-carrier`, so a value
6
- * the kernel refuses is said beside the field and never becomes a step of the history. The size is what the author
7
- * types, never read off the occupied room.
8
- */
9
- import { carrierDeclarationRefusal, FIGURE_CARRIER_TYPE_MAX, normalizeCarrierType, type FigureAsset, type FigureAuthoringAction } from '@hatiolab/figure-model'
10
-
11
- type Say = (key: string, params: Record<string, string>) => string
12
- type Declaration = NonNullable<FigureAsset['carrier']>
13
-
14
- export const CARRIER_AXES = ['width', 'length', 'height'] as const
15
- export type CarrierAxis = (typeof CARRIER_AXES)[number]
16
-
17
- /** What the field holds while the author types: the code and the three lengths as typed. */
18
- export type CarrierDraft = { type: string } & Record<CarrierAxis, string>
19
-
20
- /** The field's values for a declaration, or blank for a figure that declares none. */
21
- export function carrierDraftOf(carrier?: Declaration): CarrierDraft {
22
- return {
23
- type: carrier?.type ?? '',
24
- width: carrier ? String(carrier.dimensions.width) : '',
25
- length: carrier ? String(carrier.dimensions.length) : '',
26
- height: carrier ? String(carrier.dimensions.height) : ''
27
- }
28
- }
29
-
30
- /** Whether the field says what is declared already: nothing to send. */
31
- export function draftIsDeclared(draft: CarrierDraft, carrier?: Declaration): boolean {
32
- const declared = carrierDraftOf(carrier)
33
- return normalizeCarrierType(draft.type) === declared.type && CARRIER_AXES.every(axis => Object.is(lengthOf(draft[axis]), lengthOf(declared[axis])))
34
- }
35
-
36
- /** A typed length as a number; blank is no length. */
37
- const lengthOf = (typed: string) => (typed.trim() === '' ? Number.NaN : Number(typed))
38
-
39
- /**
40
- * The `set-carrier` command for what the field holds, or why the kernel would refuse it in the author's words. The
41
- * code is sent as the kernel stores it (trimmed, upper case).
42
- */
43
- export function carrierCommandOf(draft: CarrierDraft, say: Say): { action: FigureAuthoringAction } | { refusal: string } {
44
- const carrier = {
45
- type: normalizeCarrierType(draft.type),
46
- dimensions: { width: lengthOf(draft.width), length: lengthOf(draft.length), height: lengthOf(draft.height) }
47
- }
48
- const refused = carrierDeclarationRefusal(carrier)
49
- if (refused) return { refusal: carrierRefusalOf(refused, carrier.type, say) }
50
- return { action: { kind: 'set-carrier', carrier } }
51
- }
52
-
53
- /**
54
- * A carrier declaration refused, said from its code and path (ADR-0127): the code missing or too long, or the length
55
- * the path names. The kernel's English is never shown; a code the field has no words for is said with the code.
56
- */
57
- export function carrierRefusalOf(refused: { code: string; path: string }, type: string, say: Say): string {
58
- if (refused.code === 'CARRIER_TYPE')
59
- return type ? say('figure.text.carrier-type-too-long', { max: String(FIGURE_CARRIER_TYPE_MAX) }) : say('figure.text.carrier-type-required', {})
60
- const axis = CARRIER_AXES.find(one => refused.path.endsWith(`.${one}`))
61
- if (refused.code === 'CARRIER_DIMENSIONS' && axis) return say('figure.text.carrier-length-positive', { axis: say(`figure.label.carrier-${axis}`, {}) })
62
- return say('figure.text.edit-refused', { code: refused.code })
63
- }
@@ -1,117 +0,0 @@
1
- import { css, html, LitElement, nothing, type PropertyValues } from 'lit'
2
- import { customElement, property, state } from 'lit/decorators.js'
3
- import { live } from 'lit/directives/live.js'
4
-
5
- import { i18next, localize } from '@operato/i18n'
6
- import type { FigureAsset, FigureAuthoringAction } from '@hatiolab/figure-model'
7
-
8
- import { CARRIER_AXES, carrierCommandOf, carrierDraftOf, draftIsDeclared, type CarrierAxis, type CarrierDraft } from './carrier-declaration.js'
9
- import { SidePanelStyles } from '@things-factory/figure-viewer/dist-client/side-panel-styles.js'
10
-
11
- const AXIS_LETTER: Record<CarrierAxis, string> = { width: 'W', length: 'L', height: 'H' }
12
-
13
- /**
14
- * 캐리어 — the CARRIERTYPE code and physical size a carrier figure declares (ADR-0123), in the properties tab.
15
- *
16
- * Declaring and clearing are `set-carrier` commands, sent up as `command` like the tab's others, so the page runs them as
17
- * steps of the session's history: undo takes them back and they are saved with the figure. A value the kernel refuses
18
- * is said here and sends nothing.
19
- */
20
- @customElement('figure-carrier')
21
- export class FigureCarrier extends localize(i18next)(LitElement) {
22
- static styles = [SidePanelStyles, css`
23
- div[row] {
24
- display: flex;
25
- gap: 6px;
26
- }
27
- div[row] > button[act] {
28
- flex: 1;
29
- margin-top: 0;
30
- }
31
- small[role='alert'] {
32
- color: var(--md-sys-color-error);
33
- }
34
- `]
35
-
36
- /** What the figure on screen declares; absent when it is not a carrier type. */
37
- @property({ attribute: false }) carrier?: FigureAsset['carrier']
38
- @state() private draft: CarrierDraft = carrierDraftOf()
39
- @state() private refusal = ''
40
- /* The declaration the field was last filled from: other edits draw the tab again and must not wipe what is being typed. */
41
- private filledFrom?: string
42
-
43
- willUpdate(changed: PropertyValues<this>) {
44
- if (!changed.has('carrier')) return
45
- const declared = JSON.stringify(this.carrier ?? null)
46
- if (declared === this.filledFrom) return
47
- this.filledFrom = declared
48
- this.draft = carrierDraftOf(this.carrier)
49
- this.refusal = ''
50
- }
51
-
52
- render() {
53
- const pending = !draftIsDeclared(this.draft, this.carrier)
54
- return html`<section>
55
- <h3>${i18next.t('figure.label.group-carrier')}</h3>
56
- <div field>
57
- <label for="carrier-type">${i18next.t('figure.label.carrier-type')}</label>
58
- <input
59
- id="carrier-type"
60
- .value=${live(this.draft.type)}
61
- placeholder=${i18next.t('figure.text.carrier-type-placeholder')}
62
- @input=${(e: Event) => this.type('type', e)}
63
- @keydown=${this.enter}
64
- />
65
- </div>
66
- <div vector-row>
67
- <label>${i18next.t('figure.label.carrier-size')} <span unit>mm</span></label>
68
- <div triple>
69
- ${CARRIER_AXES.map(
70
- axis => html`<div cell>
71
- <span axis>${AXIS_LETTER[axis]}</span>
72
- <input
73
- type="number"
74
- min="0"
75
- step="any"
76
- aria-label=${i18next.t(`figure.label.carrier-${axis}`)}
77
- .value=${live(this.draft[axis])}
78
- @input=${(e: Event) => this.type(axis, e)}
79
- @keydown=${this.enter}
80
- />
81
- </div>`
82
- )}
83
- </div>
84
- </div>
85
- ${this.refusal ? html`<small role="alert">${this.refusal}</small>` : nothing}
86
- <div row>
87
- <button act ?disabled=${!pending} @click=${this.declare}>
88
- <md-icon>check</md-icon>${i18next.t('figure.button.declare-carrier')}
89
- </button>
90
- <button act ?disabled=${!this.carrier} @click=${this.clear}>
91
- <md-icon>close</md-icon>${i18next.t('figure.button.clear-carrier')}
92
- </button>
93
- </div>
94
- </section>`
95
- }
96
-
97
- private type(key: keyof CarrierDraft, event: Event) {
98
- this.draft = { ...this.draft, [key]: (event.target as HTMLInputElement).value }
99
- this.refusal = ''
100
- }
101
-
102
- private enter = (event: KeyboardEvent) => {
103
- if (event.key === 'Enter' && !draftIsDeclared(this.draft, this.carrier)) this.declare()
104
- }
105
-
106
- private declare = () => {
107
- const made = carrierCommandOf(this.draft, (key, params) => i18next.t(key, params))
108
- if ('refusal' in made) this.refusal = made.refusal
109
- else this.command(made.action)
110
- }
111
-
112
- private clear = () => this.command({ kind: 'set-carrier', carrier: null })
113
-
114
- private command(action: FigureAuthoringAction) {
115
- this.dispatchEvent(new CustomEvent('command', { detail: { action }, bubbles: true, composed: true }))
116
- }
117
- }
@@ -1,31 +0,0 @@
1
- import { type FigureAsset, type FigureAuthoringAction } from '@hatiolab/figure-model';
2
- type Say = (key: string, params: Record<string, string>) => string;
3
- type Declaration = NonNullable<FigureAsset['carrier']>;
4
- export declare const CARRIER_AXES: readonly ["width", "length", "height"];
5
- export type CarrierAxis = (typeof CARRIER_AXES)[number];
6
- /** What the field holds while the author types: the code and the three lengths as typed. */
7
- export type CarrierDraft = {
8
- type: string;
9
- } & Record<CarrierAxis, string>;
10
- /** The field's values for a declaration, or blank for a figure that declares none. */
11
- export declare function carrierDraftOf(carrier?: Declaration): CarrierDraft;
12
- /** Whether the field says what is declared already: nothing to send. */
13
- export declare function draftIsDeclared(draft: CarrierDraft, carrier?: Declaration): boolean;
14
- /**
15
- * The `set-carrier` command for what the field holds, or why the kernel would refuse it in the author's words. The
16
- * code is sent as the kernel stores it (trimmed, upper case).
17
- */
18
- export declare function carrierCommandOf(draft: CarrierDraft, say: Say): {
19
- action: FigureAuthoringAction;
20
- } | {
21
- refusal: string;
22
- };
23
- /**
24
- * A carrier declaration refused, said from its code and path (ADR-0127): the code missing or too long, or the length
25
- * the path names. The kernel's English is never shown; a code the field has no words for is said with the code.
26
- */
27
- export declare function carrierRefusalOf(refused: {
28
- code: string;
29
- path: string;
30
- }, type: string, say: Say): string;
31
- export {};
@@ -1,53 +0,0 @@
1
- /*
2
- * A figure that is a carrier type declares so (ADR-0123): the CARRIERTYPE code a material handling system reports, and
3
- * the carrier's physical size in mm. Kept apart from the element so it is tested without a browser.
4
- *
5
- * The rule is figure-model's (`carrierDeclarationRefusal`); the field asks it before sending `set-carrier`, so a value
6
- * the kernel refuses is said beside the field and never becomes a step of the history. The size is what the author
7
- * types, never read off the occupied room.
8
- */
9
- import { carrierDeclarationRefusal, FIGURE_CARRIER_TYPE_MAX, normalizeCarrierType } from '@hatiolab/figure-model';
10
- export const CARRIER_AXES = ['width', 'length', 'height'];
11
- /** The field's values for a declaration, or blank for a figure that declares none. */
12
- export function carrierDraftOf(carrier) {
13
- return {
14
- type: carrier?.type ?? '',
15
- width: carrier ? String(carrier.dimensions.width) : '',
16
- length: carrier ? String(carrier.dimensions.length) : '',
17
- height: carrier ? String(carrier.dimensions.height) : ''
18
- };
19
- }
20
- /** Whether the field says what is declared already: nothing to send. */
21
- export function draftIsDeclared(draft, carrier) {
22
- const declared = carrierDraftOf(carrier);
23
- return normalizeCarrierType(draft.type) === declared.type && CARRIER_AXES.every(axis => Object.is(lengthOf(draft[axis]), lengthOf(declared[axis])));
24
- }
25
- /** A typed length as a number; blank is no length. */
26
- const lengthOf = (typed) => (typed.trim() === '' ? Number.NaN : Number(typed));
27
- /**
28
- * The `set-carrier` command for what the field holds, or why the kernel would refuse it in the author's words. The
29
- * code is sent as the kernel stores it (trimmed, upper case).
30
- */
31
- export function carrierCommandOf(draft, say) {
32
- const carrier = {
33
- type: normalizeCarrierType(draft.type),
34
- dimensions: { width: lengthOf(draft.width), length: lengthOf(draft.length), height: lengthOf(draft.height) }
35
- };
36
- const refused = carrierDeclarationRefusal(carrier);
37
- if (refused)
38
- return { refusal: carrierRefusalOf(refused, carrier.type, say) };
39
- return { action: { kind: 'set-carrier', carrier } };
40
- }
41
- /**
42
- * A carrier declaration refused, said from its code and path (ADR-0127): the code missing or too long, or the length
43
- * the path names. The kernel's English is never shown; a code the field has no words for is said with the code.
44
- */
45
- export function carrierRefusalOf(refused, type, say) {
46
- if (refused.code === 'CARRIER_TYPE')
47
- return type ? say('figure.text.carrier-type-too-long', { max: String(FIGURE_CARRIER_TYPE_MAX) }) : say('figure.text.carrier-type-required', {});
48
- const axis = CARRIER_AXES.find(one => refused.path.endsWith(`.${one}`));
49
- if (refused.code === 'CARRIER_DIMENSIONS' && axis)
50
- return say('figure.text.carrier-length-positive', { axis: say(`figure.label.carrier-${axis}`, {}) });
51
- return say('figure.text.edit-refused', { code: refused.code });
52
- }
53
- //# sourceMappingURL=carrier-declaration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"carrier-declaration.js","sourceRoot":"","sources":["../../client/modeller/carrier-declaration.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * A figure that is a carrier type declares so (ADR-0123): the CARRIERTYPE code a material handling system reports, and\n * the carrier's physical size in mm. Kept apart from the element so it is tested without a browser.\n *\n * The rule is figure-model's (`carrierDeclarationRefusal`); the field asks it before sending `set-carrier`, so a value\n * the kernel refuses is said beside the field and never becomes a step of the history. The size is what the author\n * types, never read off the occupied room.\n */\nimport { carrierDeclarationRefusal, FIGURE_CARRIER_TYPE_MAX, normalizeCarrierType, type FigureAsset, type FigureAuthoringAction } from '@hatiolab/figure-model'\n\ntype Say = (key: string, params: Record<string, string>) => string\ntype Declaration = NonNullable<FigureAsset['carrier']>\n\nexport const CARRIER_AXES = ['width', 'length', 'height'] as const\nexport type CarrierAxis = (typeof CARRIER_AXES)[number]\n\n/** What the field holds while the author types: the code and the three lengths as typed. */\nexport type CarrierDraft = { type: string } & Record<CarrierAxis, string>\n\n/** The field's values for a declaration, or blank for a figure that declares none. */\nexport function carrierDraftOf(carrier?: Declaration): CarrierDraft {\n return {\n type: carrier?.type ?? '',\n width: carrier ? String(carrier.dimensions.width) : '',\n length: carrier ? String(carrier.dimensions.length) : '',\n height: carrier ? String(carrier.dimensions.height) : ''\n }\n}\n\n/** Whether the field says what is declared already: nothing to send. */\nexport function draftIsDeclared(draft: CarrierDraft, carrier?: Declaration): boolean {\n const declared = carrierDraftOf(carrier)\n return normalizeCarrierType(draft.type) === declared.type && CARRIER_AXES.every(axis => Object.is(lengthOf(draft[axis]), lengthOf(declared[axis])))\n}\n\n/** A typed length as a number; blank is no length. */\nconst lengthOf = (typed: string) => (typed.trim() === '' ? Number.NaN : Number(typed))\n\n/**\n * The `set-carrier` command for what the field holds, or why the kernel would refuse it in the author's words. The\n * code is sent as the kernel stores it (trimmed, upper case).\n */\nexport function carrierCommandOf(draft: CarrierDraft, say: Say): { action: FigureAuthoringAction } | { refusal: string } {\n const carrier = {\n type: normalizeCarrierType(draft.type),\n dimensions: { width: lengthOf(draft.width), length: lengthOf(draft.length), height: lengthOf(draft.height) }\n }\n const refused = carrierDeclarationRefusal(carrier)\n if (refused) return { refusal: carrierRefusalOf(refused, carrier.type, say) }\n return { action: { kind: 'set-carrier', carrier } }\n}\n\n/**\n * A carrier declaration refused, said from its code and path (ADR-0127): the code missing or too long, or the length\n * the path names. The kernel's English is never shown; a code the field has no words for is said with the code.\n */\nexport function carrierRefusalOf(refused: { code: string; path: string }, type: string, say: Say): string {\n if (refused.code === 'CARRIER_TYPE')\n return type ? say('figure.text.carrier-type-too-long', { max: String(FIGURE_CARRIER_TYPE_MAX) }) : say('figure.text.carrier-type-required', {})\n const axis = CARRIER_AXES.find(one => refused.path.endsWith(`.${one}`))\n if (refused.code === 'CARRIER_DIMENSIONS' && axis) return say('figure.text.carrier-length-positive', { axis: say(`figure.label.carrier-${axis}`, {}) })\n return say('figure.text.edit-refused', { code: refused.code })\n}\n"]}
@@ -1,26 +0,0 @@
1
- import { LitElement, type PropertyValues } from 'lit';
2
- import type { FigureAsset } from '@hatiolab/figure-model';
3
- declare const FigureCarrier_base: (new (...args: any[]) => LitElement) & typeof LitElement;
4
- /**
5
- * 캐리어 — the CARRIERTYPE code and physical size a carrier figure declares (ADR-0123), in the properties tab.
6
- *
7
- * Declaring and clearing are `set-carrier` commands, sent up as `command` like the tab's others, so the page runs them as
8
- * steps of the session's history: undo takes them back and they are saved with the figure. A value the kernel refuses
9
- * is said here and sends nothing.
10
- */
11
- export declare class FigureCarrier extends FigureCarrier_base {
12
- static styles: import("lit").CSSResult[];
13
- /** What the figure on screen declares; absent when it is not a carrier type. */
14
- carrier?: FigureAsset['carrier'];
15
- private draft;
16
- private refusal;
17
- private filledFrom?;
18
- willUpdate(changed: PropertyValues<this>): void;
19
- render(): import("lit-html").TemplateResult<1>;
20
- private type;
21
- private enter;
22
- private declare;
23
- private clear;
24
- private command;
25
- }
26
- export {};