@things-factory/figure-ui 10.1.170 → 10.1.171

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.170",
3
+ "version": "10.1.171",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -42,10 +42,10 @@
42
42
  "@operato/styles": "^10.0.0",
43
43
  "@operato/utils": "^10.0.0",
44
44
  "@things-factory/ai-assistant": "^10.1.170",
45
- "@things-factory/figure-service": "^10.1.170",
46
- "@things-factory/figure-viewer": "^10.1.170",
45
+ "@things-factory/figure-service": "^10.1.171",
46
+ "@things-factory/figure-viewer": "^10.1.171",
47
47
  "@things-factory/setting-base": "^10.1.167",
48
48
  "three": "^0.185.1"
49
49
  },
50
- "gitHead": "1956b73789eace6376f1d79443306e1bb8e61908"
50
+ "gitHead": "e88536db0bc3cbb759fe58f9efeef66a67fef2c3"
51
51
  }
@@ -717,7 +717,9 @@ describe('a part follows the figure size in one step (follow-size, 2026-09-26)',
717
717
  assert.equal(after.revision, start.revision + 1, 'one step')
718
718
  assert.deepEqual(await read(() => probe.fields('size.')), { 'size.x': 400, 'size.y': 400, 'size.z': 400 }, 'the size is the box as it stands')
719
719
  const notice = await read(() => (window.__told ?? []).filter(n => n.level === 'info').at(-1)?.message ?? null)
720
- assert.ok(notice?.includes('figure.text.size-declared-to-follow'), `a line says so: ${notice}`)
720
+ /* The box had no space declared either: the same step declared it, and the one line says both (ruling 2026-10-16, Q1 A). */
721
+ assert.ok(notice?.includes('figure.text.size-and-space-declared-to-follow'), `a line says so: ${notice}`)
722
+ assert.equal(await read(() => !!document.querySelector('figure-editor').session.revisionNow().asset.occupancy), true, 'the space declared by the same step')
721
723
  const grown = await read(() => {
722
724
  const editor = document.querySelector('figure-editor')
723
725
  editor.session.apply([{ kind: 'set-design', input: 'size.x', unit: 'mm', value: 800 }])
@@ -73,7 +73,8 @@ const FIGURES = {
73
73
  a = applyFigureAuthoring(a, { kind: 'attach', part: 'roller', face: 'bottom', to: { part: 'frame', face: 'top' } })
74
74
  a = applyFigureAuthoring(a, { kind: 'follow-size', part: 'frame', axes: ['x'] })
75
75
  a = applyFigureAuthoring(a, { kind: 'make-repeat', part: 'roller', axis: 'x', pitch: 200 })
76
- return applyFigureAuthoring(a, { kind: 'declare-occupancy', proposal: proposeFigureOccupancy(a, { over: 'range' }) })
76
+ /* A space wider than the parts, as a spin swept or a padding gives: the box is the space, not the size (2026-10-16). */
77
+ return applyFigureAuthoring(a, { kind: 'declare-occupancy', proposal: proposeFigureOccupancy(a, { over: 'range' }), padding: { x: 100, y: 0, z: 0 } })
77
78
  },
78
79
  /* The robot arm with a clip that turns its base: controls and a clip in the preview. */
79
80
  'arm-clip': () => editFigurePart(robotArmFigure(), { kind: 'set-driver', state: 'j1-base', clip: 'cycle', duration: 4, keys: [{ seconds: 0, value: 0 }, { seconds: 4, value: 60 }] })
@@ -774,7 +774,8 @@ describe('the preview stands one figure the author stretches (first 15 minutes,
774
774
  slider.dispatchEvent(new Event('input'))
775
775
  slider.dispatchEvent(new Event('change'))
776
776
  })
777
- await until('the figure 6 m wide', () => Math.round(screenCheck.deep('figure-preview')[0].scene.root.components[0].model.width) === 6000)
777
+ /* The box is the space the figure takes at 6 m: the frame and its 100 mm padding either side. */
778
+ await until('the figure 6 m wide, in its space', () => Math.round(screenCheck.deep('figure-preview')[0].scene.root.components[0].model.width) === 6200)
778
779
  const said = await read(() => screenCheck.deep('figure-preview')[0].shadowRoot.querySelector('div[sizes] p[said]').textContent.trim())
779
780
  assert.ok(said.startsWith('6,000 × '), said)
780
781
  const box = await read(() => { const m = screenCheck.deep('figure-preview')[0].scene.root.components[0].model; return m.left + m.width / 2 })