@things-factory/figure-ui 10.1.127 → 10.1.129
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/modeller/editor.ts +10 -1
- package/client/modeller/figure-preview.ts +19 -1
- package/dist-client/modeller/editor.d.ts +2 -0
- package/dist-client/modeller/editor.js +11 -1
- package/dist-client/modeller/editor.js.map +1 -1
- package/dist-client/modeller/figure-preview.d.ts +7 -0
- package/dist-client/modeller/figure-preview.js +24 -1
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/tsconfig.scratch.tsbuildinfo +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/test/mode-switch.test.ts +8 -6
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.129",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@operato/shell": "^10.0.0",
|
|
41
41
|
"@operato/styles": "^10.0.0",
|
|
42
42
|
"@operato/utils": "^10.0.0",
|
|
43
|
-
"@things-factory/ai-assistant": "^10.1.
|
|
44
|
-
"@things-factory/figure-service": "^10.1.
|
|
43
|
+
"@things-factory/ai-assistant": "^10.1.129",
|
|
44
|
+
"@things-factory/figure-service": "^10.1.129",
|
|
45
45
|
"three": "^0.185.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "4d1ef242d9b7e6669a34c27b6d31aed778c07a90"
|
|
48
48
|
}
|
package/test/mode-switch.test.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Going
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* dearer (a box added went from 240 ms to over a second, 2026-10-08).
|
|
2
|
+
* Going between editing and the preview does not build a 3D scene each time (about 300 ms): the edit canvas and, once it
|
|
3
|
+
* has been asked for, the preview stay standing and one of them is out of sight. A preview shown again after the figure
|
|
4
|
+
* changed makes its content again inside its scene (below); one that did not change is shown as it was.
|
|
6
5
|
*/
|
|
7
6
|
import { test } from 'node:test'
|
|
8
7
|
import assert from 'node:assert/strict'
|
|
@@ -17,9 +16,12 @@ test('the edit canvas stays standing, out of sight, while the preview is in fron
|
|
|
17
16
|
assert.ok(/div\[middle\]\[hidden\]\s*\{\s*display: none;/.test(editor), 'and hidden by the stylesheet, which `display: flex` would otherwise override')
|
|
18
17
|
})
|
|
19
18
|
|
|
20
|
-
test('the preview is
|
|
19
|
+
test('the preview is made when first asked for and kept, out of sight, after that', () => {
|
|
21
20
|
const editor = read('../client/modeller/editor.ts')
|
|
22
|
-
assert.ok(editor.includes("
|
|
21
|
+
assert.ok(editor.includes("if (this.middle === 'preview') this.previewMounted = true"), 'made when asked for')
|
|
22
|
+
assert.ok(editor.includes("${this.previewMounted\n ? html`<figure-preview\n ?hidden=${this.middle !== 'preview'}\n .active=${this.middle === 'preview'}"), 'then kept, hidden and not in front')
|
|
23
|
+
const preview = read('../client/modeller/figure-preview.ts')
|
|
24
|
+
assert.ok(preview.includes('if (!this.active) {\n this.stale = true') && preview.includes('this.stale || changed.has(\'active\')'), 'out of sight it does not follow the figure; shown again it catches up')
|
|
23
25
|
})
|
|
24
26
|
|
|
25
27
|
test('a canvas out of sight is not resized to nothing and takes no picture', () => {
|