@things-factory/figure-ui 10.1.195 → 10.1.197

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/figure-ui",
3
- "version": "10.1.195",
3
+ "version": "10.1.197",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -48,5 +48,5 @@
48
48
  "@things-factory/setting-base": "^10.1.192",
49
49
  "three": "^0.185.1"
50
50
  },
51
- "gitHead": "e22e6dec8be22ba1d8db7bf511f3bacee721ff8f"
51
+ "gitHead": "0e171ba86a1199cca0a2a2baf8f2f6387f789487"
52
52
  }
@@ -602,6 +602,18 @@ function twisted() {
602
602
  return fasten(box(a, 'blade', [300, 20, 60], [0, 110, 0]), 'blade', 'hub', { twist: 30 })
603
603
  }
604
604
 
605
+ /* The same blade, every side of it following the hub's (as the fan's blade-2 on :3300): no size of its own to type. */
606
+ function twistedFollowing() {
607
+ let a = twisted()
608
+ for (const axis of ['x', 'y', 'z']) a = applyFigureAuthoring(a, { kind: 'link-dimension', part: 'blade', axis, source: { of: 'part', part: 'hub', axis } })
609
+ return a
610
+ }
611
+
612
+ /* The same blade made to follow the figure's size: a drag grows it beside its rule, but no size field is its own to type. */
613
+ function twistedFollowingSize() {
614
+ return applyFigureAuthoring(twisted(), { kind: 'follow-size', part: 'blade' })
615
+ }
616
+
605
617
  describe('a part fastened twisted is not sized by a drag', () => {
606
618
  test('the resize tool is off, and a size drag that still arrives is not written: a notice says why, in one line, with the way to its size', async () => {
607
619
  await mount('twisted', twisted())
@@ -630,6 +642,26 @@ describe('a part fastened twisted is not sized by a drag', () => {
630
642
  await until(() => probe.focused()?.label?.startsWith('blade.size.'), [], 'the blade\'s size field focused')
631
643
  assert.equal(await read(() => look.tab()), 'figure.label.tab-short-properties')
632
644
  })
645
+
646
+ /*
647
+ :3300, 2026-10-19 (the fan's blade-2): a part whose size is not its own to type was told it was attached turned and
648
+ offered a way to size fields it could not type in. Its size is worked out, so it is said so, with no button.
649
+ */
650
+ for (const [label, make] of [['another part', 'twistedFollowing'], ['the figure\'s size', 'twistedFollowingSize']])
651
+ test(`a part whose size follows ${label} is not told it is attached turned, nor sent to size fields it cannot type in`, async () => {
652
+ await mount(`twisted-${make}`, make === 'twistedFollowing' ? twistedFollowing() : twistedFollowingSize())
653
+ await pick('blade')
654
+ await read(() => probe.told())
655
+ await page().keyboard.press('KeyR')
656
+ await sleep(400)
657
+ const told = await read(() => probe.told())
658
+ assert.deepEqual(told.filter(n => n.action), [], `no way to size fields: ${JSON.stringify(told)}`)
659
+ assert.ok(!told.some(n => n.message === 'figure.text.gizmo-size-turned-fastening'), 'not said to be attached turned')
660
+ /* R does what the bar's resize tool does, off for this part: no gizmo it cannot use, and the tool's own words (:3300, 10.1.196). */
661
+ assert.equal((await state()).attached, null, 'no gizmo on it')
662
+ assert.deepEqual(told, [{ level: 'info', message: 'figure.text.gizmo-not-own', action: null }])
663
+ })
664
+
633
665
  })
634
666
 
635
667
  describe('a box made to follow the figure size on the floor', () => {