@things-factory/figure-ui 10.1.170 → 10.1.172

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.172",
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.172",
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": "6c653ce8573f7a0d64c7f7f930605f816c35d69f"
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,11 +774,21 @@ 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 })
781
782
  assert.equal(Math.round(box), await read(() => screenCheck.deep('figure-preview')[0].board.width / 2), 'grown about the board\'s centre')
783
+ /* From one figure to eight, the view is fitted to them again: the camera kept from the one stood inside the eight. */
784
+ await read(() => {
785
+ const scene = screenCheck.deep('figure-preview')[0].scene
786
+ const fit = scene.fit.bind(scene)
787
+ window.previewFits = 0
788
+ scene.fit = type => (window.previewFits++, fit(type))
789
+ })
790
+ await press('the eight sizes', () => screenCheck.deep('figure-preview')[0].shadowRoot.querySelector('button[way=eight]'))
791
+ await until('the eight, fitted', () => screenCheck.deep('figure-preview')[0].scene.root.components.length === 8 && window.previewFits >= 1)
782
792
  await boardsUp()
783
793
  })
784
794
  })
@@ -983,6 +993,21 @@ describe('the modeller page: the editor with the page\'s figure panel, verdict a
983
993
  await open('fig-a')
984
994
  })
985
995
 
996
+ /* First 15 minutes, again (2026-10-16 evening): a new figure, nothing in it yet, showed 「발행 막힘 1」 in red from the start. */
997
+ test('a figure with no parts has nothing red beside 「발행」; the verdict still holds what blocks it', async () => {
998
+ const answer = blocked => read(blocked => product.answer('inspectFigureDraft', () => ({ __typename: 'FigureInspection', blocked, findings: blocked ? [alone.finding('occupancy-undeclared')] : [] })), blocked)
999
+ await answer(true)
1000
+ try {
1001
+ await open('fig-empty-bar', 'empty', 'probe-empty-bar')
1002
+ await until('the page has the verdict', () => screenCheck.editor().releaseBlockers.length === 1)
1003
+ assert.equal(await read(() => !!screenCheck.editor().shadowRoot.querySelector('ox-canvas-bar button[release-blocked]')), false)
1004
+ assert.equal(await read(() => !!screenCheck.editor().shadowRoot.querySelector('ox-canvas-bar button[publish]')), true, '「발행」 is still there')
1005
+ } finally {
1006
+ await read(() => product.answer('inspectFigureDraft'))
1007
+ await open('fig-a')
1008
+ }
1009
+ })
1010
+
986
1011
  test('the figure\'s type is the first field of the figure panel, under its heading', async () => {
987
1012
  await pressTab(TAB('properties'))
988
1013
  const first = await read(() => {