@things-factory/figure-ui 10.1.159 → 10.1.160
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/graphql/index.ts +38 -0
- package/client/index.ts +1 -0
- package/client/modeller/figure-links.ts +21 -6
- package/client/modeller/links.ts +13 -0
- package/client/setting-let/figure-namespace-setting-let.ts +84 -0
- package/dist-client/graphql/index.d.ts +13 -0
- package/dist-client/graphql/index.js +24 -0
- package/dist-client/graphql/index.js.map +1 -1
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +1 -0
- package/dist-client/index.js.map +1 -1
- package/dist-client/modeller/figure-links.js +21 -7
- package/dist-client/modeller/figure-links.js.map +1 -1
- package/dist-client/modeller/links.d.ts +13 -0
- package/dist-client/modeller/links.js +11 -0
- package/dist-client/modeller/links.js.map +1 -1
- package/dist-client/setting-let/figure-namespace-setting-let.d.ts +18 -0
- package/dist-client/setting-let/figure-namespace-setting-let.js +93 -0
- package/dist-client/setting-let/figure-namespace-setting-let.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/test/links.test.ts +29 -0
- package/translations/en.json +8 -1
- package/translations/es.json +8 -1
- package/translations/ja.json +8 -1
- package/translations/ko.json +8 -1
- package/translations/ms.json +8 -1
- package/translations/zh.json +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-ui",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.160",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
"@operato/slot-layout-editor": "^10.29.25",
|
|
42
42
|
"@operato/styles": "^10.0.0",
|
|
43
43
|
"@operato/utils": "^10.0.0",
|
|
44
|
-
"@things-factory/ai-assistant": "^10.1.
|
|
45
|
-
"@things-factory/figure-service": "^10.1.
|
|
44
|
+
"@things-factory/ai-assistant": "^10.1.160",
|
|
45
|
+
"@things-factory/figure-service": "^10.1.160",
|
|
46
46
|
"@things-factory/figure-viewer": "^10.1.155",
|
|
47
|
+
"@things-factory/setting-base": "^10.1.159",
|
|
47
48
|
"three": "^0.185.1"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b5e86be374e8b913a3f2b8459b6001e8f44e345b"
|
|
50
51
|
}
|
package/test/links.test.ts
CHANGED
|
@@ -645,6 +645,35 @@ test('붙이기 칸은 부품 제 붙임으로 열린다 — 가운데로 붙은
|
|
|
645
645
|
assert.ok(!ownFacesOf(asset, 'roller', true).includes('centre'), 'on the floor, by a face only')
|
|
646
646
|
})
|
|
647
647
|
|
|
648
|
+
test('a worked-out gap is kept by the fastening form: opening it on the part moves nothing (the robot dog, the forklift, 2026-10-13)', async () => {
|
|
649
|
+
const { fastenGapOf } = await import('../client/modeller/links.ts')
|
|
650
|
+
const { compileFigureAsset, robotDogFigure } = await import('@hatiolab/figure-model')
|
|
651
|
+
const posesOf = (asset: FigureAsset) =>
|
|
652
|
+
Object.fromEntries((compileFigureAsset(asset).evaluate().geometry as unknown as Array<{ id: string; pose?: { t: number[] } }>).map(g => [g.id, g.pose?.t.map(v => Math.round(v * 1000) / 1000)]))
|
|
653
|
+
/* What the form sends when nothing in it is changed: the attach it would make of the part's own fastening. */
|
|
654
|
+
const reattach = (asset: FigureAsset, part: string, form: Parameters<typeof fastenGapOf>[0]) =>
|
|
655
|
+
applyFigureAuthoring(asset, { kind: 'attach', part, face: 'bottom', to: { plane: 'mounting-plane' }, ...fastenGapOf(form), twist: 0, replace: true } as never)
|
|
656
|
+
|
|
657
|
+
const dog = robotDogFigure().asset
|
|
658
|
+
const body = fasteningOf(revisionOf(dog), 'body')!
|
|
659
|
+
assert.deepEqual(body.gapKept, dog.joints!.find(j => j.id === 'body')!.origin!.gap, 'the sum of the leg lengths, as written')
|
|
660
|
+
assert.deepEqual(posesOf(reattach(dog, 'body', body)), posesOf(dog), 'the body and everything hung from it stay where they stand')
|
|
661
|
+
/* The defect it replaces: read as the number 0, the body dropped to the floor and its legs below it. */
|
|
662
|
+
assert.notDeepEqual(posesOf(reattach(dog, 'body', { gap: body.gap })), posesOf(dog))
|
|
663
|
+
|
|
664
|
+
/* A gap that is a share of the instance height, as the forklift's is. */
|
|
665
|
+
let lift = addFigureBox(createFigureAsset('Lift'), { id: 'body', size: { x: 1000, y: 800, z: 600 }, position: { x: 0, y: 500, z: 0 } })
|
|
666
|
+
lift.document.model.inputs.push({ id: 'size.y', unit: 'mm', min: 100, max: 20000, role: 'design' } as never)
|
|
667
|
+
lift.designInputs['size.y'] = 1800
|
|
668
|
+
lift = applyFigureAuthoring(lift, { kind: 'attach', part: 'body', face: 'bottom', to: { plane: 'mounting-plane' }, gap: { from: { of: 'instance', axis: 'y' }, times: 0.05 } } as never)
|
|
669
|
+
const kept = fasteningOf(revisionOf(lift), 'body')!
|
|
670
|
+
assert.deepEqual(kept.gapKept, { from: { of: 'instance', axis: 'y' }, times: 0.05 })
|
|
671
|
+
assert.deepEqual(posesOf(reattach(lift, 'body', kept)), posesOf(lift))
|
|
672
|
+
/* A number typed in the form is a number again. */
|
|
673
|
+
assert.deepEqual(fastenGapOf({ gap: 20 }), { gap: 20 })
|
|
674
|
+
assert.deepEqual(fastenGapOf({ gap: 0 }), {})
|
|
675
|
+
})
|
|
676
|
+
|
|
648
677
|
test('a follower of several leaders and a stroke that is a sum of lengths are written back unchanged by the motion form (ADR-0107)', async () => {
|
|
649
678
|
const { motionFormOf, motionJoint, motionOf } = await import('../client/modeller/links.ts')
|
|
650
679
|
const { palletizerRobotFigure } = await import('@hatiolab/figure-model')
|
package/translations/en.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "Details",
|
|
556
556
|
"figure.label.facing": "How faces meet",
|
|
557
557
|
"figure.text.fasten-summary-gap": "gap {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "gap worked out by a formula",
|
|
558
559
|
"figure.text.fasten-summary-twist": "twist {degrees}°",
|
|
559
560
|
"figure.label.gap": "gap (mm)",
|
|
560
561
|
"figure.label.align": "within the face",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "(moves {mm} mm on {axis})",
|
|
830
831
|
"figure.text.held-by-rule": "A rule places this part.",
|
|
831
832
|
"figure.text.held-on-plane": "{face} kept on the {place} (gap {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face} kept on the {place} (gap worked out by a formula)",
|
|
832
834
|
"figure.text.held-on-part": "Attached by its {face} to the {otherFace} of {other}",
|
|
833
835
|
"figure.button.open-fastening": "Open attachment settings",
|
|
834
836
|
"figure.button.detach-held": "Detach",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "The speed of {group} is 0 to 3.",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "Choose which clip of {group} plays.",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "The key {value} of {input} is outside {min} to {max}; a grouped clip keys inside the range.",
|
|
1111
|
-
"figure.label.tab-short-data": "Data"
|
|
1113
|
+
"figure.label.tab-short-data": "Data",
|
|
1114
|
+
"figure.title.namespace-setting": "Figure namespace",
|
|
1115
|
+
"figure.label.namespace": "Namespace",
|
|
1116
|
+
"figure.text.namespace-fixed": "Figures have been made under this namespace, so it cannot change.",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "Left empty, the subdomain {subdomain} is used. It cannot change once a figure is made.",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "The subdomain {subdomain} cannot be a namespace. Enter one, for example hatiolab.com."
|
|
1112
1119
|
}
|
package/translations/es.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "Detalles",
|
|
556
556
|
"figure.label.facing": "Cómo se unen las caras",
|
|
557
557
|
"figure.text.fasten-summary-gap": "separación {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "separación calculada por una fórmula",
|
|
558
559
|
"figure.text.fasten-summary-twist": "torsión {degrees}°",
|
|
559
560
|
"figure.label.gap": "separación (mm)",
|
|
560
561
|
"figure.label.align": "dentro de la cara",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "(se mueve {mm} mm en {axis})",
|
|
830
831
|
"figure.text.held-by-rule": "Una regla coloca esta pieza.",
|
|
831
832
|
"figure.text.held-on-plane": "{face} mantenida en {place} (separación {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face} mantenida en {place} (separación calculada por una fórmula)",
|
|
832
834
|
"figure.text.held-on-part": "Unida por su {face} a {otherFace} de {other}",
|
|
833
835
|
"figure.button.open-fastening": "Abrir la configuración de unión",
|
|
834
836
|
"figure.button.detach-held": "Separar",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "La velocidad de {group} es de 0 a 3.",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "Elija qué clip de {group} se reproduce.",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "La clave {value} de {input} está fuera de {min} a {max}; un clip de grupo usa claves dentro del rango.",
|
|
1111
|
-
"figure.label.tab-short-data": "Datos"
|
|
1113
|
+
"figure.label.tab-short-data": "Datos",
|
|
1114
|
+
"figure.title.namespace-setting": "Namespace de Figure",
|
|
1115
|
+
"figure.label.namespace": "Namespace",
|
|
1116
|
+
"figure.text.namespace-fixed": "Ya hay figuras creadas con este namespace, por lo que no puede cambiar.",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "Si se deja vacío, se usa el subdominio {subdomain}. No puede cambiar una vez creada una figura.",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "El subdominio {subdomain} no puede ser un namespace. Escriba uno, por ejemplo hatiolab.com."
|
|
1112
1119
|
}
|
package/translations/ja.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "詳細",
|
|
556
556
|
"figure.label.facing": "接し方",
|
|
557
557
|
"figure.text.fasten-summary-gap": "間隔 {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "間隔は式で決まる",
|
|
558
559
|
"figure.text.fasten-summary-twist": "ひねり {degrees}°",
|
|
559
560
|
"figure.label.gap": "gap (mm)",
|
|
560
561
|
"figure.label.align": "within the face",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "({axis} {mm} mm 移動)",
|
|
830
831
|
"figure.text.held-by-rule": "規則がこの部品の位置を決めます。",
|
|
831
832
|
"figure.text.held-on-plane": "{face}を{place}に保持中 (間隔 {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face}を{place}に保持中 (間隔は式で決まる)",
|
|
832
834
|
"figure.text.held-on-part": "{other}の{otherFace}に{face}で取り付け",
|
|
833
835
|
"figure.button.open-fastening": "取り付け設定を開く",
|
|
834
836
|
"figure.button.detach-held": "取り付けを外す",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "{group} の速度は 0 ~ 3 です。",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "{group} で再生するクリップを選びます。",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "{input} のキー {value} が範囲 {min} ~ {max} の外です。グループのクリップは範囲内のキーだけを使います。",
|
|
1111
|
-
"figure.label.tab-short-data": "データ"
|
|
1113
|
+
"figure.label.tab-short-data": "データ",
|
|
1114
|
+
"figure.title.namespace-setting": "Figure 名前空間",
|
|
1115
|
+
"figure.label.namespace": "名前空間",
|
|
1116
|
+
"figure.text.namespace-fixed": "この名前空間で Figure を作成済みのため変更できません。",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "空欄ならサブドメイン {subdomain} を使います。Figure を作成すると変更できません。",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "サブドメイン {subdomain} は名前空間に使えません。例: hatiolab.com"
|
|
1112
1119
|
}
|
package/translations/ko.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "세부",
|
|
556
556
|
"figure.label.facing": "닿는 방식",
|
|
557
557
|
"figure.text.fasten-summary-gap": "간격 {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "간격은 식으로 정해짐",
|
|
558
559
|
"figure.text.fasten-summary-twist": "비틀기 {degrees}°",
|
|
559
560
|
"figure.label.gap": "간격 (mm)",
|
|
560
561
|
"figure.label.align": "면 안 위치",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "({axis} {mm} mm 이동)",
|
|
830
831
|
"figure.text.held-by-rule": "규칙이 이 부품의 자리를 정합니다.",
|
|
831
832
|
"figure.text.held-on-plane": "{face}을 {place}에 유지 중 (간격 {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face}을 {place}에 유지 중 (간격은 식으로 정해짐)",
|
|
832
834
|
"figure.text.held-on-part": "{other}의 {otherFace}에 {face}으로 붙어 있음",
|
|
833
835
|
"figure.button.open-fastening": "붙임 설정 열기",
|
|
834
836
|
"figure.button.detach-held": "붙임 풀기",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "{group} 그룹의 배속은 0 ~ 3입니다.",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "{group} 그룹에서 재생할 클립을 고릅니다.",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "{input} 조작값의 키 {value} 값이 범위 {min} ~ {max} 밖입니다. 그룹의 클립은 범위 안의 키만 씁니다.",
|
|
1111
|
-
"figure.label.tab-short-data": "데이터"
|
|
1113
|
+
"figure.label.tab-short-data": "데이터",
|
|
1114
|
+
"figure.title.namespace-setting": "Figure 이름공간",
|
|
1115
|
+
"figure.label.namespace": "이름공간",
|
|
1116
|
+
"figure.text.namespace-fixed": "이 이름공간으로 Figure를 만들어서 바꿀 수 없습니다.",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "비워 두면 서브도메인 {subdomain} 값을 씁니다. Figure를 만들고 나면 바꿀 수 없습니다.",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "서브도메인 {subdomain} 값은 이름공간으로 쓸 수 없습니다. 예: hatiolab.com"
|
|
1112
1119
|
}
|
package/translations/ms.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "Butiran",
|
|
556
556
|
"figure.label.facing": "Cara muka bertemu",
|
|
557
557
|
"figure.text.fasten-summary-gap": "jarak {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "jarak ditentukan oleh formula",
|
|
558
559
|
"figure.text.fasten-summary-twist": "pulasan {degrees}°",
|
|
559
560
|
"figure.label.gap": "gap (mm)",
|
|
560
561
|
"figure.label.align": "within the face",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "(bergerak {mm} mm pada {axis})",
|
|
830
831
|
"figure.text.held-by-rule": "Satu peraturan meletakkan bahagian ini.",
|
|
831
832
|
"figure.text.held-on-plane": "{face} dikekalkan pada {place} (jarak {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face} dikekalkan pada {place} (jarak ditentukan oleh formula)",
|
|
832
834
|
"figure.text.held-on-part": "Dilekatkan dengan {face} pada {otherFace} {other}",
|
|
833
835
|
"figure.button.open-fastening": "Buka tetapan lekatan",
|
|
834
836
|
"figure.button.detach-held": "Tanggalkan",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "Kelajuan {group} ialah 0 hingga 3.",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "Pilih klip {group} yang dimainkan.",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "Kunci {value} bagi {input} di luar {min} hingga {max}; klip berkumpulan mesti dalam julat.",
|
|
1111
|
-
"figure.label.tab-short-data": "Data"
|
|
1113
|
+
"figure.label.tab-short-data": "Data",
|
|
1114
|
+
"figure.title.namespace-setting": "Namespace Figure",
|
|
1115
|
+
"figure.label.namespace": "Namespace",
|
|
1116
|
+
"figure.text.namespace-fixed": "Figure telah dibuat di bawah namespace ini, jadi ia tidak boleh diubah.",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "Jika dibiarkan kosong, subdomain {subdomain} digunakan. Ia tidak boleh diubah selepas figure dibuat.",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "Subdomain {subdomain} tidak boleh menjadi namespace. Masukkan satu, contohnya hatiolab.com."
|
|
1112
1119
|
}
|
package/translations/zh.json
CHANGED
|
@@ -555,6 +555,7 @@
|
|
|
555
555
|
"figure.label.fasten-detail": "详细",
|
|
556
556
|
"figure.label.facing": "接触方式",
|
|
557
557
|
"figure.text.fasten-summary-gap": "间距 {mm} mm",
|
|
558
|
+
"figure.text.fasten-summary-gap-worked-out": "间距由公式决定",
|
|
558
559
|
"figure.text.fasten-summary-twist": "扭转 {degrees}°",
|
|
559
560
|
"figure.label.gap": "gap (mm)",
|
|
560
561
|
"figure.label.align": "within the face",
|
|
@@ -829,6 +830,7 @@
|
|
|
829
830
|
"figure.text.resize-move": "({axis} 方向移动 {mm} mm)",
|
|
830
831
|
"figure.text.held-by-rule": "由规则决定此部件的位置。",
|
|
831
832
|
"figure.text.held-on-plane": "{face}保持在{place}上(间距 {gap} mm)",
|
|
833
|
+
"figure.text.held-on-plane-worked-out": "{face}保持在{place}上(间距由公式决定)",
|
|
832
834
|
"figure.text.held-on-part": "以{face}附着在{other}的{otherFace}上",
|
|
833
835
|
"figure.button.open-fastening": "打开附着设置",
|
|
834
836
|
"figure.button.detach-held": "解除附着",
|
|
@@ -1108,5 +1110,10 @@
|
|
|
1108
1110
|
"figure.text.motion-setting-speed-out-of-range": "{group} 的倍速为 0 ~ 3。",
|
|
1109
1111
|
"figure.text.motion-setting-group-selection-required": "请选择 {group} 播放的片段。",
|
|
1110
1112
|
"figure.text.motion-key-outside-range": "{input} 的关键帧 {value} 超出 {min} ~ {max};组内片段只能在范围内设关键帧。",
|
|
1111
|
-
"figure.label.tab-short-data": "数据"
|
|
1113
|
+
"figure.label.tab-short-data": "数据",
|
|
1114
|
+
"figure.title.namespace-setting": "Figure 命名空间",
|
|
1115
|
+
"figure.label.namespace": "命名空间",
|
|
1116
|
+
"figure.text.namespace-fixed": "已用此命名空间创建 Figure,无法更改。",
|
|
1117
|
+
"figure.text.namespace-empty-takes-subdomain": "留空则使用子域名 {subdomain}。创建 Figure 后无法更改。",
|
|
1118
|
+
"figure.text.namespace-subdomain-unusable": "子域名 {subdomain} 不能用作命名空间。例如 hatiolab.com"
|
|
1112
1119
|
}
|