@dreamerbird/camera-studio 0.0.0-stage → 0.2.0
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/LICENSE +866 -0
- package/assets/models/Y Bot.glb +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-base-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-base-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-relaxed-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-relaxed-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-straight-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-straight-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-03-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-03-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-04-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-04-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-05-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-05-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-06-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-06-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-bowl-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-bowl-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-card-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-card-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-claw-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-claw-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-fist-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-fist-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-grip-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-grip-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-ko-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-ko-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-offer-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-offer-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-the-button-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-the-button-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-scratch-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-scratch-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-spread-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-spread-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-write-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-write-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-cobblepot-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-cobblepot-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fingers-crossed-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fingers-crossed-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-five-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-five-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-ring-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-ring-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fu-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fu-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-index-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-index-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-martian-reactor-switch-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-martian-reactor-switch-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-one-does-not-simply-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-one-does-not-simply-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-flipped-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-flipped.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-perfect-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-perfect-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-pinky-swear-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-pinky-swear-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-rock-out-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-rock-out-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-scout-salute-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-scout-salute-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-spock-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-spock-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-stop-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-stop-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-flipped-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-flipped-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-hicox-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-hicox-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-ring-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-ring-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-thumbs-up-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-thumbs-up-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-detonator-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-detonator-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-grip-sword-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-grip-sword-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-03-l-cock-the-hammer.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-03-r-cock-the-hammer.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-hadoken-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-hadoken-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-double-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-double-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-throw-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-throw-r.png +0 -0
- package/dist/Anchors.d.ts +11 -0
- package/dist/Anchors.d.ts.map +1 -0
- package/dist/Anchors.js +315 -0
- package/dist/App.hostFlows.test.d.ts +2 -0
- package/dist/App.hostFlows.test.d.ts.map +1 -0
- package/dist/App.hostFlows.test.js +48 -0
- package/dist/CameraPath.d.ts +130 -0
- package/dist/CameraPath.d.ts.map +1 -0
- package/dist/CameraPath.js +920 -0
- package/dist/CameraScene.d.ts +45 -0
- package/dist/CameraScene.d.ts.map +1 -0
- package/dist/CameraScene.js +1777 -0
- package/dist/CameraScene.test.d.ts +2 -0
- package/dist/CameraScene.test.d.ts.map +1 -0
- package/dist/CameraScene.test.js +259 -0
- package/dist/PathPresetDropRig.d.ts +27 -0
- package/dist/PathPresetDropRig.d.ts.map +1 -0
- package/dist/PathPresetDropRig.js +192 -0
- package/dist/PathPresetThumb.d.ts +11 -0
- package/dist/PathPresetThumb.d.ts.map +1 -0
- package/dist/PathPresetThumb.js +85 -0
- package/dist/PipCameraSelector.d.ts +15 -0
- package/dist/PipCameraSelector.d.ts.map +1 -0
- package/dist/PipCameraSelector.js +92 -0
- package/dist/PlacementManager.d.ts +252 -0
- package/dist/PlacementManager.d.ts.map +1 -0
- package/dist/PlacementManager.js +1552 -0
- package/dist/ShotCamera.d.ts +21 -0
- package/dist/ShotCamera.d.ts.map +1 -0
- package/dist/ShotCamera.js +568 -0
- package/dist/TopToolbar.d.ts +43 -0
- package/dist/TopToolbar.d.ts.map +1 -0
- package/dist/TopToolbar.js +167 -0
- package/dist/TopToolbar.test.d.ts +2 -0
- package/dist/TopToolbar.test.d.ts.map +1 -0
- package/dist/TopToolbar.test.js +107 -0
- package/dist/agent/api.d.ts +95 -0
- package/dist/agent/api.d.ts.map +1 -0
- package/dist/agent/api.js +337 -0
- package/dist/agent/api.test.d.ts +2 -0
- package/dist/agent/api.test.d.ts.map +1 -0
- package/dist/agent/api.test.js +907 -0
- package/dist/agent/bridgeClient.d.ts +62 -0
- package/dist/agent/bridgeClient.d.ts.map +1 -0
- package/dist/agent/bridgeClient.js +277 -0
- package/dist/agent/bridgeClient.test.d.ts +2 -0
- package/dist/agent/bridgeClient.test.d.ts.map +1 -0
- package/dist/agent/bridgeClient.test.js +413 -0
- package/dist/agent/bridgeFiles.d.ts +33 -0
- package/dist/agent/bridgeFiles.d.ts.map +1 -0
- package/dist/agent/bridgeFiles.js +193 -0
- package/dist/agent/bridgeFiles.test.d.ts +2 -0
- package/dist/agent/bridgeFiles.test.d.ts.map +1 -0
- package/dist/agent/bridgeFiles.test.js +220 -0
- package/dist/agent/commands/anchors.d.ts +43 -0
- package/dist/agent/commands/anchors.d.ts.map +1 -0
- package/dist/agent/commands/anchors.js +331 -0
- package/dist/agent/commands/anchors.test.d.ts +2 -0
- package/dist/agent/commands/anchors.test.d.ts.map +1 -0
- package/dist/agent/commands/anchors.test.js +447 -0
- package/dist/agent/commands/animations.d.ts +47 -0
- package/dist/agent/commands/animations.d.ts.map +1 -0
- package/dist/agent/commands/animations.js +245 -0
- package/dist/agent/commands/animations.test.d.ts +2 -0
- package/dist/agent/commands/animations.test.d.ts.map +1 -0
- package/dist/agent/commands/animations.test.js +426 -0
- package/dist/agent/commands/assets.d.ts +34 -0
- package/dist/agent/commands/assets.d.ts.map +1 -0
- package/dist/agent/commands/assets.js +367 -0
- package/dist/agent/commands/assets.test.d.ts +2 -0
- package/dist/agent/commands/assets.test.d.ts.map +1 -0
- package/dist/agent/commands/assets.test.js +405 -0
- package/dist/agent/commands/bindings.realStudio.test.d.ts +21 -0
- package/dist/agent/commands/bindings.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/bindings.realStudio.test.js +281 -0
- package/dist/agent/commands/cameras.d.ts +65 -0
- package/dist/agent/commands/cameras.d.ts.map +1 -0
- package/dist/agent/commands/cameras.js +498 -0
- package/dist/agent/commands/cameras.test.d.ts +2 -0
- package/dist/agent/commands/cameras.test.d.ts.map +1 -0
- package/dist/agent/commands/cameras.test.js +560 -0
- package/dist/agent/commands/delete.test.d.ts +2 -0
- package/dist/agent/commands/delete.test.d.ts.map +1 -0
- package/dist/agent/commands/delete.test.js +518 -0
- package/dist/agent/commands/exports.d.ts +12 -0
- package/dist/agent/commands/exports.d.ts.map +1 -0
- package/dist/agent/commands/exports.js +132 -0
- package/dist/agent/commands/exports.test.d.ts +2 -0
- package/dist/agent/commands/exports.test.d.ts.map +1 -0
- package/dist/agent/commands/exports.test.js +402 -0
- package/dist/agent/commands/history.d.ts +17 -0
- package/dist/agent/commands/history.d.ts.map +1 -0
- package/dist/agent/commands/history.js +96 -0
- package/dist/agent/commands/history.test.d.ts +2 -0
- package/dist/agent/commands/history.test.d.ts.map +1 -0
- package/dist/agent/commands/history.test.js +140 -0
- package/dist/agent/commands/jobs.d.ts +23 -0
- package/dist/agent/commands/jobs.d.ts.map +1 -0
- package/dist/agent/commands/jobs.js +66 -0
- package/dist/agent/commands/keyframes.d.ts +42 -0
- package/dist/agent/commands/keyframes.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.js +310 -0
- package/dist/agent/commands/keyframes.realStudio.test.d.ts +11 -0
- package/dist/agent/commands/keyframes.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.realStudio.test.js +95 -0
- package/dist/agent/commands/keyframes.test.d.ts +2 -0
- package/dist/agent/commands/keyframes.test.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.test.js +474 -0
- package/dist/agent/commands/models.d.ts +34 -0
- package/dist/agent/commands/models.d.ts.map +1 -0
- package/dist/agent/commands/models.js +137 -0
- package/dist/agent/commands/models.test.d.ts +2 -0
- package/dist/agent/commands/models.test.d.ts.map +1 -0
- package/dist/agent/commands/models.test.js +268 -0
- package/dist/agent/commands/objects.d.ts +4 -0
- package/dist/agent/commands/objects.d.ts.map +1 -0
- package/dist/agent/commands/objects.js +182 -0
- package/dist/agent/commands/objects.test.d.ts +2 -0
- package/dist/agent/commands/objects.test.d.ts.map +1 -0
- package/dist/agent/commands/objects.test.js +316 -0
- package/dist/agent/commands/paths.d.ts +111 -0
- package/dist/agent/commands/paths.d.ts.map +1 -0
- package/dist/agent/commands/paths.js +576 -0
- package/dist/agent/commands/paths.test.d.ts +2 -0
- package/dist/agent/commands/paths.test.d.ts.map +1 -0
- package/dist/agent/commands/paths.test.js +773 -0
- package/dist/agent/commands/poses.d.ts +101 -0
- package/dist/agent/commands/poses.d.ts.map +1 -0
- package/dist/agent/commands/poses.js +500 -0
- package/dist/agent/commands/poses.realStudio.test.d.ts +15 -0
- package/dist/agent/commands/poses.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/poses.realStudio.test.js +161 -0
- package/dist/agent/commands/poses.test.d.ts +2 -0
- package/dist/agent/commands/poses.test.d.ts.map +1 -0
- package/dist/agent/commands/poses.test.js +735 -0
- package/dist/agent/commands/project.d.ts +12 -0
- package/dist/agent/commands/project.d.ts.map +1 -0
- package/dist/agent/commands/project.js +42 -0
- package/dist/agent/commands/project.test.d.ts +2 -0
- package/dist/agent/commands/project.test.d.ts.map +1 -0
- package/dist/agent/commands/project.test.js +125 -0
- package/dist/agent/commands/revision.realStudio.test.d.ts +14 -0
- package/dist/agent/commands/revision.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/revision.realStudio.test.js +129 -0
- package/dist/agent/commands/scene.d.ts +32 -0
- package/dist/agent/commands/scene.d.ts.map +1 -0
- package/dist/agent/commands/scene.js +100 -0
- package/dist/agent/commands/scene.test.d.ts +2 -0
- package/dist/agent/commands/scene.test.d.ts.map +1 -0
- package/dist/agent/commands/scene.test.js +147 -0
- package/dist/agent/commands/selection.d.ts +21 -0
- package/dist/agent/commands/selection.d.ts.map +1 -0
- package/dist/agent/commands/selection.js +101 -0
- package/dist/agent/commands/selection.test.d.ts +2 -0
- package/dist/agent/commands/selection.test.d.ts.map +1 -0
- package/dist/agent/commands/selection.test.js +173 -0
- package/dist/agent/commands/sequence.d.ts +25 -0
- package/dist/agent/commands/sequence.d.ts.map +1 -0
- package/dist/agent/commands/sequence.js +174 -0
- package/dist/agent/commands/sequence.test.d.ts +2 -0
- package/dist/agent/commands/sequence.test.d.ts.map +1 -0
- package/dist/agent/commands/sequence.test.js +264 -0
- package/dist/agent/commands/ui.d.ts +40 -0
- package/dist/agent/commands/ui.d.ts.map +1 -0
- package/dist/agent/commands/ui.js +166 -0
- package/dist/agent/commands/view.d.ts +61 -0
- package/dist/agent/commands/view.d.ts.map +1 -0
- package/dist/agent/commands/view.js +229 -0
- package/dist/agent/commands/view.test.d.ts +2 -0
- package/dist/agent/commands/view.test.d.ts.map +1 -0
- package/dist/agent/commands/view.test.js +347 -0
- package/dist/agent/contractCoverage.test.d.ts +2 -0
- package/dist/agent/contractCoverage.test.d.ts.map +1 -0
- package/dist/agent/contractCoverage.test.js +87 -0
- package/dist/agent/deleteHandlers.d.ts +61 -0
- package/dist/agent/deleteHandlers.d.ts.map +1 -0
- package/dist/agent/deleteHandlers.js +41 -0
- package/dist/agent/errors.d.ts +24 -0
- package/dist/agent/errors.d.ts.map +1 -0
- package/dist/agent/errors.js +59 -0
- package/dist/agent/errors.test.d.ts +2 -0
- package/dist/agent/errors.test.d.ts.map +1 -0
- package/dist/agent/errors.test.js +25 -0
- package/dist/agent/expectedCommands.d.ts +9 -0
- package/dist/agent/expectedCommands.d.ts.map +1 -0
- package/dist/agent/expectedCommands.js +79 -0
- package/dist/agent/jobs.d.ts +52 -0
- package/dist/agent/jobs.d.ts.map +1 -0
- package/dist/agent/jobs.js +175 -0
- package/dist/agent/jobs.test.d.ts +2 -0
- package/dist/agent/jobs.test.d.ts.map +1 -0
- package/dist/agent/jobs.test.js +281 -0
- package/dist/agent/keyframeTracks.d.ts +57 -0
- package/dist/agent/keyframeTracks.d.ts.map +1 -0
- package/dist/agent/keyframeTracks.js +127 -0
- package/dist/agent/objectIds.d.ts +7 -0
- package/dist/agent/objectIds.d.ts.map +1 -0
- package/dist/agent/objectIds.js +20 -0
- package/dist/agent/objectIds.test.d.ts +2 -0
- package/dist/agent/objectIds.test.d.ts.map +1 -0
- package/dist/agent/objectIds.test.js +10 -0
- package/dist/agent/objectResolver.d.ts +34 -0
- package/dist/agent/objectResolver.d.ts.map +1 -0
- package/dist/agent/objectResolver.js +112 -0
- package/dist/agent/pathCommands.d.ts +78 -0
- package/dist/agent/pathCommands.d.ts.map +1 -0
- package/dist/agent/pathCommands.js +240 -0
- package/dist/agent/propAccess.d.ts +42 -0
- package/dist/agent/propAccess.d.ts.map +1 -0
- package/dist/agent/propAccess.js +181 -0
- package/dist/agent/registerCommands.d.ts +9 -0
- package/dist/agent/registerCommands.d.ts.map +1 -0
- package/dist/agent/registerCommands.js +77 -0
- package/dist/agent/registry.d.ts +33 -0
- package/dist/agent/registry.d.ts.map +1 -0
- package/dist/agent/registry.js +55 -0
- package/dist/agent/registry.test.d.ts +2 -0
- package/dist/agent/registry.test.d.ts.map +1 -0
- package/dist/agent/registry.test.js +106 -0
- package/dist/agent/runtime/animationStatus.d.ts +25 -0
- package/dist/agent/runtime/animationStatus.d.ts.map +1 -0
- package/dist/agent/runtime/animationStatus.js +13 -0
- package/dist/agent/runtime/cameraLifecycle.d.ts +37 -0
- package/dist/agent/runtime/cameraLifecycle.d.ts.map +1 -0
- package/dist/agent/runtime/cameraLifecycle.js +112 -0
- package/dist/agent/runtime/directorView.d.ts +42 -0
- package/dist/agent/runtime/directorView.d.ts.map +1 -0
- package/dist/agent/runtime/directorView.js +27 -0
- package/dist/agent/runtime/exportRuntime.d.ts +95 -0
- package/dist/agent/runtime/exportRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/exportRuntime.js +227 -0
- package/dist/agent/runtime/objectRuntime.d.ts +26 -0
- package/dist/agent/runtime/objectRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/objectRuntime.js +29 -0
- package/dist/agent/runtime/pathRuntime.d.ts +21 -0
- package/dist/agent/runtime/pathRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/pathRuntime.js +13 -0
- package/dist/agent/runtime/placementLifecycle.d.ts +34 -0
- package/dist/agent/runtime/placementLifecycle.d.ts.map +1 -0
- package/dist/agent/runtime/placementLifecycle.js +63 -0
- package/dist/agent/runtime/placementLifecycle.test.d.ts +2 -0
- package/dist/agent/runtime/placementLifecycle.test.d.ts.map +1 -0
- package/dist/agent/runtime/placementLifecycle.test.js +68 -0
- package/dist/agent/runtime/poseSessionRuntime.d.ts +17 -0
- package/dist/agent/runtime/poseSessionRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/poseSessionRuntime.js +64 -0
- package/dist/agent/runtime.d.ts +67 -0
- package/dist/agent/runtime.d.ts.map +1 -0
- package/dist/agent/runtime.js +214 -0
- package/dist/agent/runtime.test.d.ts +2 -0
- package/dist/agent/runtime.test.d.ts.map +1 -0
- package/dist/agent/runtime.test.js +142 -0
- package/dist/agent/sequenceLength.d.ts +20 -0
- package/dist/agent/sequenceLength.d.ts.map +1 -0
- package/dist/agent/sequenceLength.js +18 -0
- package/dist/agent/types.d.ts +70 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +6 -0
- package/dist/agent/validation.d.ts +7 -0
- package/dist/agent/validation.d.ts.map +1 -0
- package/dist/agent/validation.js +39 -0
- package/dist/aimTargets.d.ts +128 -0
- package/dist/aimTargets.d.ts.map +1 -0
- package/dist/aimTargets.js +367 -0
- package/dist/aimTargets.test.d.ts +2 -0
- package/dist/aimTargets.test.d.ts.map +1 -0
- package/dist/aimTargets.test.js +84 -0
- package/dist/anchorParenting.test.d.ts +2 -0
- package/dist/anchorParenting.test.d.ts.map +1 -0
- package/dist/anchorParenting.test.js +87 -0
- package/dist/anchorsRegistry.d.ts +45 -0
- package/dist/anchorsRegistry.d.ts.map +1 -0
- package/dist/anchorsRegistry.js +101 -0
- package/dist/anchorsRegistry.test.d.ts +2 -0
- package/dist/anchorsRegistry.test.d.ts.map +1 -0
- package/dist/anchorsRegistry.test.js +29 -0
- package/dist/assetLibrary/AssetLibraryPanel.d.ts +35 -0
- package/dist/assetLibrary/AssetLibraryPanel.d.ts.map +1 -0
- package/dist/assetLibrary/AssetLibraryPanel.js +544 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.d.ts +2 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.d.ts.map +1 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.js +133 -0
- package/dist/assetLibrary/ModelPickerSlot.d.ts +24 -0
- package/dist/assetLibrary/ModelPickerSlot.d.ts.map +1 -0
- package/dist/assetLibrary/ModelPickerSlot.js +32 -0
- package/dist/assetLibrary/catalogThumbs.d.ts +7 -0
- package/dist/assetLibrary/catalogThumbs.d.ts.map +1 -0
- package/dist/assetLibrary/catalogThumbs.js +75 -0
- package/dist/assetLibrary/classify.d.ts +14 -0
- package/dist/assetLibrary/classify.d.ts.map +1 -0
- package/dist/assetLibrary/classify.js +43 -0
- package/dist/assetLibrary/classify.test.d.ts +2 -0
- package/dist/assetLibrary/classify.test.d.ts.map +1 -0
- package/dist/assetLibrary/classify.test.js +44 -0
- package/dist/assetLibrary/contract.indexeddb.test.d.ts +2 -0
- package/dist/assetLibrary/contract.indexeddb.test.d.ts.map +1 -0
- package/dist/assetLibrary/contract.indexeddb.test.js +10 -0
- package/dist/assetLibrary/contractTests.d.ts +12 -0
- package/dist/assetLibrary/contractTests.d.ts.map +1 -0
- package/dist/assetLibrary/contractTests.js +51 -0
- package/dist/assetLibrary/dispose.d.ts +4 -0
- package/dist/assetLibrary/dispose.d.ts.map +1 -0
- package/dist/assetLibrary/dispose.js +21 -0
- package/dist/assetLibrary/draco.d.ts +6 -0
- package/dist/assetLibrary/draco.d.ts.map +1 -0
- package/dist/assetLibrary/draco.js +45 -0
- package/dist/assetLibrary/draco.test.d.ts +2 -0
- package/dist/assetLibrary/draco.test.d.ts.map +1 -0
- package/dist/assetLibrary/draco.test.js +93 -0
- package/dist/assetLibrary/exportGLB.d.ts +45 -0
- package/dist/assetLibrary/exportGLB.d.ts.map +1 -0
- package/dist/assetLibrary/exportGLB.js +125 -0
- package/dist/assetLibrary/exportGLB.test.d.ts +2 -0
- package/dist/assetLibrary/exportGLB.test.d.ts.map +1 -0
- package/dist/assetLibrary/exportGLB.test.js +127 -0
- package/dist/assetLibrary/gltfLoader.d.ts +8 -0
- package/dist/assetLibrary/gltfLoader.d.ts.map +1 -0
- package/dist/assetLibrary/gltfLoader.js +11 -0
- package/dist/assetLibrary/hash.d.ts +7 -0
- package/dist/assetLibrary/hash.d.ts.map +1 -0
- package/dist/assetLibrary/hash.js +17 -0
- package/dist/assetLibrary/importModelFile.d.ts +5 -0
- package/dist/assetLibrary/importModelFile.d.ts.map +1 -0
- package/dist/assetLibrary/importModelFile.js +19 -0
- package/dist/assetLibrary/importModelFile.test.d.ts +2 -0
- package/dist/assetLibrary/importModelFile.test.d.ts.map +1 -0
- package/dist/assetLibrary/importModelFile.test.js +77 -0
- package/dist/assetLibrary/importPipeline.d.ts +61 -0
- package/dist/assetLibrary/importPipeline.d.ts.map +1 -0
- package/dist/assetLibrary/importPipeline.js +253 -0
- package/dist/assetLibrary/importPipeline.test.d.ts +2 -0
- package/dist/assetLibrary/importPipeline.test.d.ts.map +1 -0
- package/dist/assetLibrary/importPipeline.test.js +188 -0
- package/dist/assetLibrary/indexedDBBackend.d.ts +31 -0
- package/dist/assetLibrary/indexedDBBackend.d.ts.map +1 -0
- package/dist/assetLibrary/indexedDBBackend.js +134 -0
- package/dist/assetLibrary/indexedDBBackend.test.d.ts +2 -0
- package/dist/assetLibrary/indexedDBBackend.test.d.ts.map +1 -0
- package/dist/assetLibrary/indexedDBBackend.test.js +148 -0
- package/dist/assetLibrary/legacySeedCleanup.d.ts +19 -0
- package/dist/assetLibrary/legacySeedCleanup.d.ts.map +1 -0
- package/dist/assetLibrary/legacySeedCleanup.js +50 -0
- package/dist/assetLibrary/legacySeedCleanup.test.d.ts +2 -0
- package/dist/assetLibrary/legacySeedCleanup.test.d.ts.map +1 -0
- package/dist/assetLibrary/legacySeedCleanup.test.js +74 -0
- package/dist/assetLibrary/library.d.ts +122 -0
- package/dist/assetLibrary/library.d.ts.map +1 -0
- package/dist/assetLibrary/library.js +424 -0
- package/dist/assetLibrary/library.test.d.ts +2 -0
- package/dist/assetLibrary/library.test.d.ts.map +1 -0
- package/dist/assetLibrary/library.test.js +520 -0
- package/dist/assetLibrary/options.d.ts +9 -0
- package/dist/assetLibrary/options.d.ts.map +1 -0
- package/dist/assetLibrary/options.js +20 -0
- package/dist/assetLibrary/options.test.d.ts +2 -0
- package/dist/assetLibrary/options.test.d.ts.map +1 -0
- package/dist/assetLibrary/options.test.js +70 -0
- package/dist/assetLibrary/pose.d.ts +15 -0
- package/dist/assetLibrary/pose.d.ts.map +1 -0
- package/dist/assetLibrary/pose.js +41 -0
- package/dist/assetLibrary/pose.test.d.ts +2 -0
- package/dist/assetLibrary/pose.test.d.ts.map +1 -0
- package/dist/assetLibrary/pose.test.js +45 -0
- package/dist/assetLibrary/poseThumbnail.d.ts +30 -0
- package/dist/assetLibrary/poseThumbnail.d.ts.map +1 -0
- package/dist/assetLibrary/poseThumbnail.js +144 -0
- package/dist/assetLibrary/poseThumbnail.test.d.ts +2 -0
- package/dist/assetLibrary/poseThumbnail.test.d.ts.map +1 -0
- package/dist/assetLibrary/poseThumbnail.test.js +111 -0
- package/dist/assetLibrary/rig.d.ts +14 -0
- package/dist/assetLibrary/rig.d.ts.map +1 -0
- package/dist/assetLibrary/rig.js +33 -0
- package/dist/assetLibrary/rig.test.d.ts +2 -0
- package/dist/assetLibrary/rig.test.d.ts.map +1 -0
- package/dist/assetLibrary/rig.test.js +55 -0
- package/dist/assetLibrary/seedAssetsManifest.d.ts +24 -0
- package/dist/assetLibrary/seedAssetsManifest.d.ts.map +1 -0
- package/dist/assetLibrary/seedAssetsManifest.js +347 -0
- package/dist/assetLibrary/seedBuiltinPoses.d.ts +29 -0
- package/dist/assetLibrary/seedBuiltinPoses.d.ts.map +1 -0
- package/dist/assetLibrary/seedBuiltinPoses.js +114 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.d.ts +2 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.d.ts.map +1 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.js +176 -0
- package/dist/assetLibrary/seedPoses.d.ts +8 -0
- package/dist/assetLibrary/seedPoses.d.ts.map +1 -0
- package/dist/assetLibrary/seedPoses.js +2414 -0
- package/dist/assetLibrary/seedPosesDpl.d.ts +8 -0
- package/dist/assetLibrary/seedPosesDpl.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesDpl.js +11660 -0
- package/dist/assetLibrary/seedPosesQbx.d.ts +8 -0
- package/dist/assetLibrary/seedPosesQbx.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesQbx.js +5612 -0
- package/dist/assetLibrary/seedPosesQbx.test.d.ts +2 -0
- package/dist/assetLibrary/seedPosesQbx.test.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesQbx.test.js +181 -0
- package/dist/assetLibrary/source.d.ts +45 -0
- package/dist/assetLibrary/source.d.ts.map +1 -0
- package/dist/assetLibrary/source.js +11 -0
- package/dist/assetLibrary/source.test.d.ts +2 -0
- package/dist/assetLibrary/source.test.d.ts.map +1 -0
- package/dist/assetLibrary/source.test.js +28 -0
- package/dist/assetLibrary/staticCatalogSource.d.ts +48 -0
- package/dist/assetLibrary/staticCatalogSource.d.ts.map +1 -0
- package/dist/assetLibrary/staticCatalogSource.js +140 -0
- package/dist/assetLibrary/staticCatalogSource.test.d.ts +2 -0
- package/dist/assetLibrary/staticCatalogSource.test.d.ts.map +1 -0
- package/dist/assetLibrary/staticCatalogSource.test.js +154 -0
- package/dist/assetLibrary/thumbnail.d.ts +14 -0
- package/dist/assetLibrary/thumbnail.d.ts.map +1 -0
- package/dist/assetLibrary/thumbnail.js +70 -0
- package/dist/assetLibrary/types.d.ts +54 -0
- package/dist/assetLibrary/types.d.ts.map +1 -0
- package/dist/assetLibrary/types.js +1 -0
- package/dist/assetLibrary/useModelThumbUrl.d.ts +10 -0
- package/dist/assetLibrary/useModelThumbUrl.d.ts.map +1 -0
- package/dist/assetLibrary/useModelThumbUrl.js +56 -0
- package/dist/boneAnchorWiring.test.d.ts +2 -0
- package/dist/boneAnchorWiring.test.d.ts.map +1 -0
- package/dist/boneAnchorWiring.test.js +173 -0
- package/dist/boneAnchors.d.ts +30 -0
- package/dist/boneAnchors.d.ts.map +1 -0
- package/dist/boneAnchors.js +111 -0
- package/dist/boneAnchors.test.d.ts +2 -0
- package/dist/boneAnchors.test.d.ts.map +1 -0
- package/dist/boneAnchors.test.js +98 -0
- package/dist/bootstrap.d.ts +37 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +394 -0
- package/dist/bootstrap.test.d.ts +2 -0
- package/dist/bootstrap.test.d.ts.map +1 -0
- package/dist/bootstrap.test.js +647 -0
- package/dist/cameraRegistry.d.ts +65 -0
- package/dist/cameraRegistry.d.ts.map +1 -0
- package/dist/cameraRegistry.js +151 -0
- package/dist/cameraRegistry.test.d.ts +2 -0
- package/dist/cameraRegistry.test.d.ts.map +1 -0
- package/dist/cameraRegistry.test.js +68 -0
- package/dist/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/contextMenu.d.ts +16 -0
- package/dist/contextMenu.d.ts.map +1 -0
- package/dist/contextMenu.js +10 -0
- package/dist/dropPoint.d.ts +61 -0
- package/dist/dropPoint.d.ts.map +1 -0
- package/dist/dropPoint.js +97 -0
- package/dist/dropPoint.test.d.ts +2 -0
- package/dist/dropPoint.test.d.ts.map +1 -0
- package/dist/dropPoint.test.js +174 -0
- package/dist/editorOnly.d.ts +6 -0
- package/dist/editorOnly.d.ts.map +1 -0
- package/dist/editorOnly.js +32 -0
- package/dist/errors.d.ts +24 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/firstScreenGate.d.ts +28 -0
- package/dist/firstScreenGate.d.ts.map +1 -0
- package/dist/firstScreenGate.js +67 -0
- package/dist/firstScreenGate.test.d.ts +2 -0
- package/dist/firstScreenGate.test.d.ts.map +1 -0
- package/dist/firstScreenGate.test.js +83 -0
- package/dist/gestureProps.d.ts +99 -0
- package/dist/gestureProps.d.ts.map +1 -0
- package/dist/gestureProps.js +118 -0
- package/dist/gestureProps.test.d.ts +2 -0
- package/dist/gestureProps.test.d.ts.map +1 -0
- package/dist/gestureProps.test.js +182 -0
- package/dist/gesturePropsEditor.d.ts +27 -0
- package/dist/gesturePropsEditor.d.ts.map +1 -0
- package/dist/gesturePropsEditor.js +121 -0
- package/dist/getDeep.d.ts +8 -0
- package/dist/getDeep.d.ts.map +1 -0
- package/dist/getDeep.js +15 -0
- package/dist/gizmoRegistry.test.d.ts +2 -0
- package/dist/gizmoRegistry.test.d.ts.map +1 -0
- package/dist/gizmoRegistry.test.js +40 -0
- package/dist/hostFlows.d.ts +55 -0
- package/dist/hostFlows.d.ts.map +1 -0
- package/dist/hostFlows.js +77 -0
- package/dist/hostFlows.test.d.ts +2 -0
- package/dist/hostFlows.test.d.ts.map +1 -0
- package/dist/hostFlows.test.js +191 -0
- package/dist/i18n.d.ts +26 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +271 -0
- package/dist/i18n.test.d.ts +2 -0
- package/dist/i18n.test.d.ts.map +1 -0
- package/dist/i18n.test.js +41 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/menuModel.d.ts +51 -0
- package/dist/menuModel.d.ts.map +1 -0
- package/dist/menuModel.js +111 -0
- package/dist/menuModel.test.d.ts +2 -0
- package/dist/menuModel.test.d.ts.map +1 -0
- package/dist/menuModel.test.js +197 -0
- package/dist/modalGrab.d.ts +29 -0
- package/dist/modalGrab.d.ts.map +1 -0
- package/dist/modalGrab.js +127 -0
- package/dist/outlineObjectMenu.d.ts +41 -0
- package/dist/outlineObjectMenu.d.ts.map +1 -0
- package/dist/outlineObjectMenu.js +58 -0
- package/dist/outlineObjectMenu.test.d.ts +2 -0
- package/dist/outlineObjectMenu.test.d.ts.map +1 -0
- package/dist/outlineObjectMenu.test.js +83 -0
- package/dist/pathBinding.d.ts +16 -0
- package/dist/pathBinding.d.ts.map +1 -0
- package/dist/pathBinding.js +19 -0
- package/dist/pathBinding.test.d.ts +2 -0
- package/dist/pathBinding.test.d.ts.map +1 -0
- package/dist/pathBinding.test.js +14 -0
- package/dist/pathModel.d.ts +123 -0
- package/dist/pathModel.d.ts.map +1 -0
- package/dist/pathModel.js +343 -0
- package/dist/pathModel.test.d.ts +2 -0
- package/dist/pathModel.test.d.ts.map +1 -0
- package/dist/pathModel.test.js +394 -0
- package/dist/pathPresets.d.ts +38 -0
- package/dist/pathPresets.d.ts.map +1 -0
- package/dist/pathPresets.js +180 -0
- package/dist/pathPresets.test.d.ts +2 -0
- package/dist/pathPresets.test.d.ts.map +1 -0
- package/dist/pathPresets.test.js +154 -0
- package/dist/pathRegistry.d.ts +46 -0
- package/dist/pathRegistry.d.ts.map +1 -0
- package/dist/pathRegistry.js +105 -0
- package/dist/pathRegistry.test.d.ts +2 -0
- package/dist/pathRegistry.test.d.ts.map +1 -0
- package/dist/pathRegistry.test.js +23 -0
- package/dist/pickerRegistry.d.ts +49 -0
- package/dist/pickerRegistry.d.ts.map +1 -0
- package/dist/pickerRegistry.js +17 -0
- package/dist/pickerRegistry.test.d.ts +2 -0
- package/dist/pickerRegistry.test.d.ts.map +1 -0
- package/dist/pickerRegistry.test.js +31 -0
- package/dist/pipLayout.d.ts +7 -0
- package/dist/pipLayout.d.ts.map +1 -0
- package/dist/pipLayout.js +58 -0
- package/dist/placementKey.test.d.ts +2 -0
- package/dist/placementKey.test.d.ts.map +1 -0
- package/dist/placementKey.test.js +32 -0
- package/dist/placementPoseProps.d.ts +29 -0
- package/dist/placementPoseProps.d.ts.map +1 -0
- package/dist/placementPoseProps.js +43 -0
- package/dist/placementPoseProps.test.d.ts +2 -0
- package/dist/placementPoseProps.test.d.ts.map +1 -0
- package/dist/placementPoseProps.test.js +35 -0
- package/dist/poseMode/PoseModeBar.d.ts +18 -0
- package/dist/poseMode/PoseModeBar.d.ts.map +1 -0
- package/dist/poseMode/PoseModeBar.js +127 -0
- package/dist/poseMode/PoseModeRig.d.ts +9 -0
- package/dist/poseMode/PoseModeRig.d.ts.map +1 -0
- package/dist/poseMode/PoseModeRig.js +300 -0
- package/dist/poseMode/PosePickerFrame.d.ts +42 -0
- package/dist/poseMode/PosePickerFrame.d.ts.map +1 -0
- package/dist/poseMode/PosePickerFrame.js +164 -0
- package/dist/poseMode/PosePropEditor.d.ts +30 -0
- package/dist/poseMode/PosePropEditor.d.ts.map +1 -0
- package/dist/poseMode/PosePropEditor.js +139 -0
- package/dist/poseMode/controlSpec.d.ts +26 -0
- package/dist/poseMode/controlSpec.d.ts.map +1 -0
- package/dist/poseMode/controlSpec.js +157 -0
- package/dist/poseMode/controlSpec.test.d.ts +2 -0
- package/dist/poseMode/controlSpec.test.d.ts.map +1 -0
- package/dist/poseMode/controlSpec.test.js +196 -0
- package/dist/poseMode/dragState.d.ts +16 -0
- package/dist/poseMode/dragState.d.ts.map +1 -0
- package/dist/poseMode/dragState.js +15 -0
- package/dist/poseMode/dragState.test.d.ts +2 -0
- package/dist/poseMode/dragState.test.d.ts.map +1 -0
- package/dist/poseMode/dragState.test.js +23 -0
- package/dist/poseMode/poseDisplayText.d.ts +18 -0
- package/dist/poseMode/poseDisplayText.d.ts.map +1 -0
- package/dist/poseMode/poseDisplayText.js +13 -0
- package/dist/poseMode/poseDisplayText.test.d.ts +2 -0
- package/dist/poseMode/poseDisplayText.test.d.ts.map +1 -0
- package/dist/poseMode/poseDisplayText.test.js +35 -0
- package/dist/poseMode/poseExitGuard.d.ts +8 -0
- package/dist/poseMode/poseExitGuard.d.ts.map +1 -0
- package/dist/poseMode/poseExitGuard.js +13 -0
- package/dist/poseMode/poseExitGuard.test.d.ts +2 -0
- package/dist/poseMode/poseExitGuard.test.d.ts.map +1 -0
- package/dist/poseMode/poseExitGuard.test.js +41 -0
- package/dist/poseMode/poseFrame.d.ts +11 -0
- package/dist/poseMode/poseFrame.d.ts.map +1 -0
- package/dist/poseMode/poseFrame.js +7 -0
- package/dist/poseMode/poseFrame.test.d.ts +2 -0
- package/dist/poseMode/poseFrame.test.d.ts.map +1 -0
- package/dist/poseMode/poseFrame.test.js +25 -0
- package/dist/poseMode/poseInterpolate.d.ts +4 -0
- package/dist/poseMode/poseInterpolate.d.ts.map +1 -0
- package/dist/poseMode/poseInterpolate.js +75 -0
- package/dist/poseMode/poseInterpolate.test.d.ts +2 -0
- package/dist/poseMode/poseInterpolate.test.d.ts.map +1 -0
- package/dist/poseMode/poseInterpolate.test.js +61 -0
- package/dist/poseMode/poseLibResolve.d.ts +9 -0
- package/dist/poseMode/poseLibResolve.d.ts.map +1 -0
- package/dist/poseMode/poseLibResolve.js +49 -0
- package/dist/poseMode/poseLibResolve.test.d.ts +2 -0
- package/dist/poseMode/poseLibResolve.test.d.ts.map +1 -0
- package/dist/poseMode/poseLibResolve.test.js +59 -0
- package/dist/poseMode/poseMigration.d.ts +5 -0
- package/dist/poseMode/poseMigration.d.ts.map +1 -0
- package/dist/poseMode/poseMigration.js +16 -0
- package/dist/poseMode/poseMigration.test.d.ts +2 -0
- package/dist/poseMode/poseMigration.test.d.ts.map +1 -0
- package/dist/poseMode/poseMigration.test.js +25 -0
- package/dist/poseMode/poseOptions.d.ts +45 -0
- package/dist/poseMode/poseOptions.d.ts.map +1 -0
- package/dist/poseMode/poseOptions.js +39 -0
- package/dist/poseMode/poseOptions.test.d.ts +2 -0
- package/dist/poseMode/poseOptions.test.d.ts.map +1 -0
- package/dist/poseMode/poseOptions.test.js +83 -0
- package/dist/poseMode/poseOverride.d.ts +13 -0
- package/dist/poseMode/poseOverride.d.ts.map +1 -0
- package/dist/poseMode/poseOverride.js +26 -0
- package/dist/poseMode/poseOverride.test.d.ts +2 -0
- package/dist/poseMode/poseOverride.test.d.ts.map +1 -0
- package/dist/poseMode/poseOverride.test.js +23 -0
- package/dist/poseMode/poseRetarget.d.ts +17 -0
- package/dist/poseMode/poseRetarget.d.ts.map +1 -0
- package/dist/poseMode/poseRetarget.js +53 -0
- package/dist/poseMode/poseRetarget.test.d.ts +2 -0
- package/dist/poseMode/poseRetarget.test.d.ts.map +1 -0
- package/dist/poseMode/poseRetarget.test.js +88 -0
- package/dist/poseMode/poseSession.d.ts +58 -0
- package/dist/poseMode/poseSession.d.ts.map +1 -0
- package/dist/poseMode/poseSession.js +183 -0
- package/dist/poseMode/poseSession.test.d.ts +2 -0
- package/dist/poseMode/poseSession.test.d.ts.map +1 -0
- package/dist/poseMode/poseSession.test.js +159 -0
- package/dist/poseMode/poseSessionHooks.test.d.ts +2 -0
- package/dist/poseMode/poseSessionHooks.test.d.ts.map +1 -0
- package/dist/poseMode/poseSessionHooks.test.js +49 -0
- package/dist/poseMode/poseTrack.d.ts +30 -0
- package/dist/poseMode/poseTrack.d.ts.map +1 -0
- package/dist/poseMode/poseTrack.js +155 -0
- package/dist/poseMode/poseTrack.test.d.ts +2 -0
- package/dist/poseMode/poseTrack.test.d.ts.map +1 -0
- package/dist/poseMode/poseTrack.test.js +84 -0
- package/dist/poseMode/poseValue.d.ts +22 -0
- package/dist/poseMode/poseValue.d.ts.map +1 -0
- package/dist/poseMode/poseValue.js +73 -0
- package/dist/poseMode/poseValue.test.d.ts +2 -0
- package/dist/poseMode/poseValue.test.d.ts.map +1 -0
- package/dist/poseMode/poseValue.test.js +62 -0
- package/dist/poseMode/savePose.d.ts +23 -0
- package/dist/poseMode/savePose.d.ts.map +1 -0
- package/dist/poseMode/savePose.js +29 -0
- package/dist/poseMode/selectionModes.d.ts +14 -0
- package/dist/poseMode/selectionModes.d.ts.map +1 -0
- package/dist/poseMode/selectionModes.js +39 -0
- package/dist/poseMode/selectionModes.test.d.ts +2 -0
- package/dist/poseMode/selectionModes.test.d.ts.map +1 -0
- package/dist/poseMode/selectionModes.test.js +91 -0
- package/dist/poseNameMessages.d.ts +13 -0
- package/dist/poseNameMessages.d.ts.map +1 -0
- package/dist/poseNameMessages.js +370 -0
- package/dist/poseNames.d.ts +14 -0
- package/dist/poseNames.d.ts.map +1 -0
- package/dist/poseNames.js +21 -0
- package/dist/poseNames.test.d.ts +2 -0
- package/dist/poseNames.test.d.ts.map +1 -0
- package/dist/poseNames.test.js +41 -0
- package/dist/poseStatusText.d.ts +2 -0
- package/dist/poseStatusText.d.ts.map +1 -0
- package/dist/poseStatusText.js +11 -0
- package/dist/poseStatusText.test.d.ts +2 -0
- package/dist/poseStatusText.test.d.ts.map +1 -0
- package/dist/poseStatusText.test.js +21 -0
- package/dist/presetThumbGeometry.d.ts +26 -0
- package/dist/presetThumbGeometry.d.ts.map +1 -0
- package/dist/presetThumbGeometry.js +103 -0
- package/dist/presetThumbGeometry.test.d.ts +2 -0
- package/dist/presetThumbGeometry.test.d.ts.map +1 -0
- package/dist/presetThumbGeometry.test.js +83 -0
- package/dist/selectionOutline.d.ts +42 -0
- package/dist/selectionOutline.d.ts.map +1 -0
- package/dist/selectionOutline.js +174 -0
- package/dist/selectionOutline.test.d.ts +2 -0
- package/dist/selectionOutline.test.d.ts.map +1 -0
- package/dist/selectionOutline.test.js +58 -0
- package/dist/smoke.test.d.ts +1 -0
- package/dist/smoke.test.d.ts.map +1 -0
- package/dist/smoke.test.js +17 -0
- package/dist/uiConfig.d.ts +16 -0
- package/dist/uiConfig.d.ts.map +1 -0
- package/dist/uiConfig.js +13 -0
- package/dist/uiConfig.test.d.ts +2 -0
- package/dist/uiConfig.test.d.ts.map +1 -0
- package/dist/uiConfig.test.js +98 -0
- package/dist/undoShortcuts.d.ts +28 -0
- package/dist/undoShortcuts.d.ts.map +1 -0
- package/dist/undoShortcuts.js +59 -0
- package/dist/undoShortcuts.test.d.ts +2 -0
- package/dist/undoShortcuts.test.d.ts.map +1 -0
- package/dist/undoShortcuts.test.js +37 -0
- package/dist/useCameraStudio.d.ts +3 -0
- package/dist/useCameraStudio.d.ts.map +1 -0
- package/dist/useCameraStudio.js +86 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +11 -0
- package/dist/videoExport/BlobCollectSink.d.ts +25 -0
- package/dist/videoExport/BlobCollectSink.d.ts.map +1 -0
- package/dist/videoExport/BlobCollectSink.js +56 -0
- package/dist/videoExport/BlobCollectSink.test.d.ts +2 -0
- package/dist/videoExport/BlobCollectSink.test.d.ts.map +1 -0
- package/dist/videoExport/BlobCollectSink.test.js +78 -0
- package/dist/videoExport/encoder.d.ts +34 -0
- package/dist/videoExport/encoder.d.ts.map +1 -0
- package/dist/videoExport/encoder.js +61 -0
- package/dist/videoExport/encoder.test.d.ts +2 -0
- package/dist/videoExport/encoder.test.d.ts.map +1 -0
- package/dist/videoExport/encoder.test.js +21 -0
- package/dist/videoExport/exporter.d.ts +24 -0
- package/dist/videoExport/exporter.d.ts.map +1 -0
- package/dist/videoExport/exporter.js +74 -0
- package/dist/videoExport/sinks.d.ts +55 -0
- package/dist/videoExport/sinks.d.ts.map +1 -0
- package/dist/videoExport/sinks.js +69 -0
- package/package.json +59 -3
- package/README.md +0 -3
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* bootstrap + useCameraStudio 生命周期契约(任务 8,spec §7;9 用例):
|
|
6
|
+
* 1. 幂等 + StrictMode(init 共享 promise,双跑只 init 一次)
|
|
7
|
+
* 2. 卸载四项清理(编辑器注销 / state 订阅断开 / ui.hide;重挂 ui.restore)
|
|
8
|
+
* 3. 重挂幂等(ready 恢复,init 仍 1 次)
|
|
9
|
+
* 4. 第二实例报错(单页只允许一个)
|
|
10
|
+
* 5. storage namespace(库名 toybox-asset-library[-ns])
|
|
11
|
+
* 6. state 通道(usePersistentStorage:false + 尾部节流 + dispose flush)
|
|
12
|
+
* 7. sync 透传(serverUrl;缺省不带键)
|
|
13
|
+
* 8. storage:false 纯查看器(canWrite=false,init 不碰 indexedDB)
|
|
14
|
+
* 9. 冲突矩阵(宿主已 init:一致静默复用 / 不一致告警以先到为准;未 init 模块 init)
|
|
15
|
+
*
|
|
16
|
+
* jest-esbuild 不提升 jest.mock:全部 doMock 先行登记,jest.resetModules
|
|
17
|
+
* 后运行时 import 被测模块。仓内无 testing-library 依赖(R13):
|
|
18
|
+
* renderHook 用 createRoot + React.act 手写 harness 等价物
|
|
19
|
+
* (与 TopToolbar.test.tsx / App.hostFlows.test.tsx 同一套手法)。
|
|
20
|
+
*
|
|
21
|
+
* 注意:jest.resetModules() 会连 react 一起重置——静态 import 的
|
|
22
|
+
* react/react-dom 与被测模块重置后重新求值的 react 不是同一实例,
|
|
23
|
+
* hooks 的 dispatcher 落空(useRef on null)。故 react/react-dom 也在
|
|
24
|
+
* beforeEach 里动态 import,与被测模块共享同一模块注册表。
|
|
25
|
+
*/
|
|
26
|
+
import { IDBFactory } from 'fake-indexeddb';
|
|
27
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
28
|
+
// ── 替身盒子(doMock 工厂闭包共享;beforeEach 复位) ─────────────
|
|
29
|
+
const initSpy = jest.fn(async (_opts) => { });
|
|
30
|
+
/** Scene sheet 替身:agent runtime 构造期只存引用,空对象即可 */
|
|
31
|
+
const fakeSheet = { fakeSheet: true };
|
|
32
|
+
const getProjectSpy = jest.fn((_name, _opts) => ({
|
|
33
|
+
fake: true,
|
|
34
|
+
sheet: jest.fn(() => fakeSheet),
|
|
35
|
+
}));
|
|
36
|
+
// studio.ui 替身:hide/restore 翻转 isHidden(与真 UI 行为一致;
|
|
37
|
+
// bootstrap 仅在 isHidden 时才 restore)
|
|
38
|
+
const setLeftStripHiddenSpy = jest.fn();
|
|
39
|
+
const uiBox = {
|
|
40
|
+
isHidden: false,
|
|
41
|
+
hide: jest.fn(() => {
|
|
42
|
+
uiBox.isHidden = true;
|
|
43
|
+
}),
|
|
44
|
+
restore: jest.fn(() => {
|
|
45
|
+
uiBox.isHidden = false;
|
|
46
|
+
}),
|
|
47
|
+
setLeftStripHidden: setLeftStripHiddenSpy,
|
|
48
|
+
};
|
|
49
|
+
const hideSpy = uiBox.hide;
|
|
50
|
+
const restoreSpy = uiBox.restore;
|
|
51
|
+
/** studio.initialized 替身:缺省即解析;竞态回归用例换成自持 deferred */
|
|
52
|
+
const initializedBox = {
|
|
53
|
+
promise: Promise.resolve(),
|
|
54
|
+
};
|
|
55
|
+
const stateUnsubSpy = jest.fn();
|
|
56
|
+
// onChange(pointer, cb) 的返回值 = 退订函数;state 通道那条订阅的断开断言压它
|
|
57
|
+
const onChangeSpy = jest.fn((_pointer, _cb) => stateUnsubSpy);
|
|
58
|
+
/** agent runtime 的 getStudio 惰性探针(构造期不调,替身即可) */
|
|
59
|
+
const getStudioSyncSpy = jest.fn(() => undefined);
|
|
60
|
+
// ── Agent API 门面替身(Task 15)──────────────────────────────
|
|
61
|
+
// bootstrap 静态引入 agent/api 会拉起整条命令图(PlacementManager/
|
|
62
|
+
// CameraPath/videoExport…),与本文件的极简 core 替身不兼容;会话接线
|
|
63
|
+
// (activate/dispose 调用序)在这里用桩断言,真门面行为由 api.test.tsx 覆盖
|
|
64
|
+
const fakeApiObject = { fakeApi: true };
|
|
65
|
+
const activateApiSpy = jest.fn();
|
|
66
|
+
const disposeApiSpy = jest.fn();
|
|
67
|
+
const getApiSpy = jest.fn(() => fakeApiObject);
|
|
68
|
+
/** 会话注册表替身(桥接接线断言用;无桥接配置时 bootstrap 不读它) */
|
|
69
|
+
const fakeRegistryObject = { fakeRegistry: true };
|
|
70
|
+
const getRegistrySpy = jest.fn(() => fakeRegistryObject);
|
|
71
|
+
jest.doMock('./agent/api', () => ({
|
|
72
|
+
__esModule: true,
|
|
73
|
+
getCameraStudioApi: getApiSpy,
|
|
74
|
+
activateCameraStudioApi: activateApiSpy,
|
|
75
|
+
disposeCameraStudioApi: disposeApiSpy,
|
|
76
|
+
getActiveAgentRegistry: getRegistrySpy,
|
|
77
|
+
}));
|
|
78
|
+
// ── 桥接客户端替身(Task 6)──────────────────────────────────
|
|
79
|
+
// 真客户端会拉起 WebSocket;接线契约(配置门槛、启动/关闭时序)用桩断言,
|
|
80
|
+
// 客户端自身行为由 bridgeClient.test.ts 覆盖
|
|
81
|
+
const bridgeClientCloseSpy = jest.fn();
|
|
82
|
+
const createBridgeClientSpy = jest.fn(() => ({ close: bridgeClientCloseSpy }));
|
|
83
|
+
jest.doMock('./agent/bridgeClient', () => ({
|
|
84
|
+
__esModule: true,
|
|
85
|
+
createAgentBridgeClient: createBridgeClientSpy,
|
|
86
|
+
}));
|
|
87
|
+
const registerSpy = jest.fn();
|
|
88
|
+
const unregisterSpy = jest.fn();
|
|
89
|
+
/** 模拟 core 的 initState:init 首次调用翻转(与真 core 行为一致) */
|
|
90
|
+
const initStateBox = {
|
|
91
|
+
called: false,
|
|
92
|
+
optsDeferred: { promise: new Promise(() => { }) },
|
|
93
|
+
};
|
|
94
|
+
/** 模拟宿主已先行 theatre.init(opts) */
|
|
95
|
+
function simulateHostInit(opts) {
|
|
96
|
+
initStateBox.called = true;
|
|
97
|
+
initStateBox.optsDeferred = { promise: Promise.resolve(opts) };
|
|
98
|
+
}
|
|
99
|
+
initSpy.mockImplementation(async (opts) => {
|
|
100
|
+
if (!initStateBox.called)
|
|
101
|
+
simulateHostInit(opts);
|
|
102
|
+
});
|
|
103
|
+
jest.doMock('@dreamerbird/studio', () => ({
|
|
104
|
+
__esModule: true,
|
|
105
|
+
}));
|
|
106
|
+
jest.doMock('@dreamerbird/core', () => ({
|
|
107
|
+
__esModule: true,
|
|
108
|
+
default: { init: initSpy },
|
|
109
|
+
getProject: getProjectSpy,
|
|
110
|
+
getStudio: () => ({ ui: uiBox, initialized: initializedBox.promise }),
|
|
111
|
+
getStudioSync: getStudioSyncSpy,
|
|
112
|
+
onChange: onChangeSpy,
|
|
113
|
+
}));
|
|
114
|
+
jest.doMock('@dreamerbird/core/initState', () => ({
|
|
115
|
+
__esModule: true,
|
|
116
|
+
initState: initStateBox,
|
|
117
|
+
}));
|
|
118
|
+
jest.doMock('@dreamerbird/core/privateAPIs', () => ({
|
|
119
|
+
__esModule: true,
|
|
120
|
+
privateAPI: () => ({ pointers: { historic: { fakeHistoricPointer: true } } }),
|
|
121
|
+
}));
|
|
122
|
+
jest.doMock('@dreamerbird/studio/propEditors/customPropEditors', () => ({
|
|
123
|
+
__esModule: true,
|
|
124
|
+
registerCustomPropEditor: registerSpy,
|
|
125
|
+
unregisterCustomPropEditor: unregisterSpy,
|
|
126
|
+
}));
|
|
127
|
+
// 编辑器组件替身:注册表认 key 即可,不拉真组件的重依赖链
|
|
128
|
+
jest.doMock('./poseMode/PosePropEditor', () => ({
|
|
129
|
+
__esModule: true,
|
|
130
|
+
default: () => null,
|
|
131
|
+
}));
|
|
132
|
+
jest.doMock('./gesturePropsEditor', () => ({
|
|
133
|
+
__esModule: true,
|
|
134
|
+
GesturePropEditorLeft: () => null,
|
|
135
|
+
GesturePropEditorRight: () => null,
|
|
136
|
+
}));
|
|
137
|
+
let React;
|
|
138
|
+
let ReactDOM;
|
|
139
|
+
let useCameraStudio;
|
|
140
|
+
let bootstrap;
|
|
141
|
+
beforeEach(async () => {
|
|
142
|
+
// fake-indexeddb 每用例一座新厂(数据隔离);清 localStorage 里的旧播种
|
|
143
|
+
// 清理标记(R7 先例:标记键跨用例共享会污染)
|
|
144
|
+
;
|
|
145
|
+
globalThis.indexedDB = new IDBFactory();
|
|
146
|
+
globalThis.localStorage?.clear();
|
|
147
|
+
jest.resetModules();
|
|
148
|
+
initSpy.mockClear();
|
|
149
|
+
getProjectSpy.mockClear();
|
|
150
|
+
hideSpy.mockClear();
|
|
151
|
+
restoreSpy.mockClear();
|
|
152
|
+
stateUnsubSpy.mockClear();
|
|
153
|
+
onChangeSpy.mockClear();
|
|
154
|
+
registerSpy.mockClear();
|
|
155
|
+
unregisterSpy.mockClear();
|
|
156
|
+
initStateBox.called = false;
|
|
157
|
+
initStateBox.optsDeferred = { promise: new Promise(() => { }) };
|
|
158
|
+
uiBox.isHidden = false;
|
|
159
|
+
initializedBox.promise = Promise.resolve();
|
|
160
|
+
setLeftStripHiddenSpy.mockClear();
|
|
161
|
+
getStudioSyncSpy.mockClear();
|
|
162
|
+
activateApiSpy.mockClear();
|
|
163
|
+
disposeApiSpy.mockClear();
|
|
164
|
+
getApiSpy.mockClear();
|
|
165
|
+
getRegistrySpy.mockClear();
|
|
166
|
+
createBridgeClientSpy.mockClear();
|
|
167
|
+
bridgeClientCloseSpy.mockClear();
|
|
168
|
+
// react/react-dom 与被测模块同注册表,见文件头注释
|
|
169
|
+
React = await import('react');
|
|
170
|
+
ReactDOM = await import('react-dom/client');
|
|
171
|
+
useCameraStudio = (await import('./useCameraStudio')).useCameraStudio;
|
|
172
|
+
bootstrap = await import('./bootstrap');
|
|
173
|
+
});
|
|
174
|
+
// ── renderHook 等价物(R13:无 testing-library,手写 harness) ────
|
|
175
|
+
function hookHost(config, opts) {
|
|
176
|
+
const { act, StrictMode, createElement } = React;
|
|
177
|
+
const el = document.createElement('div');
|
|
178
|
+
document.body.appendChild(el);
|
|
179
|
+
const root = ReactDOM.createRoot(el);
|
|
180
|
+
const result = {
|
|
181
|
+
current: undefined,
|
|
182
|
+
};
|
|
183
|
+
const Harness = () => {
|
|
184
|
+
result.current = useCameraStudio(config);
|
|
185
|
+
return null;
|
|
186
|
+
};
|
|
187
|
+
return {
|
|
188
|
+
result,
|
|
189
|
+
async mount() {
|
|
190
|
+
await act(async () => {
|
|
191
|
+
root.render(opts?.strict
|
|
192
|
+
? createElement(StrictMode, null, createElement(Harness))
|
|
193
|
+
: createElement(Harness));
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
async unmount() {
|
|
197
|
+
await act(async () => {
|
|
198
|
+
root.unmount();
|
|
199
|
+
});
|
|
200
|
+
el.remove();
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
/** ui.hide/restore 是 fire-and-forget 微任务链,断言前补一拍冲刷 */
|
|
205
|
+
async function flush() {
|
|
206
|
+
await React.act(async () => { });
|
|
207
|
+
}
|
|
208
|
+
// 1. 幂等 + StrictMode
|
|
209
|
+
test('1. StrictMode 双跑:init 只调一次,编辑器只注册一轮,ready 就位', async () => {
|
|
210
|
+
const h = hookHost({}, { strict: true });
|
|
211
|
+
await h.mount();
|
|
212
|
+
expect(initSpy).toHaveBeenCalledTimes(1);
|
|
213
|
+
// pose/gestureL/gestureR 各一次;双跑不重复注册
|
|
214
|
+
expect(registerSpy).toHaveBeenCalledTimes(3);
|
|
215
|
+
expect(h.result.current?.ready).toBe(true);
|
|
216
|
+
expect(h.result.current?.error).toBeUndefined();
|
|
217
|
+
expect(setLeftStripHiddenSpy).not.toHaveBeenCalled(); // 缺省配置不动 LeftStrip
|
|
218
|
+
await h.unmount();
|
|
219
|
+
});
|
|
220
|
+
// 2. 卸载四项清理
|
|
221
|
+
test('2. 卸载:编辑器注销、state 订阅断开、ui.hide;重挂 ui.restore', async () => {
|
|
222
|
+
const h = hookHost({ state: { onStateChange: jest.fn() } });
|
|
223
|
+
await h.mount();
|
|
224
|
+
expect(h.result.current?.ready).toBe(true);
|
|
225
|
+
await h.unmount();
|
|
226
|
+
await flush();
|
|
227
|
+
expect(unregisterSpy).toHaveBeenCalledWith('pose');
|
|
228
|
+
expect(unregisterSpy).toHaveBeenCalledWith('gestureL');
|
|
229
|
+
expect(unregisterSpy).toHaveBeenCalledWith('gestureR');
|
|
230
|
+
expect(stateUnsubSpy).toHaveBeenCalledTimes(1);
|
|
231
|
+
expect(hideSpy).toHaveBeenCalledTimes(1);
|
|
232
|
+
// 重挂:ui.restore 被调
|
|
233
|
+
const h2 = hookHost({ state: { onStateChange: jest.fn() } });
|
|
234
|
+
await h2.mount();
|
|
235
|
+
await flush();
|
|
236
|
+
expect(restoreSpy).toHaveBeenCalled();
|
|
237
|
+
await h2.unmount();
|
|
238
|
+
});
|
|
239
|
+
// 2b. Agent API 会话接线(Task 15):挂载激活、卸载先拆 API
|
|
240
|
+
test('2b. Agent API:挂载激活门面(exposeGlobal 透传),卸载先 dispose API 再做既有清理', async () => {
|
|
241
|
+
const h = hookHost({ agent: { exposeGlobal: true } });
|
|
242
|
+
await h.mount();
|
|
243
|
+
expect(h.result.current?.ready).toBe(true);
|
|
244
|
+
// 激活一次;第二参透传 exposeGlobal;runtime 持有 fakeSheet
|
|
245
|
+
expect(activateApiSpy).toHaveBeenCalledTimes(1);
|
|
246
|
+
const [runtime, opts] = activateApiSpy.mock.calls[0];
|
|
247
|
+
expect(opts).toEqual({ exposeGlobal: true });
|
|
248
|
+
expect(runtime.sheet).toBe(fakeSheet);
|
|
249
|
+
// handle.api 与 BootCtx 同源(模块级单例门面)
|
|
250
|
+
expect(h.result.current?.api).toBe(fakeApiObject);
|
|
251
|
+
await h.unmount();
|
|
252
|
+
await flush();
|
|
253
|
+
// 拆解顺序:dispose API 先于编辑器注销(挂载 waiter/在途任务先被拒)
|
|
254
|
+
expect(disposeApiSpy).toHaveBeenCalledTimes(1);
|
|
255
|
+
expect(disposeApiSpy.mock.invocationCallOrder[0]).toBeLessThan(unregisterSpy.mock.invocationCallOrder[0]);
|
|
256
|
+
});
|
|
257
|
+
// 2c. exposeGlobal 缺省关闭:浏览器默认不挂 window 全局
|
|
258
|
+
test('2c. Agent API:未配置 agent.exposeGlobal 时以 false 激活', async () => {
|
|
259
|
+
const h = hookHost({});
|
|
260
|
+
await h.mount();
|
|
261
|
+
expect(activateApiSpy).toHaveBeenCalledTimes(1);
|
|
262
|
+
expect(activateApiSpy.mock.calls[0][1]).toEqual({
|
|
263
|
+
exposeGlobal: false,
|
|
264
|
+
});
|
|
265
|
+
await h.unmount();
|
|
266
|
+
});
|
|
267
|
+
// 2d. 桥接客户端接线(Task 6):显式配置才启动;拆解先关客户端再 dispose API
|
|
268
|
+
test('2d. Agent 桥接:agent.bridge 显式配置才启动客户端;拆解顺序 close → dispose API', async () => {
|
|
269
|
+
const bridge = {
|
|
270
|
+
url: 'ws://127.0.0.1:43110',
|
|
271
|
+
token: 't',
|
|
272
|
+
httpUrl: 'http://127.0.0.1:43110',
|
|
273
|
+
};
|
|
274
|
+
const h = hookHost({ agent: { bridge } });
|
|
275
|
+
await h.mount();
|
|
276
|
+
// 启动在 API 激活之后,使用会话自身注册表与 runtime
|
|
277
|
+
expect(createBridgeClientSpy).toHaveBeenCalledTimes(1);
|
|
278
|
+
const deps = createBridgeClientSpy.mock.calls[0][0];
|
|
279
|
+
expect(deps.config).toBe(bridge);
|
|
280
|
+
expect(deps.registry).toBe(fakeRegistryObject);
|
|
281
|
+
expect(deps.runtime).toBe(activateApiSpy.mock.calls[0][0]);
|
|
282
|
+
expect(createBridgeClientSpy.mock.invocationCallOrder[0]).toBeGreaterThan(activateApiSpy.mock.invocationCallOrder[0]);
|
|
283
|
+
await h.unmount();
|
|
284
|
+
await flush();
|
|
285
|
+
// 拆解:先关桥接客户端(停重连/退订任务),再 dispose API
|
|
286
|
+
expect(bridgeClientCloseSpy).toHaveBeenCalledTimes(1);
|
|
287
|
+
expect(bridgeClientCloseSpy.mock.invocationCallOrder[0]).toBeLessThan(disposeApiSpy.mock.invocationCallOrder[0]);
|
|
288
|
+
});
|
|
289
|
+
// 2e. 桥接缺省不连:未配置 agent.bridge 时客户端不启动、拆解不涉及
|
|
290
|
+
test('2e. Agent 桥接:未配置 agent.bridge 时不启动客户端', async () => {
|
|
291
|
+
const h = hookHost({});
|
|
292
|
+
await h.mount();
|
|
293
|
+
expect(createBridgeClientSpy).not.toHaveBeenCalled();
|
|
294
|
+
expect(getRegistrySpy).not.toHaveBeenCalled();
|
|
295
|
+
await h.unmount();
|
|
296
|
+
await flush();
|
|
297
|
+
expect(bridgeClientCloseSpy).not.toHaveBeenCalled();
|
|
298
|
+
});
|
|
299
|
+
// 3. 重挂幂等
|
|
300
|
+
test('3. 重挂幂等:ready 恢复,init 仍 1 次,ui.restore 补调', async () => {
|
|
301
|
+
const h1 = hookHost({});
|
|
302
|
+
await h1.mount();
|
|
303
|
+
expect(h1.result.current?.ready).toBe(true);
|
|
304
|
+
await h1.unmount();
|
|
305
|
+
await flush();
|
|
306
|
+
expect(restoreSpy).not.toHaveBeenCalled(); // 首挂本就可见,restore 跳过
|
|
307
|
+
expect(hideSpy).toHaveBeenCalledTimes(1);
|
|
308
|
+
const h2 = hookHost({});
|
|
309
|
+
await h2.mount();
|
|
310
|
+
await flush();
|
|
311
|
+
expect(h2.result.current?.ready).toBe(true);
|
|
312
|
+
expect(h2.result.current?.error).toBeUndefined();
|
|
313
|
+
expect(initSpy).toHaveBeenCalledTimes(1); // boot 幂等复用,未再 init
|
|
314
|
+
expect(restoreSpy).toHaveBeenCalledTimes(1); // 上次 hide 隐去,重挂补一次
|
|
315
|
+
await h2.unmount();
|
|
316
|
+
});
|
|
317
|
+
// 4. 第二实例报错
|
|
318
|
+
test('4. 单页单实例:第二个 hook 直接 error,第一个不受影响', async () => {
|
|
319
|
+
const h1 = hookHost({});
|
|
320
|
+
await h1.mount();
|
|
321
|
+
const h2 = hookHost({});
|
|
322
|
+
await h2.mount();
|
|
323
|
+
expect(h2.result.current?.error?.message).toContain('单页只允许一个');
|
|
324
|
+
expect(h2.result.current?.ready).toBe(false);
|
|
325
|
+
expect(h1.result.current?.error).toBeUndefined();
|
|
326
|
+
expect(h1.result.current?.ready).toBe(true);
|
|
327
|
+
await h1.unmount();
|
|
328
|
+
await h2.unmount();
|
|
329
|
+
});
|
|
330
|
+
// 5. storage namespace(R3:断言走 mock.calls[0] 核库名,不用 expect.anything)
|
|
331
|
+
test('5a. storage:{namespace} → IDB 库名带后缀', async () => {
|
|
332
|
+
const openSpy = jest.spyOn(indexedDB, 'open');
|
|
333
|
+
try {
|
|
334
|
+
const h = hookHost({ storage: { namespace: 'ns1' } });
|
|
335
|
+
await h.mount();
|
|
336
|
+
const names = openSpy.mock.calls.map((c) => c[0]);
|
|
337
|
+
expect(names).toContain('toybox-asset-library-ns1');
|
|
338
|
+
expect(names).not.toContain('toybox-asset-library');
|
|
339
|
+
await h.unmount();
|
|
340
|
+
}
|
|
341
|
+
finally {
|
|
342
|
+
openSpy.mockRestore();
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
test('5b. storage:{} → 库名与现状一字不差', async () => {
|
|
346
|
+
const openSpy = jest.spyOn(indexedDB, 'open');
|
|
347
|
+
try {
|
|
348
|
+
const h = hookHost({ storage: {} });
|
|
349
|
+
await h.mount();
|
|
350
|
+
const names = openSpy.mock.calls.map((c) => c[0]);
|
|
351
|
+
expect(names).toContain('toybox-asset-library');
|
|
352
|
+
await h.unmount();
|
|
353
|
+
}
|
|
354
|
+
finally {
|
|
355
|
+
openSpy.mockRestore();
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
// 6. state 通道(直接驱动 BootCtx 暴露的测试钩子 notifyStateChange)
|
|
359
|
+
test('6. state 通道:usePersistentStorage:false + 尾部节流 + dispose flush', async () => {
|
|
360
|
+
jest.useFakeTimers();
|
|
361
|
+
try {
|
|
362
|
+
const onStateChange = jest.fn();
|
|
363
|
+
const ctx = await bootstrap.initCameraStudio({ state: { onStateChange } });
|
|
364
|
+
expect(initSpy).toHaveBeenCalledTimes(1);
|
|
365
|
+
expect(initSpy.mock.calls[0][0]).toMatchObject({
|
|
366
|
+
studio: true,
|
|
367
|
+
usePersistentStorage: false,
|
|
368
|
+
});
|
|
369
|
+
// 窗口内多次变更只落一次(尾部触发,取最新)
|
|
370
|
+
ctx.notifyStateChange({ rev: 1 });
|
|
371
|
+
ctx.notifyStateChange({ rev: 2 });
|
|
372
|
+
expect(onStateChange).not.toHaveBeenCalled();
|
|
373
|
+
jest.advanceTimersByTime(1000);
|
|
374
|
+
expect(onStateChange).toHaveBeenCalledTimes(1);
|
|
375
|
+
expect(onStateChange).toHaveBeenLastCalledWith({ rev: 2 });
|
|
376
|
+
// dispose:订阅断开 + 未到的尾部变更立即 flush 带出
|
|
377
|
+
ctx.notifyStateChange({ rev: 3 });
|
|
378
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
379
|
+
expect(onStateChange).toHaveBeenCalledTimes(2);
|
|
380
|
+
expect(onStateChange).toHaveBeenLastCalledWith({ rev: 3 });
|
|
381
|
+
expect(stateUnsubSpy).toHaveBeenCalledTimes(1);
|
|
382
|
+
}
|
|
383
|
+
finally {
|
|
384
|
+
jest.useRealTimers();
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
// 7. sync 透传
|
|
388
|
+
test('7a. sync:{serverUrl} → init opts 透传一致', async () => {
|
|
389
|
+
const ctx = await bootstrap.initCameraStudio({
|
|
390
|
+
sync: { serverUrl: 'wss://x' },
|
|
391
|
+
});
|
|
392
|
+
expect(initSpy.mock.calls[0][0]).toMatchObject({ serverUrl: 'wss://x' });
|
|
393
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
394
|
+
});
|
|
395
|
+
test('7b. sync 缺省 → init opts 不带 serverUrl 键(协作关)', async () => {
|
|
396
|
+
const ctx = await bootstrap.initCameraStudio({});
|
|
397
|
+
expect(initSpy).toHaveBeenCalledTimes(1);
|
|
398
|
+
expect('serverUrl' in initSpy.mock.calls[0][0]).toBe(false);
|
|
399
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
400
|
+
});
|
|
401
|
+
// 8. storage:false 纯查看器
|
|
402
|
+
test('8. storage:false → 纯查看器,canWrite=false 且 init 不碰 indexedDB', async () => {
|
|
403
|
+
const openSpy = jest.spyOn(indexedDB, 'open');
|
|
404
|
+
try {
|
|
405
|
+
const ctx = await bootstrap.initCameraStudio({ storage: false });
|
|
406
|
+
expect(ctx.library.canWrite).toBe(false);
|
|
407
|
+
const { getLibrary } = await import('./assetLibrary/library');
|
|
408
|
+
expect(getLibrary().canWrite).toBe(false);
|
|
409
|
+
expect(openSpy).not.toHaveBeenCalled();
|
|
410
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
411
|
+
}
|
|
412
|
+
finally {
|
|
413
|
+
openSpy.mockRestore();
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
// 9. 冲突矩阵
|
|
417
|
+
test('9a. 宿主未 init → 模块按 config init', async () => {
|
|
418
|
+
const ctx = await bootstrap.initCameraStudio({});
|
|
419
|
+
expect(initSpy).toHaveBeenCalledTimes(1);
|
|
420
|
+
expect(initSpy.mock.calls[0][0]).toMatchObject({ studio: true });
|
|
421
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
422
|
+
});
|
|
423
|
+
test('9b. 宿主已 init 且不一致 → console.warn 告警 + 以先到为准(不再 init)', async () => {
|
|
424
|
+
simulateHostInit({ studio: true, serverUrl: 'wss://other' });
|
|
425
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => { });
|
|
426
|
+
try {
|
|
427
|
+
const ctx = await bootstrap.initCameraStudio({});
|
|
428
|
+
expect(initSpy).not.toHaveBeenCalled();
|
|
429
|
+
expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining('以先到'));
|
|
430
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
431
|
+
}
|
|
432
|
+
finally {
|
|
433
|
+
warnSpy.mockRestore();
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
test('9c. 宿主已 init 且一致 → 静默复用:不告警、不再 init', async () => {
|
|
437
|
+
simulateHostInit({ studio: true });
|
|
438
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => { });
|
|
439
|
+
try {
|
|
440
|
+
const ctx = await bootstrap.initCameraStudio({});
|
|
441
|
+
expect(initSpy).not.toHaveBeenCalled();
|
|
442
|
+
expect(warnSpy).not.toHaveBeenCalled();
|
|
443
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
444
|
+
}
|
|
445
|
+
finally {
|
|
446
|
+
warnSpy.mockRestore();
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
// 10. 缺省库名启动清理(T9 顺带,T8 评审遗留):sweepOrphanBlobs 与
|
|
450
|
+
// ensureBuiltinRigAlias 并入 boot 的内置 IDB 缺省库名分支
|
|
451
|
+
test('10a. 缺省内置 IDB:孤儿清扫与骨架族别名保底都被调用', async () => {
|
|
452
|
+
const libModule = await import('./assetLibrary/library');
|
|
453
|
+
const idbModule = await import('./assetLibrary/indexedDBBackend');
|
|
454
|
+
const sweepSpy = jest.spyOn(libModule.Library.prototype, 'sweepOrphanBlobs');
|
|
455
|
+
// ensureBuiltinRigAlias 是独立导出函数(不可 spy 模块导出);M-4 并集读
|
|
456
|
+
// 后它直读可写源自有列表——spy 它触达的 IndexedDBBackend.getRigAliases:
|
|
457
|
+
// 调用即代表保底跑了
|
|
458
|
+
const aliasSpy = jest.spyOn(idbModule.IndexedDBBackend.prototype, 'getRigAliases');
|
|
459
|
+
try {
|
|
460
|
+
const h = hookHost({}); // storage 缺省 = 缺省库名
|
|
461
|
+
await h.mount();
|
|
462
|
+
expect(sweepSpy).toHaveBeenCalled();
|
|
463
|
+
expect(aliasSpy).toHaveBeenCalled();
|
|
464
|
+
await h.unmount();
|
|
465
|
+
}
|
|
466
|
+
finally {
|
|
467
|
+
sweepSpy.mockRestore();
|
|
468
|
+
aliasSpy.mockRestore();
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
test('10b. namespace 分支:清扫与别名保底都不调', async () => {
|
|
472
|
+
const libModule = await import('./assetLibrary/library');
|
|
473
|
+
const idbModule = await import('./assetLibrary/indexedDBBackend');
|
|
474
|
+
const sweepSpy = jest.spyOn(libModule.Library.prototype, 'sweepOrphanBlobs');
|
|
475
|
+
const aliasSpy = jest.spyOn(idbModule.IndexedDBBackend.prototype, 'getRigAliases');
|
|
476
|
+
try {
|
|
477
|
+
const h = hookHost({ storage: { namespace: 'ns-clean' } });
|
|
478
|
+
await h.mount();
|
|
479
|
+
expect(sweepSpy).not.toHaveBeenCalled();
|
|
480
|
+
expect(aliasSpy).not.toHaveBeenCalled();
|
|
481
|
+
await h.unmount();
|
|
482
|
+
}
|
|
483
|
+
finally {
|
|
484
|
+
sweepSpy.mockRestore();
|
|
485
|
+
aliasSpy.mockRestore();
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
test('10c. storage:false 纯查看器:无可写源,清扫与别名保底都不调', async () => {
|
|
489
|
+
const libModule = await import('./assetLibrary/library');
|
|
490
|
+
const idbModule = await import('./assetLibrary/indexedDBBackend');
|
|
491
|
+
const sweepSpy = jest.spyOn(libModule.Library.prototype, 'sweepOrphanBlobs');
|
|
492
|
+
const aliasSpy = jest.spyOn(idbModule.IndexedDBBackend.prototype, 'getRigAliases');
|
|
493
|
+
try {
|
|
494
|
+
const h = hookHost({ storage: false });
|
|
495
|
+
await h.mount();
|
|
496
|
+
expect(sweepSpy).not.toHaveBeenCalled();
|
|
497
|
+
expect(aliasSpy).not.toHaveBeenCalled();
|
|
498
|
+
await h.unmount();
|
|
499
|
+
}
|
|
500
|
+
finally {
|
|
501
|
+
sweepSpy.mockRestore();
|
|
502
|
+
aliasSpy.mockRestore();
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
// T9 评审 F2:宿主可写源实例分支(idbName 同为 undefined)此前无负面用例。
|
|
506
|
+
// 三个清理(cleanupLegacySeeds/sweepOrphanBlobs/ensureBuiltinRigAlias)同在
|
|
507
|
+
// boot 的 idbName === DEFAULT_IDB_NAME 守卫块内:sweep 未调即整块未进,
|
|
508
|
+
// 三者一并兜住(与 10b/10c 同一断言策略)
|
|
509
|
+
test('10d. 宿主可写源实例:缺省库名清理三项都不调', async () => {
|
|
510
|
+
const libModule = await import('./assetLibrary/library');
|
|
511
|
+
const idbModule = await import('./assetLibrary/indexedDBBackend');
|
|
512
|
+
const sweepSpy = jest.spyOn(libModule.Library.prototype, 'sweepOrphanBlobs');
|
|
513
|
+
// ensureBuiltinRigAlias 是独立导出函数(不可 spy 模块导出);M-4 并集读
|
|
514
|
+
// 后它直读可写源自有列表——spy 它触达的 IndexedDBBackend.getRigAliases:
|
|
515
|
+
// 调用即代表保底跑了
|
|
516
|
+
const aliasSpy = jest.spyOn(idbModule.IndexedDBBackend.prototype, 'getRigAliases');
|
|
517
|
+
try {
|
|
518
|
+
const hostSource = {
|
|
519
|
+
id: 'host-src',
|
|
520
|
+
listEntries: async () => [],
|
|
521
|
+
getEntry: async () => undefined,
|
|
522
|
+
getBlobUrl: async () => '',
|
|
523
|
+
putEntry: async () => { },
|
|
524
|
+
deleteEntry: async () => { },
|
|
525
|
+
putBlob: async () => 'blob:x',
|
|
526
|
+
deleteBlob: async () => { },
|
|
527
|
+
getRigAliases: async () => [],
|
|
528
|
+
putRigAlias: async () => { },
|
|
529
|
+
};
|
|
530
|
+
const h = hookHost({ storage: hostSource });
|
|
531
|
+
await h.mount();
|
|
532
|
+
expect(sweepSpy).not.toHaveBeenCalled();
|
|
533
|
+
expect(aliasSpy).not.toHaveBeenCalled();
|
|
534
|
+
await h.unmount();
|
|
535
|
+
}
|
|
536
|
+
finally {
|
|
537
|
+
sweepSpy.mockRestore();
|
|
538
|
+
aliasSpy.mockRestore();
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
// 11. config 漂移(终审 I-1(b)):已 boot 后重挂换配置——告警一次并点名
|
|
542
|
+
// 差异键;sceneProps 沿用首 boot;不为新 config 调 getProject 造闲置
|
|
543
|
+
// IProject。换配置的正确姿势是整页刷新(React 重挂不生效)。
|
|
544
|
+
test('11. 重挂换配置:warn 点名差异键一次,sceneProps 沿用首 boot,getProject 不为新 id 调用', async () => {
|
|
545
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => { });
|
|
546
|
+
try {
|
|
547
|
+
const h1 = hookHost({ project: 'SceneA' });
|
|
548
|
+
await h1.mount();
|
|
549
|
+
const firstProject = h1.result.current?.sceneProps.project;
|
|
550
|
+
expect(getProjectSpy).toHaveBeenCalledWith('SceneA', expect.anything());
|
|
551
|
+
await h1.unmount();
|
|
552
|
+
getProjectSpy.mockClear();
|
|
553
|
+
// 重挂传不同 project + sync:差异键被点名,只告警一次
|
|
554
|
+
const h2 = hookHost({ project: 'SceneB', sync: { serverUrl: 'wss://y' } });
|
|
555
|
+
await h2.mount();
|
|
556
|
+
const driftWarns = warnSpy.mock.calls.filter((c) => String(c[0]).includes('config 与首次 boot 不一致'));
|
|
557
|
+
expect(driftWarns).toHaveLength(1);
|
|
558
|
+
expect(String(driftWarns[0][0])).toContain('project');
|
|
559
|
+
expect(String(driftWarns[0][0])).toContain('sync');
|
|
560
|
+
// sceneProps 沿用首 boot 的 project(同实例);getProject 未为新 id 调用
|
|
561
|
+
expect(h2.result.current?.sceneProps.project).toBe(firstProject);
|
|
562
|
+
expect(getProjectSpy.mock.calls.every((c) => c[0] !== 'SceneB')).toBe(true);
|
|
563
|
+
await h2.unmount();
|
|
564
|
+
// 第三次重挂(又不同 config):不重复告警
|
|
565
|
+
const h3 = hookHost({ project: 'SceneC' });
|
|
566
|
+
await h3.mount();
|
|
567
|
+
expect(warnSpy.mock.calls.filter((c) => String(c[0]).includes('config 与首次 boot 不一致'))).toHaveLength(1);
|
|
568
|
+
await h3.unmount();
|
|
569
|
+
}
|
|
570
|
+
finally {
|
|
571
|
+
warnSpy.mockRestore();
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
// 12. 宿主错误提示接口(2026-10-16 收尾):库存储错误经 config.onError
|
|
575
|
+
// 转成宿主可渲染的 CameraStudioError;sceneProps 同时透传给 CameraScene
|
|
576
|
+
// (视频导出错误也走同一回调)。
|
|
577
|
+
test('12a. onError:库错误转成 CameraStudioError,sceneProps 透传同一回调', async () => {
|
|
578
|
+
const onError = jest.fn();
|
|
579
|
+
const { LibraryError } = await import('./assetLibrary/source');
|
|
580
|
+
// storage:false 跳过启动清理,断言只压 reportError 这一通路上
|
|
581
|
+
const ctx = await bootstrap.initCameraStudio({ storage: false, onError });
|
|
582
|
+
expect(ctx.sceneProps.onError).toBe(onError);
|
|
583
|
+
const cause = new Error('disk full');
|
|
584
|
+
ctx.library.reportError(new LibraryError('quota', '额度不足', cause));
|
|
585
|
+
expect(onError).toHaveBeenCalledTimes(1);
|
|
586
|
+
expect(onError.mock.calls[0][0]).toMatchObject({
|
|
587
|
+
source: 'library',
|
|
588
|
+
code: 'quota',
|
|
589
|
+
message: '额度不足',
|
|
590
|
+
cause,
|
|
591
|
+
});
|
|
592
|
+
await bootstrap.disposeCameraStudio(ctx);
|
|
593
|
+
});
|
|
594
|
+
test('12b. 启动清理失败:有 onError 上告宿主,不再走 console.warn', async () => {
|
|
595
|
+
const libModule = await import('./assetLibrary/library');
|
|
596
|
+
const failure = new Error('idb busy');
|
|
597
|
+
const sweepSpy = jest
|
|
598
|
+
.spyOn(libModule.Library.prototype, 'sweepOrphanBlobs')
|
|
599
|
+
.mockRejectedValue(failure);
|
|
600
|
+
const onError = jest.fn();
|
|
601
|
+
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => { });
|
|
602
|
+
try {
|
|
603
|
+
const h = hookHost({ onError });
|
|
604
|
+
await h.mount();
|
|
605
|
+
await flush();
|
|
606
|
+
expect(onError).toHaveBeenCalledWith(expect.objectContaining({
|
|
607
|
+
source: 'library',
|
|
608
|
+
code: 'unknown',
|
|
609
|
+
message: '孤儿 blob 清扫失败',
|
|
610
|
+
cause: failure,
|
|
611
|
+
}));
|
|
612
|
+
expect(warnSpy.mock.calls.some((c) => String(c[0]).includes('孤儿 blob 清扫失败'))).toBe(false);
|
|
613
|
+
await h.unmount();
|
|
614
|
+
}
|
|
615
|
+
finally {
|
|
616
|
+
sweepSpy.mockRestore();
|
|
617
|
+
warnSpy.mockRestore();
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
test('13. 显隐恢复竞态回归:initialized 未收尾前不判 isHidden,收尾后补恢复', async () => {
|
|
621
|
+
// 场景:上次 dispose 的 hidden 随同步恢复落库。落库前(initialized 挂起)
|
|
622
|
+
// restore-check 不得抢跑(抢跑读到可见快照就会漏恢复,UI 永久隐藏——
|
|
623
|
+
// 2026-10-16 线上事故根因);落库后(initialized 解析)必须补恢复
|
|
624
|
+
let releaseInit;
|
|
625
|
+
initializedBox.promise = new Promise((r) => (releaseInit = r));
|
|
626
|
+
const h = hookHost({});
|
|
627
|
+
await h.mount();
|
|
628
|
+
expect(h.result.current?.ready).toBe(true);
|
|
629
|
+
await flush();
|
|
630
|
+
// initialized 挂起中:即使 isHidden 马上会翻真,此刻也不得发 restore
|
|
631
|
+
expect(restoreSpy).not.toHaveBeenCalled();
|
|
632
|
+
// 同步落库(状态恢复为 hidden)→ initialized 解析 → restore-check 补恢复
|
|
633
|
+
uiBox.isHidden = true;
|
|
634
|
+
releaseInit();
|
|
635
|
+
await flush();
|
|
636
|
+
expect(restoreSpy).toHaveBeenCalledTimes(1);
|
|
637
|
+
expect(uiBox.isHidden).toBe(false);
|
|
638
|
+
await h.unmount();
|
|
639
|
+
});
|
|
640
|
+
test('14. ui.hideLeftStrip → boot 经 studio.ui.setLeftStripHidden(true) 应用', async () => {
|
|
641
|
+
const h = hookHost({ ui: { hideLeftStrip: true } });
|
|
642
|
+
await h.mount();
|
|
643
|
+
expect(h.result.current?.ready).toBe(true);
|
|
644
|
+
await flush();
|
|
645
|
+
expect(setLeftStripHiddenSpy).toHaveBeenCalledWith(true);
|
|
646
|
+
await h.unmount();
|
|
647
|
+
});
|