- Merge the small modules into 12 files: shared, choreography,
navigation, scene/{types,graph,scene}, gesture/{definition,recognizer}.
- SceneGraph now owns the begin/update/commit/cancel history rules as
methods, with the step helpers as private methods.
- createOriginScene returns a markRaw'd Scene class; operation handles
are an OperationHandle class instead of inline object literals.
- GestureRecognizer gains static create()/policyFor() factories, absorbing
the separate policy module.
- Pure helpers used by classes (matchesStart, pointOf, stepSpring,
composeNodeStyle, nodeEffectLayers, shouldCommit, ...) are exported
consts so they can be tested directly.
- Add haptics tests showing where navigator.vibrate can be triggered.
Public exports, types, and behavior are unchanged; the differential
suites against main still pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Faarh2Ts6StJPcz2mRiHiR
39 lines
986 B
Vue
39 lines
986 B
Vue
<script setup lang="ts">
|
|
import { onBeforeUnmount, ref, watchEffect } from "vue";
|
|
import type { OriginSceneProps } from "../scene/types";
|
|
import OriginNodeHost from "./OriginNodeHost.vue";
|
|
|
|
defineOptions({ name: "OriginScene" });
|
|
|
|
const props = defineProps<OriginSceneProps>();
|
|
|
|
const root = ref<HTMLElement | null>(null);
|
|
watchEffect(() => props.scene.registerContainer(root.value));
|
|
onBeforeUnmount(() => props.scene.registerContainer(null));
|
|
</script>
|
|
|
|
<template>
|
|
<!--
|
|
All component hosts are siblings. The operation graph is intentionally not
|
|
mirrored as DOM ancestry because promoting Y after X→Y must not remount Y.
|
|
-->
|
|
<main
|
|
ref="root"
|
|
class="nvo-scene"
|
|
:style="{
|
|
position: 'relative',
|
|
width: '100%',
|
|
height: '100%',
|
|
overflow: 'hidden',
|
|
isolation: 'isolate',
|
|
}"
|
|
>
|
|
<OriginNodeHost
|
|
v-for="node in scene.nodes.value"
|
|
:key="node.key"
|
|
:scene="scene"
|
|
:node="node"
|
|
/>
|
|
</main>
|
|
</template>
|